diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-01-14 02:56:01 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:29:57 -0500 |
commit | 01a3affb2eebfd6c996c36d82bbbc6040eb3a7f1 (patch) | |
tree | a80f44ba4a5d6997d932a7d80e9b517064eb2555 /sound/pci/oxygen/oxygen_pcm.c | |
parent | 7113e95812f508bff10f95f2e52ce6ee8cda1875 (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.c | 8 |
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, | |||
209 | chip->pcm_active |= 1 << channel; | 209 | chip->pcm_active |= 1 << channel; |
210 | if (channel == PCM_SPDIF) { | 210 | if (channel == PCM_SPDIF) { |
211 | chip->spdif_pcm_bits = chip->spdif_bits; | 211 | chip->spdif_pcm_bits = chip->spdif_bits; |
212 | chip->spdif_pcm_ctl->vd[0].access &= | 212 | chip->controls[CONTROL_SPDIF_PCM]->vd[0].access &= |
213 | ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; | 213 | ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; |
214 | snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE | | 214 | snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE | |
215 | SNDRV_CTL_EVENT_MASK_INFO, | 215 | SNDRV_CTL_EVENT_MASK_INFO, |
216 | &chip->spdif_pcm_ctl->id); | 216 | &chip->controls[CONTROL_SPDIF_PCM]->id); |
217 | } | 217 | } |
218 | mutex_unlock(&chip->mutex); | 218 | mutex_unlock(&chip->mutex); |
219 | 219 | ||
@@ -258,11 +258,11 @@ static int oxygen_close(struct snd_pcm_substream *substream) | |||
258 | mutex_lock(&chip->mutex); | 258 | mutex_lock(&chip->mutex); |
259 | chip->pcm_active &= ~(1 << channel); | 259 | chip->pcm_active &= ~(1 << channel); |
260 | if (channel == PCM_SPDIF) { | 260 | if (channel == PCM_SPDIF) { |
261 | chip->spdif_pcm_ctl->vd[0].access |= | 261 | chip->controls[CONTROL_SPDIF_PCM]->vd[0].access |= |
262 | SNDRV_CTL_ELEM_ACCESS_INACTIVE; | 262 | SNDRV_CTL_ELEM_ACCESS_INACTIVE; |
263 | snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE | | 263 | snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE | |
264 | SNDRV_CTL_EVENT_MASK_INFO, | 264 | SNDRV_CTL_EVENT_MASK_INFO, |
265 | &chip->spdif_pcm_ctl->id); | 265 | &chip->controls[CONTROL_SPDIF_PCM]->id); |
266 | } | 266 | } |
267 | if (channel == PCM_SPDIF || channel == PCM_MULTICH) | 267 | if (channel == PCM_SPDIF || channel == PCM_MULTICH) |
268 | oxygen_update_spdif_source(chip); | 268 | oxygen_update_spdif_source(chip); |