mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
From 18de3dcc2a6786c25a3527bc1e655f3b1ccdbcaa Mon Sep 17 00:00:00 2001
|
|
From: Matthias Reichl <hias@horus.com>
|
|
Date: Thu, 22 Feb 2018 13:09:30 +0100
|
|
Subject: [PATCH 251/277] ASoC: hifiberry_dacplus: transmit S24_LE with 64 BCLK
|
|
cycles
|
|
|
|
Signed-off-by: Matthias Reichl <hias@horus.com>
|
|
---
|
|
sound/soc/bcm/hifiberry_dacplus.c | 11 +++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/sound/soc/bcm/hifiberry_dacplus.c b/sound/soc/bcm/hifiberry_dacplus.c
|
|
index b32dae9d3b1d..e36c4ba1e9a6 100644
|
|
--- a/sound/soc/bcm/hifiberry_dacplus.c
|
|
+++ b/sound/soc/bcm/hifiberry_dacplus.c
|
|
@@ -221,16 +221,27 @@ static int snd_rpi_hifiberry_dacplus_hw_params(
|
|
{
|
|
int ret = 0;
|
|
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
|
+ int channels = params_channels(params);
|
|
+ int width = 32;
|
|
|
|
if (snd_rpi_hifiberry_is_dacpro) {
|
|
struct snd_soc_codec *codec = rtd->codec;
|
|
|
|
+ width = snd_pcm_format_physical_width(params_format(params));
|
|
+
|
|
snd_rpi_hifiberry_dacplus_set_sclk(codec,
|
|
params_rate(params));
|
|
|
|
ret = snd_rpi_hifiberry_dacplus_update_rate_den(
|
|
substream, params);
|
|
}
|
|
+
|
|
+ ret = snd_soc_dai_set_tdm_slot(rtd->cpu_dai, 0x03, 0x03,
|
|
+ channels, width);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+ ret = snd_soc_dai_set_tdm_slot(rtd->codec_dai, 0x03, 0x03,
|
|
+ channels, width);
|
|
return ret;
|
|
}
|
|
|
|
--
|
|
2.16.1
|
|
|