1 From 11a2b192e0a8b7514895f9f6b7451f4c6ddd0a22 Mon Sep 17 00:00:00 2001
2 From: Matt Flax <flatmax@flatmax.org>
3 Date: Fri, 17 Jul 2020 09:17:36 +1000
4 Subject: [PATCH] Mute bug fix for the Audioinjector.net isolated
8 .../bcm/audioinjector-isolated-soundcard.c | 26 +++----------------
9 1 file changed, 3 insertions(+), 23 deletions(-)
11 --- a/sound/soc/bcm/audioinjector-isolated-soundcard.c
12 +++ b/sound/soc/bcm/audioinjector-isolated-soundcard.c
13 @@ -42,41 +42,20 @@ static int audioinjector_isolated_dai_in
14 int ret=snd_soc_dai_set_sysclk(rtd->codec_dai, 0, 24576000, 0);
18 return snd_soc_dai_set_bclk_ratio(rtd->cpu_dai, 64);
21 static int audioinjector_isolated_startup(struct snd_pcm_substream *substream)
23 snd_pcm_hw_constraint_list(substream->runtime, 0,
24 - SNDRV_PCM_HW_PARAM_RATE, &audioinjector_isolated_constraints);
28 + SNDRV_PCM_HW_PARAM_RATE, &audioinjector_isolated_constraints);
30 -static int audioinjector_isolated_trigger(struct snd_pcm_substream *substream,
34 - case SNDRV_PCM_TRIGGER_STOP:
35 - case SNDRV_PCM_TRIGGER_SUSPEND:
36 - case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
37 - gpiod_set_value(mute_gpio, 0);
39 - case SNDRV_PCM_TRIGGER_START:
40 - case SNDRV_PCM_TRIGGER_RESUME:
41 - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
42 - gpiod_set_value(mute_gpio, 1);
47 + gpiod_set_value(mute_gpio, 1);
51 static struct snd_soc_ops audioinjector_isolated_ops = {
52 .startup = audioinjector_isolated_startup,
53 - .trigger = audioinjector_isolated_trigger,
56 SND_SOC_DAILINK_DEFS(audioinjector_isolated,
57 @@ -153,6 +132,7 @@ static int audioinjector_isolated_probe(
58 dev_err(&pdev->dev, "mute gpio not found in dt overlay\n");
59 return PTR_ERR(mute_gpio);
61 + gpiod_set_value(mute_gpio, 0);
64 ret = devm_snd_soc_register_card(&pdev->dev, card);