summaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_pcm.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-14 08:56:01 +0100
committerJaroslav Kysela <perex@perex.cz>2008-01-31 17:29:57 +0100
commit01a3affb2eebfd6c996c36d82bbbc6040eb3a7f1 (patch)
treea80f44ba4a5d6997d932a7d80e9b517064eb2555 /sound/pci/oxygen/oxygen_pcm.c
parent7113e95812f508bff10f95f2e52ce6ee8cda1875 (diff)
[ALSA] oxygen: use an array of snd_kcontrol pointers
Use an array for the pointers to known controls so that it is easier to add more. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen_pcm.c')
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index d4a1d73718e3..5f67a799a034 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -209,11 +209,11 @@ static int oxygen_open(struct snd_pcm_substream *substream,
chip->pcm_active |= 1 << channel;
if (channel == PCM_SPDIF) {
chip->spdif_pcm_bits = chip->spdif_bits;
- chip->spdif_pcm_ctl->vd[0].access &=
+ chip->controls[CONTROL_SPDIF_PCM]->vd[0].access &=
~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |
SNDRV_CTL_EVENT_MASK_INFO,
- &chip->spdif_pcm_ctl->id);
+ &chip->controls[CONTROL_SPDIF_PCM]->id);
}
mutex_unlock(&chip->mutex);
@@ -258,11 +258,11 @@ static int oxygen_close(struct snd_pcm_substream *substream)
mutex_lock(&chip->mutex);
chip->pcm_active &= ~(1 << channel);
if (channel == PCM_SPDIF) {
- chip->spdif_pcm_ctl->vd[0].access |=
+ chip->controls[CONTROL_SPDIF_PCM]->vd[0].access |=
SNDRV_CTL_ELEM_ACCESS_INACTIVE;
snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |
SNDRV_CTL_EVENT_MASK_INFO,
- &chip->spdif_pcm_ctl->id);
+ &chip->controls[CONTROL_SPDIF_PCM]->id);
}
if (channel == PCM_SPDIF || channel == PCM_MULTICH)
oxygen_update_spdif_source(chip);