diff options
Diffstat (limited to 'sound/sh')
-rw-r--r-- | sound/sh/Kconfig | 2 | ||||
-rw-r--r-- | sound/sh/aica.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sound/sh/Kconfig b/sound/sh/Kconfig index b75fbb3236a7..f5fa09d740b4 100644 --- a/sound/sh/Kconfig +++ b/sound/sh/Kconfig @@ -14,7 +14,7 @@ if SND_SUPERH config SND_AICA tristate "Dreamcast Yamaha AICA sound" - depends on SH_DREAMCAST + depends on SH_DREAMCAST && SH_DMA_API select SND_PCM select G2_DMA help diff --git a/sound/sh/aica.c b/sound/sh/aica.c index 5a93f4587356..f88331a48638 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -469,8 +469,8 @@ static int aica_pcmvolume_info(struct snd_kcontrol *kcontrol, static int aica_pcmvolume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_card_aica *dreamcastcard; - dreamcastcard = kcontrol->private_data; + struct snd_card_aica *dreamcastcard = snd_kcontrol_chip(kcontrol); + if (unlikely(!dreamcastcard->channel)) return -ETXTBSY; /* we've not yet been set up */ ucontrol->value.integer.value[0] = dreamcastcard->channel->vol; @@ -480,9 +480,9 @@ static int aica_pcmvolume_get(struct snd_kcontrol *kcontrol, static int aica_pcmvolume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_card_aica *dreamcastcard; + struct snd_card_aica *dreamcastcard = snd_kcontrol_chip(kcontrol); unsigned int vol; - dreamcastcard = kcontrol->private_data; + if (unlikely(!dreamcastcard->channel)) return -ETXTBSY; vol = ucontrol->value.integer.value[0]; |