Skip to content

Commit ba86793

Browse files
j-schambacherpelwell
authored andcommitted
ASoC: DACplusADCPro - fix 16bit sample support in clock consumer mode
The former code did not adjust the physical sample width when in clock consumer mode and has taken the fixed 32 bit default. This has caused the audio to be played at half its frequency due to the fixed bclk_ratio of 64. Problem appears only on PI5 as on the former PIs the I2S module did simply run at fixed 64x rate. Signed-off-by: Joerg Schambacher <[email protected]>
1 parent 98ac9b8 commit ba86793

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sound/soc/bcm/hifiberry_dacplusadcpro.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,13 @@ static int snd_rpi_hifiberry_dacplusadcpro_hw_params(
383383
int ret = 0;
384384
struct snd_soc_pcm_runtime *rtd = substream->private_data;
385385
int channels = params_channels(params);
386-
int width = 32;
386+
int width = snd_pcm_format_physical_width(params_format(params));
387387
struct snd_soc_component *dac = asoc_rtd_to_codec(rtd, 0)->component;
388388
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
389389
struct snd_soc_dai_driver *drv = dai->driver;
390390
const struct snd_soc_dai_ops *ops = drv->ops;
391391

392392
if (snd_rpi_hifiberry_is_dacpro) {
393-
width = snd_pcm_format_physical_width(params_format(params));
394-
395393
snd_rpi_hifiberry_dacplusadcpro_set_sclk(dac,
396394
params_rate(params));
397395

0 commit comments

Comments
 (0)