]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: trident - pause s/pdif output
authorPierre Ossman <drzeus@drzeus.cx>
Mon, 23 Jun 2008 09:45:47 +0000 (11:45 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 26 Jun 2008 07:01:38 +0000 (09:01 +0200)
Stop the S/PDIF DMA engine and output when the device is told to pause.
It will keep on looping the current buffer contents if this isn't done.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Tested-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/trident/trident_main.c

index bbcee2c09ae42e15085cc91d0bcb1625b50118dd..a69b4206c69e205f9a88726f63182f75b36491ee 100644 (file)
@@ -1590,7 +1590,10 @@ static int snd_trident_trigger(struct snd_pcm_substream *substream,
        if (spdif_flag) {
                if (trident->device != TRIDENT_DEVICE_ID_SI7018) {
                        outl(trident->spdif_pcm_bits, TRID_REG(trident, NX_SPCSTATUS));
-                       outb(trident->spdif_pcm_ctrl, TRID_REG(trident, NX_SPCTRL_SPCSO + 3));
+                       val = trident->spdif_pcm_ctrl;
+                       if (!go)
+                               val &= ~(0x28);
+                       outb(val, TRID_REG(trident, NX_SPCTRL_SPCSO + 3));
                } else {
                        outl(trident->spdif_pcm_bits, TRID_REG(trident, SI_SPDIF_CS));
                        val = inl(TRID_REG(trident, SI_SERIAL_INTF_CTRL)) | SPDIF_EN;