X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fisa%2Fad1816a%2Fad1816a_lib.c;fp=sound%2Fisa%2Fad1816a%2Fad1816a_lib.c;h=ac0d808fff570ccd5e2b3a7631de204f17a48a7e;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=8fcf2c151823c8a3de0f429b1b83bfe539a5e7a6;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index 8fcf2c151..ac0d808ff 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c @@ -1,3 +1,4 @@ + /* ad1816a.c - lowlevel code for Analog Devices AD1816A chip. Copyright (C) 1999-2000 by Massimo Piccioni @@ -174,7 +175,7 @@ static void snd_ad1816a_close(struct snd_ad1816a *chip, unsigned int mode) static int snd_ad1816a_trigger(struct snd_ad1816a *chip, unsigned char what, - int channel, int cmd, int iscapture) + int channel, int cmd) { int error = 0; @@ -183,14 +184,10 @@ static int snd_ad1816a_trigger(struct snd_ad1816a *chip, unsigned char what, case SNDRV_PCM_TRIGGER_STOP: spin_lock(&chip->lock); cmd = (cmd == SNDRV_PCM_TRIGGER_START) ? 0xff: 0x00; - /* if (what & AD1816A_PLAYBACK_ENABLE) */ - /* That is not valid, because playback and capture enable - * are the same bit pattern, just to different addresses - */ - if (! iscapture) + if (what & AD1816A_PLAYBACK_ENABLE) snd_ad1816a_out_mask(chip, AD1816A_PLAYBACK_CONFIG, AD1816A_PLAYBACK_ENABLE, cmd); - else + if (what & AD1816A_CAPTURE_ENABLE) snd_ad1816a_out_mask(chip, AD1816A_CAPTURE_CONFIG, AD1816A_CAPTURE_ENABLE, cmd); spin_unlock(&chip->lock); @@ -207,14 +204,14 @@ static int snd_ad1816a_playback_trigger(struct snd_pcm_substream *substream, int { struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); return snd_ad1816a_trigger(chip, AD1816A_PLAYBACK_ENABLE, - SNDRV_PCM_STREAM_PLAYBACK, cmd, 0); + SNDRV_PCM_STREAM_PLAYBACK, cmd); } static int snd_ad1816a_capture_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_ad1816a *chip = snd_pcm_substream_chip(substream); return snd_ad1816a_trigger(chip, AD1816A_CAPTURE_ENABLE, - SNDRV_PCM_STREAM_CAPTURE, cmd, 1); + SNDRV_PCM_STREAM_CAPTURE, cmd); } static int snd_ad1816a_hw_params(struct snd_pcm_substream *substream, @@ -599,7 +596,7 @@ int __devinit snd_ad1816a_create(struct snd_card *card, snd_ad1816a_free(chip); return -EBUSY; } - if (request_irq(irq, snd_ad1816a_interrupt, IRQF_DISABLED, "AD1816A", (void *) chip)) { + if (request_irq(irq, snd_ad1816a_interrupt, SA_INTERRUPT, "AD1816A", (void *) chip)) { snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq); snd_ad1816a_free(chip); return -EBUSY;