mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus@drzeus.cx>
To: Rene Herman <rene.herman@keyaccess.nl>,
	Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>
Cc: ALSA devel <alsa-devel@alsa-project.org>,
	mulix@mulix.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] looping S/PDIF data
Date: Sat, 21 Jun 2008 01:09:10 +0200	[thread overview]
Message-ID: <20080621010910.018f880d@mjolnir.drzeus.cx> (raw)
In-Reply-To: <485C2DF7.7080408@keyaccess.nl>

[-- Attachment #1: Type: text/plain, Size: 2897 bytes --]

On Sat, 21 Jun 2008 00:23:51 +0200
Rene Herman <rene.herman@keyaccess.nl> wrote:

> On 21-06-08 00:00, Pierre Ossman wrote:
> 
> > On Fri, 20 Jun 2008 21:52:55 +0200 Rene Herman
> > <rene.herman@keyaccess.nl> wrote:
> > 
> >> On 20-06-08 21:45, Pierre Ossman wrote:
> >>> Are there any specs on this hardware? I could play around a bit
> >>> myself, but I can't really find any documentation on the
> >>> registers.
> >> At:
> >> 
> >> ftp://ftp.alsa-project.org/pub/manuals/trident/
> >> 
> >> there's a 4D-Wave DX technical reference manual and .doc files
> >> which at first glance look useful.
> >> 
> > 
> > Ah, thanks. This is an NX, but hopefully they don't differ that much.
> 
> No idea, but if you come up with something and keep me in CC I'll test 
> it on a DX. Just acquired one on eBay a few days ago as a coincedence.
> 

Well aren't things just so much easier with a decent spec. I have this
one solved now. :)

The following patch disables both the S/PDIF output, and the DMA engine
when paused. As for Jaroslav's comment, the documentation seems to
suggest that the DMA disabled by the main code path is just for the
mixer engine, which is not used when feeding the S/PDIF directly. This
is supported by my tests as S/PDIF output is paused when using hw:0.0
(the mixer engine), but not with hw:0.2 (the raw S/PDIF).

Regarding the DX, the docs say that the DX lacks S/PDIF, so it should
be unaffected. For the SiS chip, Takashi's patch might still be needed.

--

trident: pause s/pdif output

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

diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index bbcee2c..a69b420 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -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;

-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Use end-to-end encryption where
  possible.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-06-20 23:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-31  9:26 Pierre Ossman
2008-06-02  8:00 ` Takashi Iwai
2008-06-17 19:55 ` Pierre Ossman
2008-06-18  7:24   ` Rene Herman
2008-06-19 10:05     ` [alsa-devel] " Takashi Iwai
2008-06-19 12:39       ` Jaroslav Kysela
2008-06-19 12:48         ` Takashi Iwai
2008-06-20 19:45           ` Pierre Ossman
2008-06-20 19:52             ` Rene Herman
2008-06-20 22:00               ` Pierre Ossman
2008-06-20 22:23                 ` Rene Herman
2008-06-20 23:09                   ` Pierre Ossman [this message]
2008-06-21 12:14                     ` Rene Herman
2008-06-30 17:11                       ` Pierre Ossman
2008-06-30 18:21                         ` Rene Herman
2008-06-30 19:22                           ` Pierre Ossman
2008-07-01 10:16                           ` Takashi Iwai
2008-06-19 23:02         ` Pierre Ossman
2008-06-19 10:05     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080621010910.018f880d@mjolnir.drzeus.cx \
    --to=drzeus@drzeus.cx \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mulix@mulix.org \
    --cc=perex@perex.cz \
    --cc=rene.herman@keyaccess.nl \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®