[alsa-devel] HDMI audio: TV vs. codec supported sample rates

Stephen Warren swarren at nvidia.com
Thu Aug 12 23:02:45 CEST 2010


Takashi Iwai wrote:
> At Mon, 9 Aug 2010 14:31:30 -0700,
> Stephen Warren wrote:
> >
> > Takashi Iwai wrote:
> > >
> > > At Thu, 5 Aug 2010 07:23:26 -0700,
> > > Stephen Warren wrote:
> > > >
> > > > Takashi Iwai wrote:
> > > > > Sent: Thursday, August 05, 2010 6:28 AM
> > > > >
> > ...
> > > > > OK, what about the patch below (totally untested)?
> > > > >
> > > > > This updates the PCM info only at PCM open time. Apps usually check
> > > > > parameters only at open (due to hw_params stuff), so it doesn't make
> > > > > much sense to change dynamically at hotplug in the end.
> > > >
> > > > Doesn't that patch only use the ELD to set up the stream's supported parameters?
> > > > I think the code needs to determine the intersection of what's supported by the
> > > > codec (from HDA node parsing if that's the correct terminology) *and* the display
> > > > device (from the ELD), not just one of them.
> > >
> > > Good point.  A revised patch is below.
> > > Can anyone test it?
> >
> > FYI, I asked our affected end-user to test this a few days ago, but haven't heard
> > back yet. I'll let you know his results when I get them. I'll also see if we can
> > get this tested internally to NVIDIA. Unfortunately, I don't have the HW to do so
> > at present (although perhaps if I fake the ELD data, I could test it...)
> 
> OK, thanks for update.  If anyone can give it a try, please let me know the
> result.

I gave this a try by hacking our display driver to pass some hard-coded SADs to the
audio HW. This seems to work OK. Some thoughts:

I tested with a nice utility called alsacap from:

http://www.volkerschatz.com/noise/alsa.html

... slightly hacked to use snd_pcm_hw_params_test_rate for each rate explicitly.

I notice that when the ELD contains no results in common with the codec, alsacap says:

  Device 7, ID `NVIDIA HDMI', name `NVIDIA HDMI', 1 subdevices (1 available)
Error opening sound device for card 1, device 7: Hotplug device has been removed.  Skipping.

... which I guess does make sense, since there's no possibility of actually using the
device. However, when there is no device connected, this patch sets the PCM's
capabilities to the codec's capabilities. Does this make sense; should ALSA behave
the same as above? I suppose for safety, it may be better to attempt to let things
work in case there is some bug blocking the ELD data.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the Alsa-devel mailing list