* [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs.
@ 2003-08-14 15:16 James Courtier-Dutton
2003-08-14 16:05 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: James Courtier-Dutton @ 2003-08-14 15:16 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
I have :-
Card: Intel ICH5
Chip: Avance Logic ALC650 rev 0
The problem I was having was that the spdif "non-audio" bit was not
being set.
This patch fixes that problem.
Cheers
James
[-- Attachment #2: ac3_passthru_fix.diff --]
[-- Type: text/plain, Size: 604 bytes --]
--- ac97_codec.c.org 2003-08-14 14:19:29.834681728 +0100
+++ ac97_codec.c 2003-08-14 16:11:39.736581128 +0100
@@ -823,7 +825,13 @@
AC97_CXR_SPDIF_MASK | AC97_CXR_COPYRGT,
v);
} else {
+ unsigned short extst = ac97->regs[AC97_EXTENDED_STATUS];
+ snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); /* turn off */
+
change |= snd_ac97_update_bits(ac97, AC97_SPDIF, 0x3fff, val);
+ if (extst & AC97_EA_SPDIF) {
+ snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); /* turn on again */
+ }
}
return change;
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs.
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
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2003-08-14 16:05 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
At Thu, 14 Aug 2003 16:16:03 +0100,
James Courtier-Dutton wrote:
>
> I have :-
> Card: Intel ICH5
> Chip: Avance Logic ALC650 rev 0
>
> 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.
Takashi
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs.
2003-08-14 16:05 ` Takashi Iwai
@ 2003-08-14 16:49 ` Gregoire Favre
2003-08-14 17:23 ` Takashi Iwai
2003-08-14 17:44 ` James Courtier-Dutton
0 siblings, 2 replies; 6+ messages in thread
From: Gregoire Favre @ 2003-08-14 16:49 UTC (permalink / raw)
To: Takashi Iwai; +Cc: James Courtier-Dutton, alsa-devel
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?
Thank you very much,
Grégoire
__________________________________________________________________
http://www-ima.unil.ch/greg ICQ:16624071 mailto:greg@magma.unil.ch
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs.
2003-08-14 16:49 ` Gregoire Favre
@ 2003-08-14 17:23 ` Takashi Iwai
2003-08-14 17:44 ` James Courtier-Dutton
1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2003-08-14 17:23 UTC (permalink / raw)
To: Gregoire Favre; +Cc: James Courtier-Dutton, alsa-devel
[-- 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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs.
2003-08-14 16:49 ` Gregoire Favre
2003-08-14 17:23 ` Takashi Iwai
@ 2003-08-14 17:44 ` James Courtier-Dutton
2003-08-14 20:48 ` Gregoire Favre
1 sibling, 1 reply; 6+ messages in thread
From: James Courtier-Dutton @ 2003-08-14 17:44 UTC (permalink / raw)
To: Gregoire Favre; +Cc: alsa-devel
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?
>
> Thank you very much,
>
> Grégoire
> __________________________________________________________________
> http://www-ima.unil.ch/greg ICQ:16624071 mailto:greg@magma.unil.ch
>
>
I don't know if I can help or not, because I don't have that sound card.
If you can send me the output of :-
lspci -v
lspci -vn
alsamixer <- What is the name of the Card: and Chip: ?
I will see what I can do.
Cheers
James
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Fixes ac3 passthru non-audio bit setting for AC97 codecs.
2003-08-14 17:44 ` James Courtier-Dutton
@ 2003-08-14 20:48 ` Gregoire Favre
0 siblings, 0 replies; 6+ messages in thread
From: Gregoire Favre @ 2003-08-14 20:48 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
On Thu, Aug 14, 2003 at 06:44:02PM +0100, James Courtier-Dutton wrote:
> I don't know if I can help or not, because I don't have that sound card.
> If you can send me the output of :-
> lspci -v
> lspci -vn
> alsamixer <- What is the name of the Card: and Chip: ?
>
> I will see what I can do.
Thank you very much, as soon as I will open my computer and change the
SBlive for the Hercule ones and send you the requested info ;-)
Have a great day,
Grégoire
__________________________________________________________________
http://www-ima.unil.ch/greg ICQ:16624071 mailto:greg@magma.unil.ch
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-08-14 20:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2003-08-14 17:44 ` James Courtier-Dutton
2003-08-14 20:48 ` Gregoire Favre
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.