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

Takashi Iwai tiwai at suse.de
Fri Aug 13 08:50:06 CEST 2010


At Thu, 12 Aug 2010 14:02:45 -0700,
Stephen Warren wrote:
> 
> 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.

I chose the current behavior for apps (e.g. a sound daemon) that probe
devices at start up.  That is, I wanted to make probing working
without HDMI plugged since most apps assume the static sound
configuration, thus they won't update the status.

I'm going to apply the patch now to sound git tree.
Let me know if you find any issue with it.


thanks,

Takashi


More information about the Alsa-devel mailing list