mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
|
From 05a5419c9e0ec993bc8dafd60e9fbe6c04e9e8c0 Mon Sep 17 00:00:00 2001
|
||
|
From: Matthias Reichl <hias@horus.com>
|
||
|
Date: Thu, 22 Feb 2018 13:09:30 +0100
|
||
|
Subject: [PATCH 231/454] 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(+)
|
||
|
|
||
|
--- 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_
|
||
|
{
|
||
|
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;
|
||
|
}
|
||
|
|