ba1b3edda5c69a3eff69d0c8ac8bf05427cea7e5
[openwrt/staging/neocturne.git] /
1 From 89bd4e64da3345c2764a42875b99c96fa8931967 Mon Sep 17 00:00:00 2001
2 From: Joerg Schambacher <joerg@hifiberry.com>
3 Date: Thu, 1 Feb 2024 17:32:44 +0100
4 Subject: [PATCH 1265/1295] ASoC: DACplus - fix 16bit sample support in clock
5 consumer mode
6
7 The former code did not adjust the physical sample width when
8 in clock consumer mode and has taken the fixed 32 bit default.
9 This has caused the audio to be played at half its frequency due to
10 the fixed bclk_ratio of 64.
11
12 Signed-off-by: Joerg Schambacher <joerg@hifiberry.com>
13 ---
14 sound/soc/bcm/hifiberry_dacplus.c | 4 +---
15 1 file changed, 1 insertion(+), 3 deletions(-)
16
17 --- a/sound/soc/bcm/hifiberry_dacplus.c
18 +++ b/sound/soc/bcm/hifiberry_dacplus.c
19 @@ -279,13 +279,11 @@ static int snd_rpi_hifiberry_dacplus_hw_
20 int ret = 0;
21 struct snd_soc_pcm_runtime *rtd = substream->private_data;
22 int channels = params_channels(params);
23 - int width = 32;
24 + int width = snd_pcm_format_physical_width(params_format(params));
25
26 if (snd_rpi_hifiberry_is_dacpro) {
27 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
28
29 - width = snd_pcm_format_physical_width(params_format(params));
30 -
31 snd_rpi_hifiberry_dacplus_set_sclk(component,
32 params_rate(params));
33