1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/brcm2708/patches-4.14/0250-ASoC-allo-boss-dac-transmit-S24_LE-with-64-BCLK-cycl.patch
2018-03-23 21:58:08 +01:00

44 lines
1.2 KiB
Diff

From 20e75a222662dbcc91262682c979f2499177e964 Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Thu, 22 Feb 2018 13:07:53 +0100
Subject: [PATCH 250/277] ASoC: allo-boss-dac: transmit S24_LE with 64 BCLK
cycles
Signed-off-by: Matthias Reichl <hias@horus.com>
---
sound/soc/bcm/allo-boss-dac.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/soc/bcm/allo-boss-dac.c b/sound/soc/bcm/allo-boss-dac.c
index 26c37da07017..08b710c7babc 100644
--- a/sound/soc/bcm/allo-boss-dac.c
+++ b/sound/soc/bcm/allo-boss-dac.c
@@ -273,6 +273,8 @@ static int snd_allo_boss_hw_params(
{
int ret = 0;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ int channels = params_channels(params);
+ int width = snd_pcm_format_physical_width(params_format(params));
if (snd_soc_allo_boss_master) {
struct snd_soc_codec *codec = rtd->codec;
@@ -282,7 +284,16 @@ static int snd_allo_boss_hw_params(
ret = snd_allo_boss_update_rate_den(
substream, params);
+ if (ret)
+ return ret;
}
+
+ 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