Skip to content

Commit e76ea13

Browse files
committed
Revert "ASoC: SOF: Intel: hda-dai-ops: fix HDaudio link format"
This reverts commit 7f9512a. commit 7f9512a ("ASoC: SOF: Intel: hda-dai-ops: fix HDaudio link format") added up all DAIs channels for SoundWire aggregation mode. That was correct because we used a DMA for all DAIs. But, it is not valid anymore after we use a DMA for each DAI. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 451ccef commit e76ea13

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

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

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -226,34 +226,16 @@ static unsigned int generic_calc_stream_format(struct snd_sof_dev *sdev,
226226
struct snd_pcm_substream *substream,
227227
struct snd_pcm_hw_params *params)
228228
{
229-
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
230-
struct snd_soc_dai_link_ch_map *ch_maps;
231229
unsigned int format_val;
232230
unsigned int bits;
233-
int num_channels;
234-
u32 ch_mask = 0;
235-
int i;
236-
237-
/*
238-
* if the multiple dais are handled by the same dailink, we may need to update the
239-
* stream channel count - the params are modified in soc-pcm based on the ch_maps info
240-
*/
241-
for_each_link_ch_maps(rtd->dai_link, i, ch_maps)
242-
ch_mask |= ch_maps->ch_mask;
243-
244-
num_channels = ch_mask ? hweight_long(ch_mask) : params_channels(params);
245-
246-
if (num_channels != params_channels(params))
247-
dev_dbg(sdev->dev, "configuring stream format for %d channels, params_channels was %d\n",
248-
num_channels, params_channels(params));
249231

250232
bits = snd_hdac_stream_format_bits(params_format(params), SNDRV_PCM_SUBFORMAT_STD,
251233
params_physical_width(params));
252234

253-
format_val = snd_hdac_stream_format(num_channels, bits, params_rate(params));
235+
format_val = snd_hdac_stream_format(params_channels(params), bits, params_rate(params));
254236

255237
dev_dbg(sdev->dev, "format_val=%#x, rate=%d, ch=%d, format=%d\n", format_val,
256-
params_rate(params), num_channels, params_format(params));
238+
params_rate(params), params_channels(params), params_format(params));
257239

258240
return format_val;
259241
}

0 commit comments

Comments
 (0)