You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
freifunkist-firmware/target/linux/brcm2708/patches-4.14/950-0230-ASoC-allo-boss-dac...

39 lines
1.1 KiB

From 1d5b2b562fd800069f4090142e201d696ad1122a Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Thu, 22 Feb 2018 13:07:53 +0100
Subject: [PATCH 230/454] 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(+)
--- 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;
}