3d9fb8acdb2e9392d89afeb3c14bf37e4765aed4
[openwrt/staging/lynxis.git] / target / linux / brcm2708 / patches-4.14 / 950-0213-ASoC-dionaudio_loco-v2-fix-S24_LE-format.patch
1 From 12e578b16bb6aa097a6d451a371fd6ade3d07b5d Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Fri, 2 Feb 2018 20:30:42 +0100
4 Subject: [PATCH 213/454] ASoC: dionaudio_loco-v2: fix S24_LE format
5
6 Remove set_bclk_ratio call so 24-bit data is transmitted in
7 24 bclk cycles.
8
9 Also remove hw_params and ops as they are no longer needed.
10
11 Signed-off-by: Matthias Reichl <hias@horus.com>
12 ---
13 sound/soc/bcm/dionaudio_loco-v2.c | 19 -------------------
14 1 file changed, 19 deletions(-)
15
16 --- a/sound/soc/bcm/dionaudio_loco-v2.c
17 +++ b/sound/soc/bcm/dionaudio_loco-v2.c
18 @@ -41,24 +41,6 @@ static int snd_rpi_dionaudio_loco_v2_ini
19 return 0;
20 }
21
22 -static int snd_rpi_dionaudio_loco_v2_hw_params(
23 - struct snd_pcm_substream *substream,
24 - struct snd_pcm_hw_params *params)
25 -{
26 - struct snd_soc_pcm_runtime *rtd = substream->private_data;
27 - struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
28 -
29 - unsigned int sample_bits =
30 - snd_pcm_format_physical_width(params_format(params));
31 -
32 - return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
33 -}
34 -
35 -/* machine stream operations */
36 -static struct snd_soc_ops snd_rpi_dionaudio_loco_v2_ops = {
37 - .hw_params = snd_rpi_dionaudio_loco_v2_hw_params,
38 -};
39 -
40 static struct snd_soc_dai_link snd_rpi_dionaudio_loco_v2_dai[] = {
41 {
42 .name = "DionAudio LOCO-V2",
43 @@ -69,7 +51,6 @@ static struct snd_soc_dai_link snd_rpi_d
44 .codec_name = "pcm512x.1-004d",
45 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
46 SND_SOC_DAIFMT_CBS_CFS,
47 - .ops = &snd_rpi_dionaudio_loco_v2_ops,
48 .init = snd_rpi_dionaudio_loco_v2_init,
49 },};
50