openwrt/target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch
Álvaro Fernández Rojas 20fe7e687e bcm27xx: update 6.1 patches from RPi foundation
Sync 6.1 patches with the RPi foundation.
Since rpi-6.6.y is now the main branch of the RPi foundation, there won't be
any new patches for linux 6.1.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-04-07 22:12:42 +02:00

32 lines
1.0 KiB
Diff

From f87bf7dfa65cce1d46800c0769351fef59abba55 Mon Sep 17 00:00:00 2001
From: j-schambacher <joerg@hifiberry.com>
Date: Wed, 13 Mar 2024 10:31:18 +0100
Subject: [PATCH 1292/1295] ASoC: Fix 16bit sample support for Hifiberry
DACplusADC
Same issue as #5919.
'width' needs to be set independent of clocking mode.
Signed-off-by: j-schambacher <joerg@hifiberry.com>
---
sound/soc/bcm/hifiberry_dacplusadc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/sound/soc/bcm/hifiberry_dacplusadc.c
+++ b/sound/soc/bcm/hifiberry_dacplusadc.c
@@ -229,13 +229,11 @@ static int snd_rpi_hifiberry_dacplusadc_
int ret = 0;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
int channels = params_channels(params);
- int width = 32;
+ int width = snd_pcm_format_width(params_format(params));
if (snd_rpi_hifiberry_is_dacpro) {
struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
- width = snd_pcm_format_physical_width(params_format(params));
-
snd_rpi_hifiberry_dacplusadc_set_sclk(component,
params_rate(params));