diff options
author | Dylan Reid <dgreid@chromium.org> | 2014-02-28 23:41:29 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-03-01 10:23:24 (GMT) |
commit | f0b1df88713a3537e056658d860f6631653ec5c6 (patch) | |
tree | f3f8904494c6a15c4ebbf58e9b205f44d2904998 /sound/pci/hda/hda_intel.c | |
parent | 7ca954a86b1f2e42af9299eb2ac142bcb5c9bd67 (diff) | |
download | linux-f0b1df88713a3537e056658d860f6631653ec5c6.tar.xz |
ALSA: hda - Move azx_interrupt to hda_controller
This code will be reused by an hda_platform driver as it has no PCI
dependencies. This allows update_rirb to be static as all users are
now in hda_controller.c.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 53e4b40..96c22a3a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -413,7 +413,6 @@ static void azx_init_pci(struct azx *chip) } } - static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev); /* called from IRQ */ @@ -434,70 +433,6 @@ static int azx_position_check(struct azx *chip, struct azx_dev *azx_dev) } /* - * interrupt handler - */ -static irqreturn_t azx_interrupt(int irq, void *dev_id) -{ - struct azx *chip = dev_id; - struct azx_dev *azx_dev; - u32 status; - u8 sd_status; - int i; - -#ifdef CONFIG_PM_RUNTIME - if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME) - if (chip->card->dev->power.runtime_status != RPM_ACTIVE) - return IRQ_NONE; -#endif - - spin_lock(&chip->reg_lock); - - if (chip->disabled) { - spin_unlock(&chip->reg_lock); - return IRQ_NONE; - } - - status = azx_readl(chip, INTSTS); - if (status == 0 || status == 0xffffffff) { - spin_unlock(&chip->reg_lock); - return IRQ_NONE; - } - - for (i = 0; i < chip->num_streams; i++) { - azx_dev = &chip->azx_dev[i]; - if (status & azx_dev->sd_int_sta_mask) { - sd_status = azx_sd_readb(chip, azx_dev, SD_STS); - azx_sd_writeb(chip, azx_dev, SD_STS, SD_INT_MASK); - if (!azx_dev->substream || !azx_dev->running || - !(sd_status & SD_INT_COMPLETE)) - continue; - /* check whether this IRQ is really acceptable */ - if (!chip->ops->position_check || - chip->ops->position_check(chip, azx_dev)) { - spin_unlock(&chip->reg_lock); - snd_pcm_period_elapsed(azx_dev->substream); - spin_lock(&chip->reg_lock); - } - } - } - - /* clear rirb int */ - status = azx_readb(chip, RIRBSTS); - if (status & RIRB_INT_MASK) { - if (status & RIRB_INT_RESPONSE) { - if (chip->driver_caps & AZX_DCAPS_RIRB_PRE_DELAY) - udelay(80); - azx_update_rirb(chip); - } - azx_writeb(chip, RIRBSTS, RIRB_INT_MASK); - } - - spin_unlock(&chip->reg_lock); - - return IRQ_HANDLED; -} - -/* * Probe the given codec address */ static int probe_codec(struct azx *chip, int addr) |