mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
|
From ba86793796525f8276fafbaf9d31d5156a2cfcb5 Mon Sep 17 00:00:00 2001
|
||
|
From: Joerg Schambacher <joerg@hifiberry.com>
|
||
|
Date: Fri, 2 Feb 2024 08:51:06 +0100
|
||
|
Subject: [PATCH 1268/1295] 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 <joerg@hifiberry.com>
|
||
|
---
|
||
|
sound/soc/bcm/hifiberry_dacplusadcpro.c | 4 +---
|
||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||
|
|
||
|
--- a/sound/soc/bcm/hifiberry_dacplusadcpro.c
|
||
|
+++ b/sound/soc/bcm/hifiberry_dacplusadcpro.c
|
||
|
@@ -383,15 +383,13 @@ static int snd_rpi_hifiberry_dacplusadcp
|
||
|
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_physical_width(params_format(params));
|
||
|
struct snd_soc_component *dac = asoc_rtd_to_codec(rtd, 0)->component;
|
||
|
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
|
||
|
struct snd_soc_dai_driver *drv = dai->driver;
|
||
|
const struct snd_soc_dai_ops *ops = drv->ops;
|
||
|
|
||
|
if (snd_rpi_hifiberry_is_dacpro) {
|
||
|
- width = snd_pcm_format_physical_width(params_format(params));
|
||
|
-
|
||
|
snd_rpi_hifiberry_dacplusadcpro_set_sclk(dac,
|
||
|
params_rate(params));
|
||
|
|