Commit 83720eef authored by Takashi Iwai's avatar Takashi Iwai

ALSA: ens137x: 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, as well as removing the superfluous synchronize_irq()
call.

Link: https://lore.kernel.org/r/20191210063454.31603-18-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 66471aa7
...@@ -1888,8 +1888,6 @@ static int snd_ensoniq_free(struct ensoniq *ensoniq) ...@@ -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, CONTROL)); /* switch everything off */
outl(0, ES_REG(ensoniq, SERIAL)); /* clear serial interface */ outl(0, ES_REG(ensoniq, SERIAL)); /* clear serial interface */
#endif #endif
if (ensoniq->irq >= 0)
synchronize_irq(ensoniq->irq);
pci_set_power_state(ensoniq->pci, PCI_D3hot); pci_set_power_state(ensoniq->pci, PCI_D3hot);
__hw_end: __hw_end:
#ifdef CHIP1370 #ifdef CHIP1370
...@@ -1990,7 +1988,6 @@ static void snd_ensoniq_chip_init(struct ensoniq *ensoniq) ...@@ -1990,7 +1988,6 @@ static void snd_ensoniq_chip_init(struct ensoniq *ensoniq)
outb(ensoniq->uartc = 0x00, ES_REG(ensoniq, UART_CONTROL)); outb(ensoniq->uartc = 0x00, ES_REG(ensoniq, UART_CONTROL));
outb(0x00, ES_REG(ensoniq, UART_RES)); outb(0x00, ES_REG(ensoniq, UART_RES));
outl(ensoniq->cssr, ES_REG(ensoniq, STATUS)); outl(ensoniq->cssr, ES_REG(ensoniq, STATUS));
synchronize_irq(ensoniq->irq);
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -2074,6 +2071,7 @@ static int snd_ensoniq_create(struct snd_card *card, ...@@ -2074,6 +2071,7 @@ static int snd_ensoniq_create(struct snd_card *card,
return -EBUSY; return -EBUSY;
} }
ensoniq->irq = pci->irq; ensoniq->irq = pci->irq;
card->sync_irq = ensoniq->irq;
#ifdef CHIP1370 #ifdef CHIP1370
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev, if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
16, &ensoniq->dma_bug) < 0) { 16, &ensoniq->dma_bug) < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment