1 From 5171b87bdf5a98d8d24f9fd7a5f3b6304e8ce5ad Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Tue, 4 Sep 2018 17:58:31 +0200
4 Subject: [PATCH 441/703] staging: bcm2835-audio: Remove redundant spdif stream
7 commit ab91e26229eaca2832df51e13c1285aea3be33ab upstream.
9 The "IEC958 Playback Stream" control does basically the very same
10 thing as "IEC958 Playback Default" redundantly. The former should
11 have been stream-specific and restored after closing the stream, but
12 we don't do in that way.
14 Since it's nothing but confusion, remove this fake.
16 Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 51 -------------------
21 1 file changed, 51 deletions(-)
23 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
24 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
25 @@ -233,48 +233,6 @@ static int snd_bcm2835_spdif_mask_get(st
29 -static int snd_bcm2835_spdif_stream_info(struct snd_kcontrol *kcontrol,
30 - struct snd_ctl_elem_info *uinfo)
32 - uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958;
37 -static int snd_bcm2835_spdif_stream_get(struct snd_kcontrol *kcontrol,
38 - struct snd_ctl_elem_value *ucontrol)
40 - struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
43 - mutex_lock(&chip->audio_mutex);
45 - for (i = 0; i < 4; i++)
46 - ucontrol->value.iec958.status[i] =
47 - (chip->spdif_status >> (i * 8)) & 0xff;
49 - mutex_unlock(&chip->audio_mutex);
53 -static int snd_bcm2835_spdif_stream_put(struct snd_kcontrol *kcontrol,
54 - struct snd_ctl_elem_value *ucontrol)
56 - struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol);
57 - unsigned int val = 0;
60 - mutex_lock(&chip->audio_mutex);
62 - for (i = 0; i < 4; i++)
63 - val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
64 - change = val != chip->spdif_status;
65 - chip->spdif_status = val;
67 - mutex_unlock(&chip->audio_mutex);
71 static struct snd_kcontrol_new snd_bcm2835_spdif[] = {
73 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
74 @@ -290,15 +248,6 @@ static struct snd_kcontrol_new snd_bcm28
75 .info = snd_bcm2835_spdif_mask_info,
76 .get = snd_bcm2835_spdif_mask_get,
79 - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
80 - SNDRV_CTL_ELEM_ACCESS_INACTIVE,
81 - .iface = SNDRV_CTL_ELEM_IFACE_PCM,
82 - .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, PCM_STREAM),
83 - .info = snd_bcm2835_spdif_stream_info,
84 - .get = snd_bcm2835_spdif_stream_get,
85 - .put = snd_bcm2835_spdif_stream_put,
89 int snd_bcm2835_new_ctl(struct bcm2835_chip *chip)