ALSA: ctxfi: Support PCM sync_stop
authorTakashi Iwai <tiwai@suse.de>
Tue, 10 Dec 2019 06:34:13 +0000 (07:34 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 11 Dec 2019 06:25:42 +0000 (07:25 +0100)
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-15-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ctxfi/cthw20k1.c
sound/pci/ctxfi/cthw20k2.c

index 4ff7ecd..6e3177b 100644 (file)
@@ -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;
 }
 
index 3cd4b7d..ce44cbe 100644 (file)
@@ -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);