Skip to content

Commit 5b7f7fa

Browse files
committed
ASoC: SOF: Intel: hda-dai: use lowest channels
The ch_mask in a link indicates the locations of the channels. However, the channels used in each stream are the lowest channels. So convert ch_mask to GENMASK(hweight_long(ch_mask) - 1, 0). Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 527c09f commit 5b7f7fa

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/soc/sof/intel/hda-dai.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ int sdw_hda_dai_hw_params(struct snd_pcm_substream *substream,
510510
if (ch_maps->cpu == cpu_dai_id)
511511
ch_mask |= ch_maps->ch_mask;
512512
}
513+
ch_mask = GENMASK(hweight_long(ch_mask) - 1, 0);
513514

514515
ret = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id, cpu_dai->id,
515516
ch_mask,

0 commit comments

Comments
 (0)