mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Rene Herman <rene.herman@keyaccess.nl>,
	ALSA devel <alsa-devel@alsa-project.org>,
	mulix@mulix.org, Pierre Ossman <drzeus@drzeus.cx>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [alsa-devel] looping S/PDIF data
Date: Thu, 19 Jun 2008 14:48:19 +0200	[thread overview]
Message-ID: <s5hskv97fqk.wl%tiwai@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0806191435270.1798@tm8103-a.perex-int.cz>

At Thu, 19 Jun 2008 14:39:05 +0200 (CEST),
Jaroslav Kysela wrote:
> 
> On Thu, 19 Jun 2008, Takashi Iwai wrote:
> 
> > At Wed, 18 Jun 2008 09:24:59 +0200,
> > Rene Herman wrote:
> > > 
> > > On 17-06-08 21:55, Pierre Ossman wrote:
> > > 
> > > > Ping
> > > > 
> > > > On Sat, 31 May 2008 11:26:06 +0200
> > > > Pierre Ossman <drzeus-list@drzeus.cx> wrote:
> > > > 
> > > >> I have a minor annoyance with the snd_trident driver that I was hoping
> > > >> you might have a fix for:
> > > >>
> > > >> Pausing the output does not seem to take on the S/PDIF output. Analog
> > > >> outputs properly stop in their tracks, but the S/PDIF port keeps
> > > >> looping the current data buffer, which gives a rather unpleasant end
> > > >> result. :)
> > > 
> > > Try the alsa-devel list...
> > 
> > Does the patch below help?
> > 
> > 
> > Takashi
> > 
> > diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
> > index bbcee2c..916d4b8 100644
> > --- a/sound/pci/trident/trident_main.c
> > +++ b/sound/pci/trident/trident_main.c
> > @@ -1593,7 +1593,11 @@ static int snd_trident_trigger(struct snd_pcm_substream *substream,
> >  			outb(trident->spdif_pcm_ctrl, 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;
> > +			val = inl(TRID_REG(trident, SI_SERIAL_INTF_CTRL));
> > +			if (go)
> > +				val |= SPDIF_EN;
> > +			else
> > +				val &= ~SPDIF_EN;
> >  			outl(val, TRID_REG(trident, SI_SERIAL_INTF_CTRL));
> >  		}
> >  	}
> 
> I don't think that this patch is correct. DMA transfers should be disabled 
> by:
> 
> outl(what, TRID_REG(trident, T4D_STOP_B));
> outl(val, TRID_REG(trident, T4D_AINTEN_B));

They are already in the trigger callback as long as I saw the code
quickly.  So the problem should be somewhere else.

> lines. Adding &= ~SPDIF_EN can disable output from AC97 to S/PDIF as well.

That's true.

Anyway, if you are up now, I'll let you hunt further as you are the
author of the driver :)


thanks,

Takashi

  reply	other threads:[~2008-06-19 12:48 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 [this message]
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
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=s5hskv97fqk.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=drzeus@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mulix@mulix.org \
    --cc=perex@perex.cz \
    --cc=rene.herman@keyaccess.nl \
    /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®