summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt711-sdca.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2023-01-31 05:00:16 +0300
committerMark Brown <broonie@kernel.org>2023-01-31 14:04:57 +0300
commit8ec352362848d8cc9500ccfb051810597c0abf8a (patch)
tree372dba638b1edceb7874956939a44b48cb65dae2 /sound/soc/codecs/rt711-sdca.c
parent812c2852c59f1f532ea9b53d9bbe86231dd83fea (diff)
downloadlinux-8ec352362848d8cc9500ccfb051810597c0abf8a.tar.xz
ASoC: rt: use helper function
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zg9zea4w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt711-sdca.c')
-rw-r--r--sound/soc/codecs/rt711-sdca.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/codecs/rt711-sdca.c b/sound/soc/codecs/rt711-sdca.c
index 7cdf184d380b..c65abe812a4c 100644
--- a/sound/soc/codecs/rt711-sdca.c
+++ b/sound/soc/codecs/rt711-sdca.c
@@ -295,7 +295,7 @@ static void rt711_sdca_jack_detect_handler(struct work_struct *work)
if (!rt711->hs_jack)
return;
- if (!rt711->component->card || !rt711->component->card->instantiated)
+ if (!snd_soc_card_is_instantiated(rt711->component->card))
return;
/* SDW_SCP_SDCA_INT_SDCA_0 is used for jack detection */
@@ -1249,10 +1249,7 @@ static int rt711_sdca_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;
}