All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Gregoire Favre <greg@magma.unil.ch>
Cc: James Courtier-Dutton <James@superbug.demon.co.uk>,
	alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs.
Date: Thu, 14 Aug 2003 19:23:32 +0200	[thread overview]
Message-ID: <s5hadac40h7.wl@alsa2.suse.de> (raw)
In-Reply-To: <20030814164913.GA31684@magma.unil.ch>

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

At Thu, 14 Aug 2003 18:49:13 +0200,
Gregoire Favre wrote:
> 
> On Thu, Aug 14, 2003 at 06:05:48PM +0200, Takashi Iwai wrote:
> 
> > > The problem I was having was that the spdif "non-audio" bit was not 
> > > being set.
> > > This patch fixes that problem.
> > 
> > thanks, now applied to cvs.
> 
> Is there any hope to do the same for the cs46xx?

the hardware is completely different...

anyway, please give a try the following patch.


Takashi

[-- Attachment #2: cs46xx-spdif-fix.dif --]
[-- Type: application/octet-stream, Size: 2615 bytes --]

Index: alsa-kernel/pci/cs46xx/cs46xx_lib.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/cs46xx/cs46xx_lib.c,v
retrieving revision 1.59
diff -u -r1.59 cs46xx_lib.c
--- alsa-kernel/pci/cs46xx/cs46xx_lib.c	14 Aug 2003 11:03:23 -0000	1.59
+++ alsa-kernel/pci/cs46xx/cs46xx_lib.c	14 Aug 2003 17:19:41 -0000
@@ -2111,9 +2111,9 @@
 	int change;
 
 	down (&chip->spos_mutex);
-	val = _wrap_all_bits(((u32)ucontrol->value.iec958.status[0] << 24)) |
-	      _wrap_all_bits(((u32)ucontrol->value.iec958.status[2] << 16)) |
-	      _wrap_all_bits( (u32)ucontrol->value.iec958.status[3])  |
+	val = ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[0]) << 24) |
+		((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[2]) << 16) |
+		((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[3]))  |
 		/* left and right validity bit */
 		(1 << 13) | (1 << 12);
 
@@ -2164,9 +2164,9 @@
 	int change;
 
 	down (&chip->spos_mutex);
-	val = _wrap_all_bits(((u32)ucontrol->value.iec958.status[0] << 24)) |
-	      _wrap_all_bits(((u32)ucontrol->value.iec958.status[1] << 16)) |
-	      _wrap_all_bits( (u32)ucontrol->value.iec958.status[3]) |
+	val = ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[0]) << 24) |
+		((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[1]) << 16) |
+		((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[3])) |
 		/* left and right validity bit */
 		(1 << 13) | (1 << 12);
 
Index: alsa-kernel/pci/cs46xx/dsp_spos.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/cs46xx/dsp_spos.c,v
retrieving revision 1.21
diff -u -r1.21 dsp_spos.c
--- alsa-kernel/pci/cs46xx/dsp_spos.c	2 Apr 2003 14:33:49 -0000	1.21
+++ alsa-kernel/pci/cs46xx/dsp_spos.c	14 Aug 2003 17:17:46 -0000
@@ -267,9 +267,9 @@
 	   default channel status */
 	ins->spdif_csuv_default = 
 		ins->spdif_csuv_stream =  
-	 /* byte 0 */  (_wrap_all_bits(  (SNDRV_PCM_DEFAULT_CON_SPDIF        & 0xff)) << 24) |
-	 /* byte 1 */  (_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 16) & 0xff)) << 16) |
-	 /* byte 3 */   _wrap_all_bits(  (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) |
+	 /* byte 0 */  ((unsigned int)_wrap_all_bits(  (SNDRV_PCM_DEFAULT_CON_SPDIF        & 0xff)) << 24) |
+	 /* byte 1 */  ((unsigned int)_wrap_all_bits( ((SNDRV_PCM_DEFAULT_CON_SPDIF >> 8) & 0xff)) << 16) |
+	 /* byte 3 */   (unsigned int)_wrap_all_bits(  (SNDRV_PCM_DEFAULT_CON_SPDIF >> 24) & 0xff) |
 	 /* left and right validity bits */ (1 << 13) | (1 << 12);
 
 	return ins;

  reply	other threads:[~2003-08-14 17:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-14 15:16 [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs James Courtier-Dutton
2003-08-14 16:05 ` Takashi Iwai
2003-08-14 16:49   ` Gregoire Favre
2003-08-14 17:23     ` Takashi Iwai [this message]
2003-08-14 17:44     ` James Courtier-Dutton
2003-08-14 20:48       ` Gregoire Favre

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=s5hadac40h7.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=James@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=greg@magma.unil.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.