lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0806191435270.1798@tm8103-a.perex-int.cz>
Date:	Thu, 19 Jun 2008 14:39:05 +0200 (CEST)
From:	Jaroslav Kysela <perex@...ex.cz>
To:	Takashi Iwai <tiwai@...e.de>
cc:	Rene Herman <rene.herman@...access.nl>,
	ALSA devel <alsa-devel@...a-project.org>, mulix@...ix.org,
	Pierre Ossman <drzeus@...eus.cx>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] looping S/PDIF data

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@...eus.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));

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

						Jaroslav

-----
Jaroslav Kysela <perex@...ex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