All of lore.kernel.org
 help / color / mirror / Atom feed
* Broken nforce3 support in ALSA on amd64?
@ 2005-02-27  1:45 Ian Forde
  2005-03-07 13:31 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Forde @ 2005-02-27  1:45 UTC (permalink / raw)
  To: alsa-devel

Hi -

I've posted to alsa-devel about a problem I'm having in getting PCM and
AC3 working on FC3-x86_64.

My motherboard is a DFI Lanparty UT 250GB nforce3.  I can get PCM audio
to route through the spdif correctly with ALSA.  But with AC3
audio, the blue light on my Sony receiver lights up but plays no sound.

lspci -v output from the chip:

00:06.0 Multimedia audio controller: nVidia Corporation nForce3 250Gb
AC'97 Audio Controller (rev a1)
        Subsystem: nVidia Corporation: Unknown device 0c11
        Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 177
        I/O ports at d300 [size=256]
        I/O ports at d400 [size=128]
        Memory at e9000000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [44] Power Management version 2

Here's the weird bit:  Following these steps in order allows me to play
AC3 through the SPDIF but no longer PCM audio:

1. Load ALSA modules
2. Play (successfully) PCM audio via:
        /usr/bin/mplayer -vo null -ao alsa:device=hw=0.2
somemoviefile.avi
3. Unload ALSA modules
4. Load nvsound module
5. Play (successfully) AC3-enabled audio via:
        /usr/bin/mplayer -vo null -ao oss -ac hwac3, someothermovie.vob
6. Unload nvsound module
7. Load ALSA modules
8. Play (successfully) AC3-enabled audio via:
        /usr/bin/mplayer -vo null -ao alsa:device=hw=0.2 -ac hwac3,
someothermovie.vob

And no - at this point, redoing step 2 at this point does *NOT* work.
Unless I unload alsa, load oss, play something PCM, unload oss, and load
alsa again... just tested that.

Kernel is FC3 2.6.10-1.760_FC3 with ALSA 1.0.8 from atrpms on a x86_64
platform.

Note - in alsamixer, the only IEC958-related controls I see are "IEC958"
and "IEC958 Playback AC97-SP5A", neither of which allow themselves to be
muted...

It seems that because there's already a binary driver out there that can
set the control bits correctly, all I should need to do is dump the
registers after loading nvsound and playing both PCM and AC3 audio
streams, then comparing them to what they look like when the
corresponding ALSA module (snd-intel8x0) is loaded.  How would I go
about doing that in a way that would be useful to get this driver
working for me and included in the next ALSA release?

	-Ian



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Broken nforce3 support in ALSA on amd64?
@ 2005-02-27  1:47 Ian Forde
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Forde @ 2005-02-27  1:47 UTC (permalink / raw)
  To: alsa-devel

Hi -

I've posted to alsa-devel about a problem I'm having in getting PCM and
AC3 working on FC3-x86_64.

My motherboard is a DFI Lanparty UT 250GB nforce3.  I can get PCM audio
to route through the spdif correctly with ALSA.  But with AC3
audio, the blue light on my Sony receiver lights up but plays no sound.

lspci -v output from the chip:

00:06.0 Multimedia audio controller: nVidia Corporation nForce3 250Gb
AC'97 Audio Controller (rev a1)
        Subsystem: nVidia Corporation: Unknown device 0c11
        Flags: bus master, 66Mhz, fast devsel, latency 0, IRQ 177
        I/O ports at d300 [size=256]
        I/O ports at d400 [size=128]
        Memory at e9000000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [44] Power Management version 2

Here's the weird bit:  Following these steps in order allows me to play
AC3 through the SPDIF but no longer PCM audio:

1. Load ALSA modules
2. Play (successfully) PCM audio via:
        /usr/bin/mplayer -vo null -ao alsa:device=hw=0.2
somemoviefile.avi
3. Unload ALSA modules
4. Load nvsound module
5. Play (successfully) AC3-enabled audio via:
        /usr/bin/mplayer -vo null -ao oss -ac hwac3, someothermovie.vob
6. Unload nvsound module
7. Load ALSA modules
8. Play (successfully) AC3-enabled audio via:
        /usr/bin/mplayer -vo null -ao alsa:device=hw=0.2 -ac hwac3,
someothermovie.vob

And no - at this point, redoing step 2 at this point does *NOT* work.
Unless I unload alsa, load oss, play something PCM, unload oss, and load
alsa again... just tested that.

Kernel is FC3 2.6.10-1.760_FC3 with ALSA 1.0.8 from atrpms on a x86_64
platform.

Note - in alsamixer, the only IEC958-related controls I see are "IEC958"
and "IEC958 Playback AC97-SP5A", neither of which allow themselves to be
muted...

It seems that because there's already a binary driver out there that can
set the control bits correctly, all I should need to do is dump the
registers after loading nvsound and playing both PCM and AC3 audio
streams, then comparing them to what they look like when the
corresponding ALSA module (snd-intel8x0) is loaded.  How would I go
about doing that in a way that would be useful to get this driver
working for me and included in the next ALSA release?

	-Ian



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Broken nforce3 support in ALSA on amd64?
  2005-02-27  1:45 Broken nforce3 support in ALSA on amd64? Ian Forde
