[alsa-devel] [PATCH 00/55] ALSA: Support PCM sync_stop
Hi,
this is the last episode of the trilogy of PCM enhancements for non-ASoC drivers.
Basically this either adds the setup for card->sync_irq and removes the superfluous synchronize_irq() calls, or replaces the synchronization code with the new sync_irq PCM ops.
For the explanation about PCM ssync_stop and card sync_irq, see the commits: 1e850beea2781d30418743dd99250291cef37919 ALSA: pcm: Add the support for sync-stop operation fabb26dcd104027b971c018275fe40f2ebe09ae3 ALSA: pcm: Add card sync_irq field
thanks,
Takashi
===
Takashi Iwai (55): ALSA: ad1889: Support PCM sync_stop ALSA: ali5451: Support PCM sync_stop ALSA: als300: Support PCM sync_stop ALSA: atiixp: Support PCM sync_stop ALSA: au88x0: Support PCM sync_stop ALSA: aw2: Support PCM sync_stop ALSA: azt3328: Support PCM sync_stop ALSA: bt87x: Support PCM sync_stop ALSA: ca0106: Support PCM sync_stop ALSA: cmipci: Support PCM sync_stop ALSA: cs4281: Support PCM sync_stop ALSA: cs46xx: Support PCM sync_stop ALSA: cs5535audio: Support PCM sync_stop ALSA: ctxfi: Support PCM sync_stop ALSA: echoaudio: Support PCM sync_stop ALSA: emu10k1: Support PCM sync_stop ALSA: ens137x: Support PCM sync_stop ALSA: es1938: Support PCM sync_stop ALSA: es1968: Support PCM sync_stop ALSA: fm801: Support PCM sync_stop ALSA: hda: Support PCM sync_stop ALSA: ice1712: Support PCM sync_stop ALSA: ice1724: Support PCM sync_stop ALSA: intel8x0: Support PCM sync_stop ALSA: korg1212: Support PCM sync_stop ALSA: lola: Support PCM sync_stop ALSA: maestro3: Support PCM sync_stop ALSA: nm256: Support PCM sync_stop ALSA: oxygen: Support PCM sync_stop ALSA: riptide: Support PCM sync_stop ALSA: rme32: Support PCM sync_stop ALSA: rme96: Support PCM sync_stop ALSA: rme9652: Support PCM sync_stop ALSA: sis7019: Support PCM sync_stop ALSA: sonicvibes: Support PCM sync_stop ALSA: trident: Support PCM sync_stop ALSA: via82xx: Support PCM sync_stop ALSA: ymfpci: Support PCM sync_stop ALSA: ad1816a: Support PCM sync_stop ALSA: es1688: Support PCM sync_stop ALSA: es18xx: Support PCM sync_stop ALSA: gus: Support PCM sync_stop ALSA: msnd: Support PCM sync_stop ALSA: opl3sa2: Support PCM sync_stop ALSA: opti9xx: Support PCM sync_stop ALSA: sb: Support PCM sync_stop ALSA: wavefront: Support PCM sync_stop ALSA: wss: Support PCM sync_stop ALSA: lx6464es: Support PCM sync_stop ALSA: mixart: Support PCM sync_stop ALSA: pcxhr: Support PCM sync_stop ALSA: vx222: Support PCM sync_stop ALSA: pdaudiocf: Support PCM sync_stop ALSA: vxpocket: Support PCM sync_stop ALSA: usb-audio: Support PCM sync_stop
sound/isa/ad1816a/ad1816a_lib.c | 1 + sound/isa/es1688/es1688_lib.c | 1 + sound/isa/es18xx.c | 1 + sound/isa/gus/gus_main.c | 1 + sound/isa/gus/gusmax.c | 3 ++- sound/isa/gus/interwave.c | 1 + sound/isa/msnd/msnd_pinnacle.c | 1 + sound/isa/opl3sa2.c | 1 + sound/isa/opti9xx/opti92x-ad1848.c | 1 + sound/isa/sb/sb_common.c | 1 + sound/isa/wavefront/wavefront.c | 1 + sound/isa/wss/wss_lib.c | 1 + sound/pci/ad1889.c | 2 +- sound/pci/ali5451/ali5451.c | 3 +-- sound/pci/als300.c | 2 +- sound/pci/atiixp.c | 2 +- sound/pci/atiixp_modem.c | 2 +- sound/pci/au88x0/au88x0.c | 1 + sound/pci/aw2/aw2-alsa.c | 1 + sound/pci/azt3328.c | 2 +- sound/pci/bt87x.c | 2 +- sound/pci/ca0106/ca0106_main.c | 1 + sound/pci/cmipci.c | 1 + sound/pci/cs4281.c | 5 +---- sound/pci/cs46xx/cs46xx_lib.c | 1 + sound/pci/cs5535audio/cs5535audio.c | 2 +- sound/pci/ctxfi/cthw20k1.c | 4 +--- sound/pci/ctxfi/cthw20k2.c | 1 + sound/pci/echoaudio/echoaudio.c | 3 +++ sound/pci/emu10k1/emu10k1_main.c | 1 + sound/pci/emu10k1/emu10k1x.c | 1 + sound/pci/ens1370.c | 4 +--- sound/pci/es1938.c | 3 +++ sound/pci/es1968.c | 3 +-- sound/pci/fm801.c | 1 + sound/pci/hda/hda_intel.c | 4 +++- sound/pci/hda/hda_tegra.c | 4 +--- sound/pci/ice1712/ice1712.c | 2 +- sound/pci/ice1712/ice1724.c | 2 +- sound/pci/intel8x0.c | 4 +++- sound/pci/intel8x0m.c | 3 +++ sound/pci/korg1212/korg1212.c | 1 + sound/pci/lola/lola.c | 2 +- sound/pci/lx6464es/lx6464es.c | 1 + sound/pci/maestro3.c | 1 + sound/pci/mixart/mixart.c | 1 + sound/pci/nm256/nm256.c | 2 ++ sound/pci/oxygen/oxygen_lib.c | 2 +- sound/pci/pcxhr/pcxhr.c | 1 + sound/pci/riptide/riptide.c | 1 + sound/pci/rme32.c | 1 + sound/pci/rme96.c | 1 + sound/pci/rme9652/hdsp.c | 1 + sound/pci/rme9652/hdspm.c | 1 + sound/pci/rme9652/rme9652.c | 1 + sound/pci/sis7019.c | 1 + sound/pci/sonicvibes.c | 1 + sound/pci/trident/trident_main.c | 1 + sound/pci/via82xx.c | 3 +-- sound/pci/via82xx_modem.c | 3 +-- sound/pci/vx222/vx222.c | 1 + sound/pci/ymfpci/ymfpci_main.c | 1 + sound/pcmcia/pdaudiocf/pdaudiocf.c | 1 + sound/pcmcia/vx/vxpocket.c | 1 + sound/usb/pcm.c | 37 +++++++++++++++++++++++++------------ 65 files changed, 101 insertions(+), 47 deletions(-)
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ad1889.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index 4b902c163fd3..7770157a3a8c 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c @@ -899,7 +899,7 @@ snd_ad1889_create(struct snd_card *card, }
chip->irq = pci->irq; - synchronize_irq(chip->irq); + card->sync_irq = chip->irq;
/* (2) initialization of the chip hardware */ if ((err = snd_ad1889_init(chip)) < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ali5451/ali5451.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index 2cf37670e9a9..9f78cf9e0b47 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c @@ -2026,6 +2026,7 @@ static int snd_ali_resources(struct snd_ali *codec) return -EBUSY; } codec->irq = codec->pci->irq; + codec->card->sync_irq = codec->irq; dev_dbg(codec->card->dev, "resources allocated.\n"); return 0; } @@ -2099,8 +2100,6 @@ static int snd_ali_create(struct snd_card *card, return -EBUSY; }
- synchronize_irq(pci->irq); - codec->synth.chmap = 0; codec->synth.chcnt = 0; codec->spdif_mask = 0;
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/als300.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 0fb84d1d1dbe..6573a2259cb6 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c @@ -664,7 +664,7 @@ static int snd_als300_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; - + card->sync_irq = chip->irq;
snd_als300_init(chip);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/atiixp.c | 2 +- sound/pci/atiixp_modem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 977cdaf92f53..684b4f18e52c 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c @@ -1597,8 +1597,8 @@ static int snd_atiixp_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; pci_set_master(pci); - synchronize_irq(chip->irq);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_atiixp_free(chip); diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index a27ce41f10d3..40cda5c3bfeb 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c @@ -1227,8 +1227,8 @@ static int snd_atiixp_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; pci_set_master(pci); - synchronize_irq(chip->irq);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_atiixp_free(chip);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/au88x0/au88x0.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 782333c90223..c9e0159af2b1 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -202,6 +202,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) goto irq_out; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
pci_set_master(pci); // End of PCI setup.
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/aw2/aw2-alsa.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c index 7df55797c2f6..819b148573a6 100644 --- a/sound/pci/aw2/aw2-alsa.c +++ b/sound/pci/aw2/aw2-alsa.c @@ -287,6 +287,7 @@ static int snd_aw2_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); if (err < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/azt3328.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 1a852d893e98..b36e7a64e268 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c @@ -2423,8 +2423,8 @@ snd_azf3328_create(struct snd_card *card, goto out_err; } chip->irq = pci->irq; + card->sync_irq = chip->irq; pci_set_master(pci); - synchronize_irq(chip->irq);
snd_azf3328_debug_show_ports(chip);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/bt87x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index de4af1ab87c6..2e16604c31ce 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c @@ -751,8 +751,8 @@ static int snd_bt87x_create(struct snd_card *card, goto fail; } chip->irq = pci->irq; + card->sync_irq = chip->irq; pci_set_master(pci); - synchronize_irq(chip->irq);
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); if (err < 0)
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ca0106/ca0106_main.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 9466ee9d2f42..a14e9b1e50b0 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -1638,6 +1638,7 @@ static int snd_ca0106_create(int dev, struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
/* This stores the periods table. */ if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/cmipci.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 0e0f528805bf..4bfab21c53f4 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -3024,6 +3024,7 @@ static int snd_cmipci_create(struct snd_card *card, struct pci_dev *pci, return -EBUSY; } cm->irq = pci->irq; + card->sync_irq = cm->irq;
pci_set_master(cm->pci);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/cs4281.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index 0dcb2d15b560..e7294b9d2cb6 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c @@ -1268,9 +1268,6 @@ static int snd_cs4281_free(struct cs4281 *chip) { snd_cs4281_free_gameport(chip);
- if (chip->irq >= 0) - synchronize_irq(chip->irq); - /* Mask interrupts */ snd_cs4281_pokeBA0(chip, BA0_HIMR, 0x7fffffff); /* Stop the DLL Clock logic. */ @@ -1352,6 +1349,7 @@ static int snd_cs4281_create(struct snd_card *card, return -ENOMEM; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
tmp = snd_cs4281_chip_init(chip); if (tmp) { @@ -1600,7 +1598,6 @@ static int snd_cs4281_chip_init(struct cs4281 *chip) BA0_HISR_DMA(1) | BA0_HISR_DMA(2) | BA0_HISR_DMA(3))); - synchronize_irq(chip->irq);
return 0; }
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/cs46xx/cs46xx_lib.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 1192115b71ef..adfc750bc61c 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -3989,6 +3989,7 @@ int snd_cs46xx_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
#ifdef CONFIG_SND_CS46XX_NEW_DSP chip->dsp_spos_instance = cs46xx_dsp_spos_create(chip);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/cs5535audio/cs5535audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 68db7dec90b3..15126aff63fc 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c @@ -237,7 +237,6 @@ static irqreturn_t snd_cs5535audio_interrupt(int irq, void *dev_id)
static int snd_cs5535audio_free(struct cs5535audio *cs5535au) { - synchronize_irq(cs5535au->irq); pci_set_power_state(cs5535au->pci, PCI_D3hot);
if (cs5535au->irq >= 0) @@ -303,6 +302,7 @@ static int snd_cs5535audio_create(struct snd_card *card, }
cs5535au->irq = pci->irq; + card->sync_irq = cs5535au->irq; pci_set_master(pci);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ctxfi/cthw20k1.c | 4 +--- sound/pci/ctxfi/cthw20k2.c | 1 + 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c index 4ff7ecd92709..6e3177bcc709 100644 --- a/sound/pci/ctxfi/cthw20k1.c +++ b/sound/pci/ctxfi/cthw20k1.c @@ -1937,6 +1937,7 @@ static int hw_card_start(struct hw *hw) goto error2; } hw->irq = pci->irq; + hw->card->sync_irq = hw->irq; }
pci_set_master(pci); @@ -1962,9 +1963,6 @@ static int hw_card_stop(struct hw *hw) data = hw_read_20kx(hw, PLLCTL); hw_write_20kx(hw, PLLCTL, (data & (~(0x0F<<12))));
- /* TODO: Disable interrupt and so on... */ - if (hw->irq >= 0) - synchronize_irq(hw->irq); return 0; }
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 3cd4b7dad945..ce44cbe6459f 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c @@ -2061,6 +2061,7 @@ static int hw_card_start(struct hw *hw) goto error2; } hw->irq = pci->irq; + hw->card->sync_irq = hw->irq; }
pci_set_master(pci);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/echoaudio/echoaudio.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index bfc3ffffb917..a9ac9fc635aa 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -1928,6 +1928,7 @@ static int snd_echo_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; dev_dbg(card->dev, "pci=%p irq=%d subdev=%04x Init hardware...\n", chip->pci, chip->irq, chip->pci->subsystem_device);
@@ -2151,6 +2152,7 @@ static int snd_echo_suspend(struct device *dev) chip->dsp_code = NULL; free_irq(chip->irq, chip); chip->irq = -1; + chip->card->sync_irq = -1; return 0; }
@@ -2204,6 +2206,7 @@ static int snd_echo_resume(struct device *dev) return -EBUSY; } chip->irq = pci->irq; + chip->card->sync_irq = chip->irq; dev_dbg(dev, "resume irq=%d\n", chip->irq);
#ifdef ECHOCARD_HAS_MIDI
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/emu10k1/emu10k1_main.c | 1 + sound/pci/emu10k1/emu10k1x.c | 1 + 2 files changed, 2 insertions(+)
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 8c1e968b9c96..65e9ec94b807 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -1984,6 +1984,7 @@ int snd_emu10k1_create(struct snd_card *card, goto error; } emu->irq = pci->irq; + card->sync_irq = emu->irq;
/* * Init to 0x02109204 : diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 19fc74e94727..6467142ec460 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c @@ -930,6 +930,7 @@ static int snd_emu10k1x_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev, 4 * 1024, &chip->dma_buffer) < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ens1370.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index f69555c95263..378141aa7c7d 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c @@ -1888,8 +1888,6 @@ static int snd_ensoniq_free(struct ensoniq *ensoniq) outl(0, ES_REG(ensoniq, CONTROL)); /* switch everything off */ outl(0, ES_REG(ensoniq, SERIAL)); /* clear serial interface */ #endif - if (ensoniq->irq >= 0) - synchronize_irq(ensoniq->irq); pci_set_power_state(ensoniq->pci, PCI_D3hot); __hw_end: #ifdef CHIP1370 @@ -1990,7 +1988,6 @@ static void snd_ensoniq_chip_init(struct ensoniq *ensoniq) outb(ensoniq->uartc = 0x00, ES_REG(ensoniq, UART_CONTROL)); outb(0x00, ES_REG(ensoniq, UART_RES)); outl(ensoniq->cssr, ES_REG(ensoniq, STATUS)); - synchronize_irq(ensoniq->irq); }
#ifdef CONFIG_PM_SLEEP @@ -2074,6 +2071,7 @@ static int snd_ensoniq_create(struct snd_card *card, return -EBUSY; } ensoniq->irq = pci->irq; + card->sync_irq = ensoniq->irq; #ifdef CHIP1370 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev, 16, &ensoniq->dma_bug) < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/es1938.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index ae405bc38c65..d9fba07d36d0 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c @@ -1444,6 +1444,7 @@ static int es1938_suspend(struct device *dev) if (chip->irq >= 0) { free_irq(chip->irq, chip); chip->irq = -1; + card->sync_irq = -1; } return 0; } @@ -1463,6 +1464,7 @@ static int es1938_resume(struct device *dev) return -EIO; } chip->irq = pci->irq; + card->sync_irq = chip->irq; snd_es1938_chip_init(chip);
/* restore mixer-related registers */ @@ -1591,6 +1593,7 @@ static int snd_es1938_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; dev_dbg(card->dev, "create: io: 0x%lx, sb: 0x%lx, vc: 0x%lx, mpu: 0x%lx, game: 0x%lx\n", chip->io_port, chip->sb_port, chip->vc_port, chip->mpu_port, chip->game_port);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/es1968.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 4f5063ebce89..3610aa1da94c 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c @@ -2602,8 +2602,6 @@ static int snd_es1968_free(struct es1968 *chip) #endif
if (chip->io_port) { - if (chip->irq >= 0) - synchronize_irq(chip->irq); outw(1, chip->io_port + 0x04); /* clear WP interrupts */ outw(0, chip->io_port + ESM_PORT_HOST_IRQ); /* disable IRQ */ } @@ -2712,6 +2710,7 @@ static int snd_es1968_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; /* Clear Maestro_map */ for (i = 0; i < 32; i++)
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/fm801.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 3ea10c972682..152fbc352123 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c @@ -1223,6 +1223,7 @@ static int snd_fm801_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; pci_set_master(pci); }
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/hda/hda_intel.c | 4 +++- sound/pci/hda/hda_tegra.c | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 35b4526f0d28..d225d4baba9e 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -790,6 +790,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect) return -1; } bus->irq = chip->pci->irq; + chip->card->sync_irq = bus->irq; pci_intx(chip->pci, !chip->msi); return 0; } @@ -1028,6 +1029,7 @@ static int azx_suspend(struct device *dev) if (bus->irq >= 0) { free_irq(bus->irq, chip); bus->irq = -1; + chip->card->sync_irq = -1; }
if (chip->msi) @@ -1884,7 +1886,6 @@ static int azx_first_init(struct azx *chip) }
pci_set_master(pci); - synchronize_irq(bus->irq);
gcap = azx_readw(chip, GCAP); dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap); @@ -2043,6 +2044,7 @@ static int disable_msi_reset_irq(struct azx *chip)
free_irq(bus->irq, chip); bus->irq = -1; + chip->card->sync_irq = -1; pci_disable_msi(chip->pci); chip->msi = 0; err = azx_acquire_irq(chip, 1); diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index 8350954b7986..fc2e0a294bc1 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -170,7 +170,6 @@ static int __maybe_unused hda_tegra_runtime_suspend(struct device *dev)
if (chip && chip->running) { azx_stop_chip(chip); - synchronize_irq(bus->irq); azx_enter_link_reset(chip); } hda_tegra_disable_clocks(hda); @@ -298,8 +297,7 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev) return err; } bus->irq = irq_id; - - synchronize_irq(bus->irq); + card->sync_irq = bus->irq;
gcap = azx_readw(chip, GCAP); dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ice1712/ice1712.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index d6e55bf0df16..ffacf5e6ac9a 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c @@ -2528,7 +2528,6 @@ static int snd_ice1712_create(struct snd_card *card, pci_write_config_word(ice->pci, 0x40, 0x807f); pci_write_config_word(ice->pci, 0x42, 0x0006); snd_ice1712_proc_init(ice); - synchronize_irq(pci->irq);
card->private_data = ice;
@@ -2551,6 +2550,7 @@ static int snd_ice1712_create(struct snd_card *card, }
ice->irq = pci->irq; + card->sync_irq = ice->irq;
if (snd_ice1712_read_eeprom(ice, modelname) < 0) { snd_ice1712_free(ice);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ice1712/ice1724.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index d5590a82e7fd..14e4da08adfd 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c @@ -2534,7 +2534,6 @@ static int snd_vt1724_create(struct snd_card *card, ice->irq = -1; pci_set_master(pci); snd_vt1724_proc_init(ice); - synchronize_irq(pci->irq);
card->private_data = ice;
@@ -2555,6 +2554,7 @@ static int snd_vt1724_create(struct snd_card *card, }
ice->irq = pci->irq; + card->sync_irq = ice->irq;
snd_vt1724_chip_reset(ice); if (snd_vt1724_read_eeprom(ice, modelname) < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/intel8x0.c | 4 +++- sound/pci/intel8x0m.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 2a3551deee74..f88008465c44 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -2592,6 +2592,7 @@ static int intel8x0_suspend(struct device *dev) if (chip->irq >= 0) { free_irq(chip->irq, chip); chip->irq = -1; + card->sync_irq = -1; } return 0; } @@ -2612,7 +2613,7 @@ static int intel8x0_resume(struct device *dev) return -EIO; } chip->irq = pci->irq; - synchronize_irq(chip->irq); + card->sync_irq = chip->irq;
/* re-initialize mixer stuff */ if (chip->device_type == DEVICE_INTEL_ICH4 && !spdif_aclink) { @@ -3092,6 +3093,7 @@ static int snd_intel8x0_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_intel8x0_free(chip); diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 13dd3d873e95..2f73b45c845c 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c @@ -999,6 +999,7 @@ static int intel8x0m_suspend(struct device *dev) if (chip->irq >= 0) { free_irq(chip->irq, chip); chip->irq = -1; + card->sync_irq = -1; } return 0; } @@ -1017,6 +1018,7 @@ static int intel8x0m_resume(struct device *dev) return -EIO; } chip->irq = pci->irq; + card->sync_irq = chip->irq; snd_intel8x0m_chip_init(chip, 0); snd_ac97_resume(chip->ac97);
@@ -1191,6 +1193,7 @@ static int snd_intel8x0m_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_intel8x0m_free(chip);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/korg1212/korg1212.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 2b8204a13c69..5d48ff0b32a7 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -2237,6 +2237,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci, }
korg1212->irq = pci->irq; + card->sync_irq = korg1212->irq;
pci_set_master(korg1212->pci);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/lola/lola.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index 21ac9d003e8e..e7c620caa935 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c @@ -638,7 +638,7 @@ static int lola_create(struct snd_card *card, struct pci_dev *pci, goto errout; } chip->irq = pci->irq; - synchronize_irq(chip->irq); + card->sync_irq = chip->irq;
dever = lola_readl(chip, BAR1, DEVER); chip->pcm[CAPT].num_streams = (dever >> 0) & 0x3ff;
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/maestro3.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 501f1871f776..9f75cc0c01dd 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c @@ -2633,6 +2633,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci, goto free_chip; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
#ifdef CONFIG_PM_SLEEP chip->suspend_mem =
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/nm256/nm256.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 02767f33deb7..ac194485aa78 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c @@ -460,6 +460,7 @@ static int snd_nm256_acquire_irq(struct nm256 *chip) return -EBUSY; } chip->irq = chip->pci->irq; + chip->card->sync_irq = chip->irq; } chip->irq_acks++; mutex_unlock(&chip->irq_mutex); @@ -475,6 +476,7 @@ static void snd_nm256_release_irq(struct nm256 *chip) if (chip->irq_acks == 0 && chip->irq >= 0) { free_irq(chip->irq, chip); chip->irq = -1; + chip->card->sync_irq = -1; } mutex_unlock(&chip->irq_mutex); }
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/oxygen/oxygen_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index ed65d9fd4938..afc6dd329c09 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c @@ -661,6 +661,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, goto err_card; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
strcpy(card->driver, chip->model.chip); strcpy(card->shortname, chip->model.shortname); @@ -743,7 +744,6 @@ static int oxygen_pci_suspend(struct device *dev) oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0); spin_unlock_irq(&chip->reg_lock);
- synchronize_irq(chip->irq); flush_work(&chip->spdif_input_bits_work); flush_work(&chip->gpio_work); chip->interrupt_mask = saved_interrupt_mask;
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/riptide/riptide.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index be0283f8bda0..af6956e26c29 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c @@ -1864,6 +1864,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; chip->device_id = pci->device; pci_set_master(pci); if ((err = snd_riptide_initialize(chip)) < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/rme32.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 849eede15f8e..15029b2be233 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c @@ -1330,6 +1330,7 @@ static int snd_rme32_create(struct rme32 *rme32) return -EBUSY; } rme32->irq = pci->irq; + rme32->card->sync_irq = rme32->irq;
/* read the card's revision number */ pci_read_config_byte(pci, 8, &rme32->rev);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/rme96.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index f52195791a8b..537381632be7 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c @@ -1629,6 +1629,7 @@ snd_rme96_create(struct rme96 *rme96) return -EBUSY; } rme96->irq = pci->irq; + rme96->card->sync_irq = rme96->irq;
/* read the card's revision number */ pci_read_config_byte(pci, 8, &rme96->rev);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/rme9652/hdsp.c | 1 + sound/pci/rme9652/hdspm.c | 1 + sound/pci/rme9652/rme9652.c | 1 + 3 files changed, 3 insertions(+)
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index cd20af465d8e..87e60dd13066 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -5233,6 +5233,7 @@ static int snd_hdsp_create(struct snd_card *card, }
hdsp->irq = pci->irq; + card->sync_irq = hdsp->irq; hdsp->precise_ptr = 0; hdsp->use_midi_tasklet = 1; hdsp->dds_value = 0; diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 75c06a7cc779..56ae14c90a2c 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c @@ -6613,6 +6613,7 @@ static int snd_hdspm_create(struct snd_card *card, dev_dbg(card->dev, "use IRQ %d\n", pci->irq);
hdspm->irq = pci->irq; + card->sync_irq = hdspm->irq;
dev_dbg(card->dev, "kmalloc Mixer memory of %zd Bytes\n", sizeof(*hdspm->mixer)); diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index ef5c2f8e17c7..6fda027d28a4 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c @@ -2479,6 +2479,7 @@ static int snd_rme9652_create(struct snd_card *card, return -EBUSY; } rme9652->irq = pci->irq; + card->sync_irq = rme9652->irq; rme9652->precise_ptr = precise_ptr;
/* Determine the h/w rev level of the card. This seems like
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/sis7019.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c index 06dccf080bcc..515598e3cacf 100644 --- a/sound/pci/sis7019.c +++ b/sound/pci/sis7019.c @@ -1335,6 +1335,7 @@ static int sis_chip_create(struct snd_card *card, }
sis->irq = pci->irq; + card->sync_irq = sis->irq; pci_set_master(pci);
for (i = 0; i < 64; i++) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/sonicvibes.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index bc650c8e85b0..a2bff9431512 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -1267,6 +1267,7 @@ static int snd_sonicvibes_create(struct snd_card *card, return -EBUSY; } sonic->irq = pci->irq; + card->sync_irq = sonic->irq;
pci_read_config_dword(pci, 0x40, &dmaa); pci_read_config_dword(pci, 0x48, &dmac);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/trident/trident_main.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 0e02578c2b3d..0d039eacbf0a 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c @@ -3543,6 +3543,7 @@ int snd_trident_create(struct snd_card *card, return -EBUSY; } trident->irq = pci->irq; + card->sync_irq = trident->irq;
/* allocate 16k-aligned TLB for NX cards */ trident->tlb.entries = NULL;
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/via82xx.c | 3 +-- sound/pci/via82xx_modem.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 3009c26ea8b9..e72050a9ffdb 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -2245,7 +2245,6 @@ static int snd_via82xx_suspend(struct device *dev) snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); for (i = 0; i < chip->num_devs; i++) snd_via82xx_channel_reset(chip, &chip->devs[i]); - synchronize_irq(chip->irq); snd_ac97_suspend(chip->ac97);
/* save misc values */ @@ -2376,9 +2375,9 @@ static int snd_via82xx_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; if (ac97_clock >= 8000 && ac97_clock <= 48000) chip->ac97_clock = ac97_clock; - synchronize_irq(chip->irq);
if ((err = snd_via82xx_chip_init(chip)) < 0) { snd_via82xx_free(chip); diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index 67614a8311e0..4e0858f8e372 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c @@ -1013,7 +1013,6 @@ static int snd_via82xx_suspend(struct device *dev) snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); for (i = 0; i < chip->num_devs; i++) snd_via82xx_channel_reset(chip, &chip->devs[i]); - synchronize_irq(chip->irq); snd_ac97_suspend(chip->ac97); return 0; } @@ -1105,9 +1104,9 @@ static int snd_via82xx_create(struct snd_card *card, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq; if (ac97_clock >= 8000 && ac97_clock <= 48000) chip->ac97_clock = ac97_clock; - synchronize_irq(chip->irq);
if ((err = snd_via82xx_chip_init(chip)) < 0) { snd_via82xx_free(chip);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ymfpci/ymfpci_main.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 61604277ae35..3bc92d236508 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -2371,6 +2371,7 @@ int snd_ymfpci_create(struct snd_card *card, goto free_chip; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
snd_ymfpci_aclink_reset(pci); if (snd_ymfpci_codec_ready(chip, 0) < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/ad1816a/ad1816a_lib.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index b9d340c752b4..e1aa5372c483 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c @@ -597,6 +597,7 @@ int snd_ad1816a_create(struct snd_card *card, return -EBUSY; } chip->irq = irq; + card->sync_irq = chip->irq; if (request_dma(dma1, "AD1816A - 1")) { snd_printk(KERN_ERR "ad1816a: can't grab DMA1 %d\n", dma1); snd_ad1816a_free(chip);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/es1688/es1688_lib.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c index 474d713085c7..632e867c5766 100644 --- a/sound/isa/es1688/es1688_lib.c +++ b/sound/isa/es1688/es1688_lib.c @@ -638,6 +638,7 @@ int snd_es1688_create(struct snd_card *card, }
chip->irq = irq; + card->sync_irq = chip->irq; err = request_dma(dma8, "ES1688");
if (err < 0) {
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/es18xx.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 87a0a33807e7..a581083b876b 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -1781,6 +1781,7 @@ static int snd_es18xx_new_device(struct snd_card *card, return -EBUSY; } chip->irq = irq; + card->sync_irq = chip->irq;
if (request_dma(dma1, "ES18xx DMA 1")) { snd_es18xx_free(card);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/gus/gus_main.c | 1 + sound/isa/gus/gusmax.c | 3 ++- sound/isa/gus/interwave.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index af6b4d89d695..9f94b5f3b029 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -181,6 +181,7 @@ int snd_gus_create(struct snd_card *card, return -EBUSY; } gus->gf1.irq = irq; + card->sync_irq = irq; if (request_dma(dma1, "GUS - 1")) { snd_printk(KERN_ERR "gus: can't grab DMA1 %d\n", dma1); snd_gus_free(gus); diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index 53eca205f870..efe576625f48 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c @@ -282,7 +282,8 @@ static int snd_gusmax_probe(struct device *pdev, unsigned int dev) goto _err; } maxcard->irq = xirq; - + card->sync_irq = maxcard->irq; + err = snd_wss_create(card, gus->gf1.port + 0x10c, -1, xirq, xdma2 < 0 ? xdma1 : xdma2, xdma1, diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index bc006dcf8de3..5cd4aa477ba7 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c @@ -667,6 +667,7 @@ static int snd_interwave_probe(struct snd_card *card, int dev) return -EBUSY; } iwcard->irq = xirq; + card->sync_irq = iwcard->irq;
err = snd_wss_create(card, gus->gf1.port + 0x10c, -1, xirq,
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/msnd/msnd_pinnacle.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c index e435ebd0ced4..9e7f03eec7e6 100644 --- a/sound/isa/msnd/msnd_pinnacle.c +++ b/sound/isa/msnd/msnd_pinnacle.c @@ -538,6 +538,7 @@ static int snd_msnd_attach(struct snd_card *card) printk(KERN_ERR LOGNAME ": Couldn't grab IRQ %d\n", chip->irq); return err; } + card->sync_irq = chip->irq; if (request_region(chip->io, DSP_NUMIO, card->shortname) == NULL) { free_irq(chip->irq, chip); return -EBUSY;
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/opl3sa2.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index 941d0bd5460b..6d19ab458291 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c @@ -659,6 +659,7 @@ static int snd_opl3sa2_probe(struct snd_card *card, int dev) return -ENODEV; } chip->irq = xirq; + card->sync_irq = chip->irq; err = snd_wss_create(card, wss_port[dev] + 4, -1, xirq, xdma1, xdma2,
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/opti9xx/opti92x-ad1848.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index fb36bb5d55df..b40ab806c349 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -869,6 +869,7 @@ static int snd_opti9xx_probe(struct snd_card *card) } #endif chip->irq = irq; + card->sync_irq = chip->irq; strcpy(card->driver, chip->name); sprintf(card->shortname, "OPTi %s", card->driver); #if defined(CS4231) || defined(OPTi93X)
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/sb/sb_common.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c index ff031d670400..4aaf9ab82afe 100644 --- a/sound/isa/sb/sb_common.c +++ b/sound/isa/sb/sb_common.c @@ -233,6 +233,7 @@ int snd_sbdsp_create(struct snd_card *card, return -EBUSY; } chip->irq = irq; + card->sync_irq = chip->irq;
if (hardware == SB_HW_ALS4000) goto __skip_allocation;
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/wavefront/wavefront.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index 95e6deb7b8d4..9e0f6b226775 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c @@ -409,6 +409,7 @@ snd_wavefront_probe (struct snd_card *card, int dev) } acard->wavefront.irq = ics2115_irq[dev]; + card->sync_irq = acard->wavefront.irq; acard->wavefront.base = ics2115_port[dev];
wavefront_synth = snd_wavefront_new_synth(card, hw_dev, acard);
The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/isa/wss/wss_lib.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c index 9114e8911712..100e8b547d27 100644 --- a/sound/isa/wss/wss_lib.c +++ b/sound/isa/wss/wss_lib.c @@ -1811,6 +1811,7 @@ int snd_wss_create(struct snd_card *card, return -EBUSY; } chip->irq = irq; + card->sync_irq = chip->irq; if (!(hwshare & WSS_HWSHARE_DMA1) && request_dma(dma1, "WSS - 1")) { snd_printk(KERN_ERR "wss: can't grab DMA1 %d\n", dma1); snd_wss_free(chip);
The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/lx6464es/lx6464es.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index 0ac078d1b27a..7f6b1c6c2afe 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c @@ -1002,6 +1002,7 @@ static int snd_lx6464es_create(struct snd_card *card, goto request_irq_failed; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); if (err < 0)
The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/mixart/mixart.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 05e2c8ea8480..18124bd97d80 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -1041,6 +1041,7 @@ static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int chip->card = card; chip->chip_idx = idx; chip->mgr = mgr; + card->sync_irq = mgr->irq;
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_mixart_chip_free(chip);
The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/pcxhr/pcxhr.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index e691c372b960..f4330832e520 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -1190,6 +1190,7 @@ static int pcxhr_create(struct pcxhr_mgr *mgr, chip->card = card; chip->chip_idx = idx; chip->mgr = mgr; + card->sync_irq = mgr->irq;
if (idx < mgr->playback_chips) /* stereo or mono streams */
The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/vx222/vx222.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index b502c2403a02..bc451224df16 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c @@ -163,6 +163,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, return -EBUSY; } chip->irq = pci->irq; + card->sync_irq = chip->irq;
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { snd_vx222_free(chip);
The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pcmcia/pdaudiocf/pdaudiocf.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index 022db0479908..eed2d60178e4 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c @@ -224,6 +224,7 @@ static int pdacf_config(struct pcmcia_device *link) link->irq) < 0) goto failed;
+ pdacf->card->sync_irq = link->irq; return 0;
failed:
The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pcmcia/vx/vxpocket.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c index 4e08863c3045..f924d8819f9d 100644 --- a/sound/pcmcia/vx/vxpocket.c +++ b/sound/pcmcia/vx/vxpocket.c @@ -185,6 +185,7 @@ static int snd_vxpocket_assign_resources(struct vx_core *chip, int port, int irq card->shortname, port, irq);
chip->irq = irq; + card->sync_irq = chip->irq;
if ((err = snd_vx_setup_firmware(chip)) < 0) return err;
USB-audio driver had some implementation of its own sync-stop mechanism. This patch moved a part of it to the common PCM sync_stop ops.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/usb/pcm.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 33c1e971e61e..8a52996041e9 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -260,18 +260,31 @@ static int start_endpoints(struct snd_usb_substream *subs) return 0; }
-static void stop_endpoints(struct snd_usb_substream *subs, bool wait) +static void sync_pending_stops(struct snd_usb_substream *subs) +{ + snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint); + snd_usb_endpoint_sync_pending_stop(subs->data_endpoint); +} + +static void stop_endpoints(struct snd_usb_substream *subs) { if (test_and_clear_bit(SUBSTREAM_FLAG_SYNC_EP_STARTED, &subs->flags)) snd_usb_endpoint_stop(subs->sync_endpoint);
if (test_and_clear_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags)) snd_usb_endpoint_stop(subs->data_endpoint); +}
- if (wait) { - snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint); - snd_usb_endpoint_sync_pending_stop(subs->data_endpoint); +/* PCM sync_stop callback */ +static int snd_usb_pcm_sync_stop(struct snd_pcm_substream *substream) +{ + struct snd_usb_substream *subs = substream->runtime->private_data; + + if (!snd_usb_lock_shutdown(subs->stream->chip)) { + sync_pending_stops(subs); + snd_usb_unlock_shutdown(subs->stream->chip); } + return 0; }
static int search_roland_implicit_fb(struct usb_device *dev, int ifnum, @@ -697,7 +710,8 @@ static int configure_endpoint(struct snd_usb_substream *subs) int ret;
/* format changed */ - stop_endpoints(subs, true); + stop_endpoints(subs); + sync_pending_stops(subs); ret = snd_usb_endpoint_set_params(subs->data_endpoint, subs->pcm_format, subs->channels, @@ -842,7 +856,8 @@ static int snd_usb_hw_free(struct snd_pcm_substream *substream) subs->cur_rate = 0; subs->period_bytes = 0; if (!snd_usb_lock_shutdown(subs->stream->chip)) { - stop_endpoints(subs, true); + stop_endpoints(subs); + sync_pending_stops(subs); snd_usb_endpoint_deactivate(subs->sync_endpoint); snd_usb_endpoint_deactivate(subs->data_endpoint); snd_usb_unlock_shutdown(subs->stream->chip); @@ -877,9 +892,6 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) goto unlock; }
- snd_usb_endpoint_sync_pending_stop(subs->sync_endpoint); - snd_usb_endpoint_sync_pending_stop(subs->data_endpoint); - ret = snd_usb_pcm_change_state(subs, UAC3_PD_STATE_D0); if (ret < 0) goto unlock; @@ -1337,7 +1349,6 @@ static int snd_usb_pcm_close(struct snd_pcm_substream *substream) struct snd_usb_substream *subs = &as->substream[direction]; int ret;
- stop_endpoints(subs, true); snd_media_stop_pipeline(subs);
if (!as->chip->keep_iface && @@ -1714,7 +1725,7 @@ static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substrea subs->running = 1; return 0; case SNDRV_PCM_TRIGGER_STOP: - stop_endpoints(subs, false); + stop_endpoints(subs); subs->running = 0; return 0; case SNDRV_PCM_TRIGGER_PAUSE_PUSH: @@ -1744,7 +1755,7 @@ static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream subs->running = 1; return 0; case SNDRV_PCM_TRIGGER_STOP: - stop_endpoints(subs, false); + stop_endpoints(subs); subs->running = 0; return 0; case SNDRV_PCM_TRIGGER_PAUSE_PUSH: @@ -1767,6 +1778,7 @@ static const struct snd_pcm_ops snd_usb_playback_ops = { .hw_free = snd_usb_hw_free, .prepare = snd_usb_pcm_prepare, .trigger = snd_usb_substream_playback_trigger, + .sync_stop = snd_usb_pcm_sync_stop, .pointer = snd_usb_pcm_pointer, };
@@ -1777,6 +1789,7 @@ static const struct snd_pcm_ops snd_usb_capture_ops = { .hw_free = snd_usb_hw_free, .prepare = snd_usb_pcm_prepare, .trigger = snd_usb_substream_capture_trigger, + .sync_stop = snd_usb_pcm_sync_stop, .pointer = snd_usb_pcm_pointer, };
participants (1)
-
Takashi Iwai