IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
[sfrench/cifs-2.6.git] / drivers / media / video / saa7134 / saa7134-alsa.c
index f1fd69e7f119ea5220cb44abf5f0e926b7f680bc..4abf5c03a740f14c035d771349bd3ea82159772f 100644 (file)
@@ -212,7 +212,7 @@ static void saa7134_irq_alsa_done(struct saa7134_dev *dev,
  *
  */
 
-static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id)
 {
        struct saa7134_dmasound *dmasound = dev_id;
        struct saa7134_dev *dev = dmasound->priv_data;
@@ -590,6 +590,11 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream)
 
 static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream)
 {
+       snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
+       struct saa7134_dev *dev = saa7134->dev;
+
+       dev->ctl_mute = 1;
+       saa7134_tvaudio_setmute(dev);
        return 0;
 }
 
@@ -631,6 +636,9 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
        runtime->private_free = snd_card_saa7134_runtime_free;
        runtime->hw = snd_card_saa7134_capture;
 
+       dev->ctl_mute = 0;
+       saa7134_tvaudio_setmute(dev);
+
        if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
                return err;
 
@@ -997,9 +1005,9 @@ static int saa7134_alsa_init(void)
        struct saa7134_dev *dev = NULL;
        struct list_head *list;
 
-       if (!dmasound_init && !dmasound_exit) {
-               dmasound_init = alsa_device_init;
-               dmasound_exit = alsa_device_exit;
+       if (!saa7134_dmasound_init && !saa7134_dmasound_exit) {
+               saa7134_dmasound_init = alsa_device_init;
+               saa7134_dmasound_exit = alsa_device_exit;
        } else {
                printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n");
                return -EBUSY;
@@ -1036,8 +1044,8 @@ static void saa7134_alsa_exit(void)
                snd_card_free(snd_saa7134_cards[idx]);
        }
 
-       dmasound_init = NULL;
-       dmasound_exit = NULL;
+       saa7134_dmasound_init = NULL;
+       saa7134_dmasound_exit = NULL;
        printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n");
 
        return;