@ 2005-03-07 13:31 ` Takashi Iwai
  2005-03-07 20:06   ` Lee Revell
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2005-03-07 13:31 UTC (permalink / raw)
  To: Ian Forde; +Cc: alsa-devel

At Sat, 26 Feb 2005 17:45:45 -0800,
Ian Forde wrote:
> 
> Note - in alsamixer, the only IEC958-related controls I see are "IEC958"
> and "IEC958 Playback AC97-SP5A", neither of which allow themselves to be
> muted...
> 
> It seems that because there's already a binary driver out there that can
> set the control bits correctly, all I should need to do is dump the
> registers after loading nvsound and playing both PCM and AC3 audio
> streams, then comparing them to what they look like when the
> corresponding ALSA module (snd-intel8x0) is loaded.  How would I go
> about doing that in a way that would be useful to get this driver
> working for me and included in the next ALSA release?

Nforce seems to route the SPDIF output not through ac97 codec but
directly to the SPDIF transmitter.  That's why ALSA driver doesn't
work.  It assumes the AC97 codec output.  So, apparently, we need to
find out unknown registers to set up IEC958 status bits.

Unfortunately, the datasheet of nforce is not available at all, so we
have no chance to fix this problem yet unless you do some reverse
engineering (but I never recommend to do that, it's a waste of time).


Takashi


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Broken nforce3 support in ALSA on amd64?
  2005-03-07 13:31 ` Takashi Iwai
@ 2005-03-07 20:06   ` Lee Revell
  2005-03-07 20:17     ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Revell @ 2005-03-07 20:06 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Ian Forde, alsa-devel

On Mon, 2005-03-07 at 14:31 +0100, Takashi Iwai wrote:
> Unfortunately, the datasheet of nforce is not available at all, so we
> have no chance to fix this problem yet unless you do some reverse
> engineering (but I never recommend to do that, it's a waste of time).

Do you mean reverse engineering Nvidia drivers, or RE in general?  If
it's the latter I have to disagree strongly.  It't not fast or easy, but
many ALSA drivers have gained useful features this way.

I strongly encourage reverse engineering proprietary drivers.  Look at
what James did with the Audigy LS.  And look how much is known about the
EMU DSP instruction set, all that info is reverse engineered.

Lee



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Broken nforce3 support in ALSA on amd64?
  2005-03-07 20:06   ` Lee Revell
@ 2005-03-07 20:17     ` Takashi Iwai
  2005-03-08  1:11       ` Lee Revell
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2005-03-07 20:17 UTC (permalink / raw)
  To: Lee Revell; +Cc: Ian Forde, alsa-devel

At Mon, 07 Mar 2005 15:06:05 -0500,
Lee Revell wrote:
> 
> On Mon, 2005-03-07 at 14:31 +0100, Takashi Iwai wrote:
> > Unfortunately, the datasheet of nforce is not available at all, so we
> > have no chance to fix this problem yet unless you do some reverse
> > engineering (but I never recommend to do that, it's a waste of time).
> 
> Do you mean reverse engineering Nvidia drivers, or RE in general?  If
> it's the latter I have to disagree strongly.  It't not fast or easy, but
> many ALSA drivers have gained useful features this way.

I mean the former.

> I strongly encourage reverse engineering proprietary drivers.  Look at
> what James did with the Audigy LS.  And look how much is known about the
> EMU DSP instruction set, all that info is reverse engineered.

IMO, the reverse-engineering is not the first thing to do.
The h/w vendors don't want to open their specs -- unless the manager
realizes that many users want it in the world.  So, crying out loudly
to the h/w vendors would be the first.  I don't think it's been done
quite enough yet in this case.  AFAIK, Nvidia guys don't know that the
problem exists at all.

BTW, off-topic: is the reverse-engineering allowed in US, too?


Takashi


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Broken nforce3 support in ALSA on amd64?
  2005-03-07 20:17     ` Takashi Iwai
@ 2005-03-08  1:11       ` Lee Revell
  2005-03-08  5:45         ` Ian Forde
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Revell @ 2005-03-08  1:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Ian Forde, alsa-devel

On Mon, 2005-03-07 at 21:17 +0100, Takashi Iwai wrote:
> At Mon, 07 Mar 2005 15:06:05 -0500,
> Lee Revell wrote:
> IMO, the reverse-engineering is not the first thing to do.
> The h/w vendors don't want to open their specs -- unless the manager
> realizes that many users want it in the world.  So, crying out loudly
> to the h/w vendors would be the first.  I don't think it's been done
> quite enough yet in this case.  AFAIK, Nvidia guys don't know that the
> problem exists at all.
> 

Good point.  Although Nvidia's position on opening their drivers is well
known, their engineers have definitely helped open source developers
before.  Someone should really ask them, and post the results here.

> BTW, off-topic: is the reverse-engineering allowed in US, too?
> 

AIUI it's generally prohibited by the DMCA but there is an explicit
exception that allows reverse engineering for the purpose of creating
interoperable software.  The intention was to prevent people from using
the anti-reverse engineering provisions to implement vendor lock-in. 

IANAL, in fact all my legal knowledge comes from LKML and slashdot, but
I have interpreted this to mean that reverse engineering Windows drivers
to make Linux drivers is fair game.

Maybe the US courts will find one day that I don't have a right to write
a Linux driver for a device I paid for.  But until that happens, I am
not worried. 

Any US lawyers on this list?

Lee



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Broken nforce3 support in ALSA on amd64?
  2005-03-08  1:11       ` Lee Revell
@ 2005-03-08  5:45         ` Ian Forde
  2005-03-08 11:43           ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Ian Forde @ 2005-03-08  5:45 UTC (permalink / raw)
  To: Lee Revell; +Cc: Takashi Iwai, alsa-devel

On Mon, 2005-03-07 at 20:11 -0500, Lee Revell wrote:
> On Mon, 2005-03-07 at 21:17 +0100, Takashi Iwai wrote:
> > At Mon, 07 Mar 2005 15:06:05 -0500,
> > Lee Revell wrote:
> > IMO, the reverse-engineering is not the first thing to do.
> > The h/w vendors don't want to open their specs -- unless the manager
> > realizes that many users want it in the world.  So, crying out loudly
> > to the h/w vendors would be the first.  I don't think it's been done
> > quite enough yet in this case.  AFAIK, Nvidia guys don't know that the
> > problem exists at all.
> > 
> 
> Good point.  Although Nvidia's position on opening their drivers is well
> known, their engineers have definitely helped open source developers
> before.  Someone should really ask them, and post the results here.

Hmm... would the downloads at

http://www.realtek.com.tw/downloads/downloads1-3.aspx?Keyword=alc850 

help any?  The first file listed is a datasheet for the alc850.  The
second contains a diagram...

	-I



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Broken nforce3 support in ALSA on amd64?
  2005-03-08  5:45         ` Ian Forde
@ 2005-03-08 11:43           ` Takashi Iwai
  2005-03-10  4:40             ` Ian Forde
  0 siblings, 1 reply; 9+ messages in thread
From: Takashi Iwai @ 2005-03-08 11:43 UTC (permalink / raw)
  To: Ian Forde; +Cc: Lee Revell, alsa-devel

At Mon, 07 Mar 2005 21:45:16 -0800,
Ian Forde wrote:
> 
> On Mon, 2005-03-07 at 20:11 -0500, Lee Revell wrote:
> > On Mon, 2005-03-07 at 21:17 +0100, Takashi Iwai wrote:
> > > At Mon, 07 Mar 2005 15:06:05 -0500,
> > > Lee Revell wrote:
> > > IMO, the reverse-engineering is not the first thing to do.
> > > The h/w vendors don't want to open their specs -- unless the manager
> > > realizes that many users want it in the world.  So, crying out loudly
> > > to the h/w vendors would be the first.  I don't think it's been done
> > > quite enough yet in this case.  AFAIK, Nvidia guys don't know that the
> > > problem exists at all.
> > > 
> > 
> > Good point.  Although Nvidia's position on opening their drivers is well
> > known, their engineers have definitely helped open source developers
> > before.  Someone should really ask them, and post the results here.
> 
> Hmm... would the downloads at
> 
> http://www.realtek.com.tw/downloads/downloads1-3.aspx?Keyword=alc850 
> 
> help any?  The first file listed is a datasheet for the alc850.  The
> second contains a diagram...

nForce seems to route the SPDIF not through AC97 but directly to the
transmitter.  So, tuning AC97 registers will unlikely help.


Takashi


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Broken nforce3 support in ALSA on amd64?
  2005-03-08 11:43           ` Takashi Iwai
@ 2005-03-10  4:40             ` Ian Forde
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Forde @ 2005-03-10  4:40 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Lee Revell, alsa-devel

On Tue, 2005-03-08 at 12:43 +0100, Takashi Iwai wrote:
> nForce seems to route the SPDIF not through AC97 but directly to the
> transmitter.  So, tuning AC97 registers will unlikely help.

Okay - so I disabled it in the BIOS and put in an older SBLive 5.1 card
that I had before.  I can get PCM audio just fine, but AC3 passthrough
is once again lighting up the receiver, but with no audio coming
through.  Please tell me this isn't an AMD64 thing...

	-I



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-03-10  4:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-27  1:45 Broken nforce3 support in ALSA on amd64? Ian Forde
2005-03-07 13:31 ` Takashi Iwai
2005-03-07 20:06   ` Lee Revell
2005-03-07 20:17     ` Takashi Iwai
2005-03-08  1:11       ` Lee Revell
2005-03-08  5:45         ` Ian Forde
2005-03-08 11:43           ` Takashi Iwai
2005-03-10  4:40             ` Ian Forde
  -- strict thread matches above, loose matches on Subject: below --
2005-02-27  1:47 Ian Forde

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.