Unverified Commit 8ec35236 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: rt: use helper function



Current ASoC has many helper function.
This patch use it.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87zg9zea4w.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 812c2852
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -508,10 +508,7 @@ static int rt1308_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
	stream->sdw_stream = sdw_stream;

	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
		dai->playback_dma_data = stream;
	else
		dai->capture_dma_data = stream;
	snd_soc_dai_dma_data_set(dai, direction, stream);

	return 0;
}
+1 −4
Original line number Diff line number Diff line
@@ -507,10 +507,7 @@ static int rt1316_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
	stream->sdw_stream = sdw_stream;

	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
		dai->playback_dma_data = stream;
	else
		dai->capture_dma_data = stream;
	snd_soc_dai_dma_data_set(dai, direction, stream);

	return 0;
}
+1 −4
Original line number Diff line number Diff line
@@ -575,10 +575,7 @@ static int rt1318_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
	stream->sdw_stream = sdw_stream;

	/* Use tx_mask or rx_mask to configure stream tag and set dma_data */
	if (direction == SNDRV_PCM_STREAM_PLAYBACK)
		dai->playback_dma_data = stream;
	else
		dai->capture_dma_data = stream;
	snd_soc_dai_dma_data_set(dai, direction, stream);

	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -3157,7 +3157,7 @@ static int rt5645_jack_detect(struct snd_soc_component *component, int jack_inse
		snd_soc_dapm_force_enable_pin(dapm, "LDO2");
		snd_soc_dapm_force_enable_pin(dapm, "Mic Det Power");
		snd_soc_dapm_sync(dapm);
		if (!dapm->card->instantiated) {
		if (!snd_soc_card_is_instantiated(dapm->card)) {
			/* Power up necessary bits for JD if dapm is
			   not ready yet */
			regmap_update_bits(rt5645->regmap, RT5645_PWR_ANLG1,
+2 −2
Original line number Diff line number Diff line
@@ -1298,7 +1298,7 @@ static void rt5665_jack_detect_handler(struct work_struct *work)
		usleep_range(10000, 15000);
	}

	while (!rt5665->component->card->instantiated) {
	while (!snd_soc_card_is_instantiated(rt5665->component->card)) {
		pr_debug("%s\n", __func__);
		usleep_range(10000, 15000);
	}
@@ -4748,7 +4748,7 @@ static void rt5665_calibrate_handler(struct work_struct *work)
	struct rt5665_priv *rt5665 = container_of(work, struct rt5665_priv,
		calibrate_work.work);

	while (!rt5665->component->card->instantiated) {
	while (!snd_soc_card_is_instantiated(rt5665->component->card)) {
		pr_debug("%s\n", __func__);
		usleep_range(10000, 15000);
	}
Loading