ALSA: echoaudio: Support PCM sync_stop

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.

Link: https://lore.kernel.org/r/20191210063454.31603-16-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2019-12-10 07:34:14 +01:00
parent 5e0890c1cb
commit d4cad99fda
1 changed files with 3 additions and 0 deletions

View File

@ -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