[alsa-devel] [PATCH 0/4] Intel HDMI audio fixes

Takashi Iwai tiwai at suse.de
Sat Feb 14 11:28:05 CET 2009


At Fri, 13 Feb 2009 09:28:22 -0800,
Shane W wrote:
> 
> On Thu, Feb 12, 2009 at 12:41:11PM +0800, Wu Fengguang wrote:
> >         static const char        *channel_name[MAX_CHANNELS] = {
> >           /*  0 */ N_("Front Left"),
> >           /*  1 */ N_("Front Right"),
> >           /*  2 */ N_("Rear Left"),
> >           /*  3 */ N_("Rear Right"),
> >           /*  4 */ N_("Center"),       /* wav file is "Front Center.wav" */
> >           /*  5 */ N_("LFE"),          /* wav file is "Rear Center.wav" */
> >           /*  6 */ N_("Side Left"),
> >           /*  7 */ N_("Side Right"),
> > 
> > Whereas the HDMI channel mapping selected for 6-channel playback is
> > 
> >         { .ca_index = 0x0b,  .speakers = {   0,    0,  RR,  RL,  FC,  LFE,  FR,  FL } },
> > 
> > Here the two mappings disagree on channels other than Front Left/Right.
> > 
> > In theory the channel mapping should be adjusted via AC_VERB_SET_HDMI_CHAN_SLOT.
> > However I found that verb takes no effect for G35/G45. So I'm afraid
> > there's no trivial ways we can adjust the channel mapping.
> 
> If the driver can't reorder the channels to what ALSA
> needs, is it possible to do it somewhere else like
> HDA-Intel.conf and use the routing plugin somehow to
> reorder things.  Say for plughw:0,3 or modify the
> surround51 device?
> 
> I don't know much about this interface but it looks like
> channel routing is possible here.

Well, it's a good question.  Right now, surround51 is used for the
analog output which usually has the "right" ALSA channel mapping.  So,
we need to detect and switch the mapping using a plugin on the fly,
and that's not so trivial. 

Besides, the problem arises when both analog 5.1 and HDMI 5.1 are
implemented in the same "card".  Since a "card" is defined by a
controller, not by a codec as now, one card may have both 5.1
outputs.

We might need to switch to a codec-based card approach sometime later,
but I've postponed it simply because it can break so easily the
compatibility with older versions...


Anyway, the channel mapping issue is a missing piece.  There are a few
more issues, some to be implemented and some to be improved and fixed.


Takashi


More information about the Alsa-devel mailing list