projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6855ec7
)
ASoC: soc-dai.c: use helper function
author
Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com>
Tue, 31 Jan 2023 02:01:49 +0000
(
02:01
+0000)
committer
Mark Brown
<broonie@kernel.org>
Tue, 31 Jan 2023 11:05:09 +0000
(11:05 +0000)
Current ASoC has many helper function.
This patch use it.
Link:
https://lore.kernel.org/all/6f047ec5-4055-761d-c1ea-c2d0b606e53a@linux.intel.com/
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link:
https://lore.kernel.org/r/87h6w7ea2a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-dai.c
patch
|
blob
|
history
diff --git
a/sound/soc/soc-dai.c
b/sound/soc/soc-dai.c
index 29a75fdf90e0950beaca28380bbcedcb6a0c7ea5..69f534f0d4bf18c6596ee28b21e44d83faaf482e 100644
(file)
--- a/
sound/soc/soc-dai.c
+++ b/
sound/soc/soc-dai.c
@@
-267,6
+267,11
@@
int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
int slots, int slot_width)
{
int ret = -ENOTSUPP;
+ int stream;
+ unsigned int *tdm_mask[] = {
+ &tx_mask,
+ &rx_mask,
+ };
if (dai->driver->ops &&
dai->driver->ops->xlate_tdm_slot_mask)
@@
-275,8
+280,8
@@
int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
else
snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
- dai->tx_mask = tx_mask;
-
dai->rx_mask = rx_mask
;
+ for_each_pcm_streams(stream)
+
snd_soc_dai_tdm_mask_set(dai, stream, *tdm_mask[stream])
;
if (dai->driver->ops &&
dai->driver->ops->set_tdm_slot)