Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: amd: acp: Refactor bit width calculation

Refactor bit width calculation using params_physical_width()
instead hard-code values.

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230130100104.4076640-1-venkataprasad.potturu@amd.com
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Venkata Prasad Potturu and committed by
Mark Brown
55e681c9 ffe4c0f0

+4 -4
+4 -4
sound/soc/amd/acp/acp-mach-common.c
··· 186 186 187 187 srate = params_rate(params); 188 188 ch = params_channels(params); 189 - format = 8 * params_format(params); 189 + format = params_physical_width(params); 190 190 191 191 if (drvdata->tdm_mode) 192 192 fmt = SND_SOC_DAIFMT_DSP_A; ··· 330 330 331 331 srate = params_rate(params); 332 332 ch = params_channels(params); 333 - format = 8 * params_format(params); 333 + format = params_physical_width(params); 334 334 335 335 if (drvdata->tdm_mode) 336 336 fmt = SND_SOC_DAIFMT_DSP_A; ··· 475 475 476 476 srate = params_rate(params); 477 477 ch = params_channels(params); 478 - format = 8 * params_format(params); 478 + format = params_physical_width(params); 479 479 480 480 if (drvdata->amp_codec_id != RT1019) 481 481 return -EINVAL; ··· 616 616 617 617 srate = params_rate(params); 618 618 ch = params_channels(params); 619 - format = 8 * params_format(params); 619 + format = params_physical_width(params); 620 620 621 621 if (drvdata->tdm_mode) 622 622 fmt = SND_SOC_DAIFMT_DSP_A;