mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
ASoC: Rename snd_soc_dai_link_ch_map.ch_mask to cpu_ch_mask
Rename the ch_mask member of snd_soc_dai_link_ch_map to cpu_ch_mask, as that is what it is used for. The CPU and codec channel masks are not necessarily the same, and are quite likely different. SoundWire and I2S/TDM both support assigning different sample slots to each codec, so for example channel 0 on each codec could map to different channels at the CPU. So it's quite normal that the channel mask at the CPU end is different for each codec, but the codec channel masks are the same for each codec. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260910114500.1586637-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
fd73f4a665
commit
4d855d7475
|
|
@ -699,7 +699,7 @@ struct snd_soc_dai_link_component {
|
|||
struct snd_soc_dai_link_ch_map {
|
||||
unsigned int cpu;
|
||||
unsigned int codec;
|
||||
unsigned int ch_mask;
|
||||
unsigned int cpu_ch_mask;
|
||||
};
|
||||
|
||||
struct snd_soc_dai_link {
|
||||
|
|
|
|||
|
|
@ -1596,7 +1596,7 @@ int asoc_sdw_hw_params(struct snd_pcm_substream *substream,
|
|||
* ASoC will set the corresponding channel numbers for each cpu dai.
|
||||
*/
|
||||
for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
|
||||
ch_maps->ch_mask = ch_mask << (i * step);
|
||||
ch_maps->cpu_ch_mask = ch_mask << (i * step);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1264,7 +1264,7 @@ static int __soc_pcm_hw_params(struct snd_pcm_substream *substream,
|
|||
*/
|
||||
for_each_rtd_ch_maps(rtd, j, ch_maps)
|
||||
if (ch_maps->cpu == i)
|
||||
ch_mask |= ch_maps->ch_mask;
|
||||
ch_mask |= ch_maps->cpu_ch_mask;
|
||||
|
||||
/* fixup cpu channel number */
|
||||
if (ch_mask)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user