Wrong channel order with multichannel HDMI on MCP7A
Hi all!
I have a motherboard with NVIDIA MCP7A HDMI audio.
However, multichannel audio is not mapped properly into the HDMI order.
On 5.1, I get RL in FC, RR in LFE, FC in RL, LFE in RR.
Interestingly, this is not consistent with the ALSA channel order (FL FR RL RR FC LFE) being passed directly to HDMI (FL FR LFE FC RL RR). Instead it looks like there has been a waveformatex (FL FR FC LFE RL RR; windows?) => HDMI conversion instead of ALSA => HDMI.
Same happens for 7.1.
Is it possible to set the hardware to do an ALSA => HDMI conversion instead? If not, we should manually compensate for this somewhere, right?
Somewhat relatedly, trying to output 4 channels results in silence only. Trying to output 3 or 5 channels triggers a timeout with I/O error, with the following in the kernel log: "ALSA pcm_lib.c:1757: playback write error (DMA or IRQ trouble?)"
I used a git alsa-kmirror from few days ago on 2.6.35-rc4 for testing. Speaker-test and alsa-lib were 1.0.23.
Signature · 1 line
Anssi Hannula
At Sun, 25 Jul 2010 19:51:39 +0300,
Quoted 13 lines · Anssi Hannula
Hi all!
I have a motherboard with NVIDIA MCP7A HDMI audio.
However, multichannel audio is not mapped properly into the HDMI order.On 5.1, I get RL in FC, RR in LFE, FC in RL, LFE in RR.
Interestingly, this is not consistent with the ALSA channel order (FL FR RL RR FC LFE) being passed directly to HDMI (FL FR LFE FC RL RR). Instead it looks like there has been a waveformatex (FL FR FC LFE RL RR; windows?) => HDMI conversion instead of ALSA => HDMI.
Quoted 4 lines
Same happens for 7.1.
Is it possible to set the hardware to do an ALSA => HDMI conversion instead? If not, we should manually compensate for this somewhere, right?
Does the patch below change anything?
Quoted 1 line
Somewhat relatedly, trying to output 4 channels results in silence only.
Although 5.1/7.1 work?
Quoted 3 lines
Trying to output 3 or 5 channels triggers a timeout with I/O error, with the following in the kernel log: "ALSA pcm_lib.c:1757: playback write error (DMA or IRQ trouble?)"
HD-audio doesn't support the odd number of channels in general, so they should be played as 4 or 6 channels. But, it looks like something wrong in the setup...
thanks,
Takashi
---
sound/pci/hda/patch_nvhdmi.c +2 -0
@@ -511,6 +511,8 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) codec->patch_ops = nvhdmi_patch_ops_8ch_7x; +init_channel_allocations (); +return 0 ; }
Takashi Iwai kirjoitti maanantai, 26. heinäkuuta 2010 12:14:17:
Quoted 15 lines
At Sun, 25 Jul 2010 19:51:39 +0300,
Quoted 12 lines · Anssi Hannula
Hi all!
I have a motherboard with NVIDIA MCP7A HDMI audio.
However, multichannel audio is not mapped properly into the HDMI order.On 5.1, I get RL in FC, RR in LFE, FC in RL, LFE in RR.
Interestingly, this is not consistent with the ALSA channel order (FL FR RL RR FC LFE) being passed directly to HDMI (FL FR LFE FC RL RR). Instead it looks like there has been a waveformatex (FL FR FC LFE RL RR; windows?) => HDMI conversion instead of ALSA => HDMI.
Quoted 7 lines
Quoted 5 lines
Same happens for 7.1.
Is it possible to set the hardware to do an ALSA => HDMI conversion instead? If not, we should manually compensate for this somewhere, right?
Does the patch below change anything?
AFAICS no stuff from patch_hdmi.c is used for MCP7x, so it has no effect. Tested anyway, it doesn't change anything.
Quoted 3 lines
Quoted 1 line
Somewhat relatedly, trying to output 4 channels results in silence only.
Although 5.1/7.1 work?
Yep, with wrong channel order.
Quoted 26 lines
Quoted 3 lines
Trying to output 3 or 5 channels triggers a timeout with I/O error, with the following in the kernel log: "ALSA pcm_lib.c:1757: playback write error (DMA or IRQ trouble?)"
HD-audio doesn't support the odd number of channels in general, so they should be played as 4 or 6 channels. But, it looks like something wrong in the setup...
thanks,
Takashi
---
sound/pci/hda/patch_nvhdmi.c +2
-0@@ -511,6 +511,8 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) codec->patch_ops = nvhdmi_patch_ops_8ch_7x; +init_channel_allocations (); +return 0 ; }
Signature · 1 line
Anssi Hannula
At Mon, 26 Jul 2010 11:14:17 +0200,
Quoted 16 lines · 私 wrote:
At Sun, 25 Jul 2010 19:51:39 +0300,
Quoted 13 lines · Anssi Hannula
Hi all!
I have a motherboard with NVIDIA MCP7A HDMI audio.
However, multichannel audio is not mapped properly into the HDMI order.On 5.1, I get RL in FC, RR in LFE, FC in RL, LFE in RR.
Interestingly, this is not consistent with the ALSA channel order (FL FR RL RR FC LFE) being passed directly to HDMI (FL FR LFE FC RL RR). Instead it looks like there has been a waveformatex (FL FR FC LFE RL RR; windows?) => HDMI conversion instead of ALSA => HDMI.
Quoted 6 lines
Quoted 4 lines
Same happens for 7.1.
Is it possible to set the hardware to do an ALSA => HDMI conversion instead? If not, we should manually compensate for this somewhere, right?
Does the patch below change anything?
Ah crap, it should be irrelevant.
Wei, don't MCP 7x chips support the channel mapping as MCP 89?
thanks,
Takashi
Quoted 23 lines
Quoted 1 line
Somewhat relatedly, trying to output 4 channels results in silence only.
Although 5.1/7.1 work?
Quoted 3 lines
Trying to output 3 or 5 channels triggers a timeout with I/O error, with the following in the kernel log: "ALSA pcm_lib.c:1757: playback write error (DMA or IRQ trouble?)"
HD-audio doesn't support the odd number of channels in general, so they should be played as 4 or 6 channels. But, it looks like something wrong in the setup...
thanks,
Takashi
---
sound/pci/hda/patch_nvhdmi.c +0
-0
sound/pci/hda/patch_nvhdmi.c static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) · line 518
Quoted 8 lines
sound/pci/hda/patch_nvhdmi.c +2
-0@@ -511,6 +511,8 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) codec->patch_ops = nvhdmi_patch_ops_8ch_7x; +init_channel_allocations (); +return 0 ; }
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Hi, Takashi
MCP7x use old HW design in HDMI, they don't support channel mapping like MCP89. It use nvhdmi_dig_playback_pcm_prepare_8ch() to prepare channel mapping and steam id,format.
Anssi Hannula
Please try the following changes in patch_nvhdmi.c
static hda_nid_t nvhdmi_con_nids_7x[4] = {
/*front, rear, clfe, rear_surr */- 0x6, 0x8, 0xa, 0xc,
+ 0x6, 0xa, 0x8, 0xc,
};
Thanks
Wei.
-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Monday, July 26, 2010 5:35 PM
To: Anssi Hannula
Cc: [email protected]; Wei Ni
Subject: Re: [alsa-devel] Wrong channel order with multichannel HDMI on MCP7A
At Mon, 26 Jul 2010 11:14:17 +0200,
Quoted 16 lines · 私 wrote:
At Sun, 25 Jul 2010 19:51:39 +0300,
Quoted 13 lines · Anssi Hannula
Hi all!
I have a motherboard with NVIDIA MCP7A HDMI audio.
However, multichannel audio is not mapped properly into the HDMI order.On 5.1, I get RL in FC, RR in LFE, FC in RL, LFE in RR.
Interestingly, this is not consistent with the ALSA channel order (FL FR RL RR FC LFE) being passed directly to HDMI (FL FR LFE FC RL RR). Instead it looks like there has been a waveformatex (FL FR FC LFE RL RR; windows?) => HDMI conversion instead of ALSA => HDMI.
Quoted 6 lines
Quoted 4 lines
Same happens for 7.1.
Is it possible to set the hardware to do an ALSA => HDMI conversion instead? If not, we should manually compensate for this somewhere, right?
Does the patch below change anything?
Ah crap, it should be irrelevant.
Wei, don't MCP 7x chips support the channel mapping as MCP 89?
thanks,
Takashi
Quoted 23 lines
Quoted 1 line
Somewhat relatedly, trying to output 4 channels results in silence only.
Although 5.1/7.1 work?
Quoted 3 lines
Trying to output 3 or 5 channels triggers a timeout with I/O error, with the following in the kernel log: "ALSA pcm_lib.c:1757: playback write error (DMA or IRQ trouble?)"
HD-audio doesn't support the odd number of channels in general, so they should be played as 4 or 6 channels. But, it looks like something wrong in the setup...
thanks,
Takashi
---
sound/pci/hda/patch_nvhdmi.c +0
-0
sound/pci/hda/patch_nvhdmi.c static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) · line 518
Quoted 8 lines
sound/pci/hda/patch_nvhdmi.c +2
-0@@ -511,6 +511,8 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) codec->patch_ops = nvhdmi_patch_ops_8ch_7x; +init_channel_allocations (); +return 0 ; }
-----------------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------------
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Wei Ni kirjoitti tiistai, 27. heinäkuuta 2010 10:14:37:
Quoted 11 lines
Hi, Takashi
MCP7x use old HW design in HDMI, they don't support channel mapping like MCP89. It usenvhdmi_dig_playback_pcm_prepare_8ch()to prepare channel mapping and steam id,format.Anssi Hannula
Please try the following changes inpatch_nvhdmi.cstatic hda_nid_t nvhdmi_con_nids_7x[4] = { /*front, rear, clfe, rear_surr */(quoted diff) +1
-1- 0x6, 0x8, 0xa, 0xc, + 0x6, 0xa, 0x8, 0xc,
Quoted 1 line
};
I actually tried that already, but for some reason changing the order in nvhdmi_con_nids_7x doesn't have any effect.
Actually, disabling the whole for loop that assigns the channels in nvhdmi_dig_playback_pcm_prepare_8ch() has no effect, leading me to believe that the commands are not reaching the hardware or they are being overridden.
I also just noticed that the HDMI output is the only detected output, even though this board has analog audio and S/PDIF outputs as well. I'm not sure if this is related or not.
Quoted 88 lines
-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Monday, July 26, 2010 5:35 PM
To: Anssi Hannula
Cc: [email protected]; Wei Ni
Subject: Re: [alsa-devel] Wrong channel order with multichannel HDMI on MCP7AAt Mon, 26 Jul 2010 11:14:17 +0200,
Quoted 15 lines · 私 wrote:
At Sun, 25 Jul 2010 19:51:39 +0300,
Quoted 12 lines · Anssi Hannula
Hi all!
I have a motherboard with NVIDIA MCP7A HDMI audio.
However, multichannel audio is not mapped properly into the HDMI order.On 5.1, I get RL in FC, RR in LFE, FC in RL, LFE in RR.
Interestingly, this is not consistent with the ALSA channel order (FL FR RL RR FC LFE) being passed directly to HDMI (FL FR LFE FC RL RR). Instead it looks like there has been a waveformatex (FL FR FC LFE RL RR; windows?) => HDMI conversion instead of ALSA => HDMI.
Quoted 7 lines
Quoted 5 lines
Same happens for 7.1.
Is it possible to set the hardware to do an ALSA => HDMI conversion instead? If not, we should manually compensate for this somewhere, right?
Does the patch below change anything?
Ah crap, it should be irrelevant.
Wei, don't MCP 7x chips support the channel mapping as MCP 89?thanks,
Takashi
Quoted 33 lines
Quoted 2 lines
Somewhat relatedly, trying to output 4 channels results in silence only.
Although 5.1/7.1 work?
Quoted 3 lines
Trying to output 3 or 5 channels triggers a timeout with I/O error, with the following in the kernel log: "ALSA pcm_lib.c:1757: playback write error (DMA or IRQ trouble?)"
HD-audio doesn't support the odd number of channels in general, so they should be played as 4 or 6 channels. But, it looks like something wrong in the setup...
thanks,
Takashi
---
sound/pci/hda/patch_nvhdmi.c +2
-0@@ -511,6 +511,8 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) codec->patch_ops = nvhdmi_patch_ops_8ch_7x; +init_channel_allocations (); +return 0 ;Quoted 1 line
}
---------------------------------------------------------------------------
-------- 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.
---------------------------------------------------------------------------
-------- _______________________________________________ Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Signature · 5 lines
Anssi Hannula _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Anssi Hannula kirjoitti keskiviikko, 28. heinäkuuta 2010 05:42:09:
Quoted 19 lines
Wei Ni kirjoitti tiistai, 27. heinäkuuta 2010 10:14:37:
Quoted 13 lines
Hi, Takashi
MCP7x use old HW design in HDMI, they don't support channel mapping like MCP89. It usenvhdmi_dig_playback_pcm_prepare_8ch()to prepare channel mapping and steam id,format.Anssi Hannula
Please try the following changes inpatch_nvhdmi.cstatichda_nid_tnvhdmi_con_nids_7x[4] = {/*front, rear, clfe, rear_surr */(quoted diff) +1
-1- 0x6, 0x8, 0xa, 0xc, + 0x6, 0xa, 0x8, 0xc,Quoted 1 line
};
I actually tried that already, but for some reason changing the order in
nvhdmi_con_nids_7xdoesn't have any effect.
Quoted 4 lines
Actually, disabling the whole for loop that assigns the channels in
nvhdmi_dig_playback_pcm_prepare_8ch()has no effect, leading me to believe that the commands are not reaching the hardware or they are being overridden.
Well, I confirmed with AC_VERB_GET_CONV that they are getting through, and they are still the same in nvhdmi_dig_playback_pcm_close_8ch_7x().
Any idea why they are having no effect?
Quoted 3 lines
I also just noticed that the HDMI output is the only detected output, even though this board has analog audio and S/PDIF outputs as well. I'm not sure if this is related or not.
This was not related, updating to latest git fixed it.
Quoted 89 lines
Quoted 89 lines
-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Monday, July 26, 2010 5:35 PM
To: Anssi Hannula
Cc: [email protected]; Wei Ni
Subject: Re: [alsa-devel] Wrong channel order with multichannel HDMI on MCP7AAt Mon, 26 Jul 2010 11:14:17 +0200,
Quoted 16 lines · 私 wrote:
At Sun, 25 Jul 2010 19:51:39 +0300,
Quoted 13 lines · Anssi Hannula
Hi all!
I have a motherboard with NVIDIA MCP7A HDMI audio. However, multichannel audio is not mapped properly into the HDMI order.
On 5.1, I get RL in FC, RR in LFE, FC in RL, LFE in RR.
Interestingly, this is not consistent with the ALSA channel order (FL FR RL RR FC LFE) being passed directly to HDMI (FL FR LFE FC RL RR). Instead it looks like there has been a waveformatex (FL FR FC LFE RL RR; windows?) => HDMI conversion instead of ALSA => HDMI.
Quoted 7 lines
Quoted 5 lines
Same happens for 7.1.
Is it possible to set the hardware to do an ALSA => HDMI conversion instead? If not, we should manually compensate for this somewhere, right?
Does the patch below change anything?
Ah crap, it should be irrelevant.
Wei, don't MCP 7x chips support the channel mapping as MCP 89?thanks,
Takashi
Quoted 33 lines
Quoted 2 lines
Somewhat relatedly, trying to output 4 channels results in silence only.
Although 5.1/7.1 work?
Quoted 3 lines
Trying to output 3 or 5 channels triggers a timeout with I/O error, with the following in the kernel log: "ALSA pcm_lib.c:1757: playback write error (DMA or IRQ trouble?)"
HD-audio doesn't support the odd number of channels in general, so they should be played as 4 or 6 channels. But, it looks like something wrong in the setup...
thanks,
Takashi
---
(quoted diff) +0
-0
b/sound/pci/hda/patch_nvhdmi.cindex 3c10c0b..7355c60 100644sound/pci/hda/patch_nvhdmi.c +2
-0@@ -511,6 +511,8 @@ static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) codec->patch_ops = nvhdmi_patch_ops_8ch_7x; +init_channel_allocations (); +return 0 ;Quoted 1 line
}
-------------------------------------------------------------------------
-- -------- 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.
-------------------------------------------------------------------------
-- -------- _______________________________________________ Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Signature · 5 lines
Anssi Hannula _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: Wrong channel order with multichannel HDMI on NVIDIA MCP7A
Anssi Hannula kirjoitti torstai, 29. heinäkuuta 2010 17:41:15:
Quoted 25 lines
Anssi Hannula kirjoitti keskiviikko, 28. heinäkuuta 2010 05:42:09:
Quoted 19 lines
Wei Ni kirjoitti tiistai, 27. heinäkuuta 2010 10:14:37:
Quoted 13 lines
Hi, Takashi
MCP7x use old HW design in HDMI, they don't support channel mapping like MCP89. It usenvhdmi_dig_playback_pcm_prepare_8ch()to prepare channel mapping and steam id,format.Anssi Hannula
Please try the following changes inpatch_nvhdmi.cstatichda_nid_tnvhdmi_con_nids_7x[4] = {/*front, rear, clfe, rear_surr */(quoted diff) +1
-1- 0x6, 0x8, 0xa, 0xc, + 0x6, 0xa, 0x8, 0xc,Quoted 1 line
};
I actually tried that already, but for some reason changing the order in
nvhdmi_con_nids_7xdoesn't have any effect.Quoted 4 lines
Actually, disabling the whole for loop that assigns the channels in
nvhdmi_dig_playback_pcm_prepare_8ch()has no effect, leading me to believe that the commands are not reaching the hardware or they are being overridden.
Quoted 4 lines
Well, I confirmed with
AC_VERB_GET_CONVthat they are getting through, and they are still the same innvhdmi_dig_playback_pcm_close_8ch_7x().Any idea why they are having no effect?
If this can't be fixed (either due to hardware or missing documentation), how can this be workarounded in alsa?
Only idea I can come up with is reserving a special device index in hda-intel for use with "broken hdmi", which can then be handled in HDA-Intel.conf with an appropriate ttable.. But that would be rather ugly.
Also, do we know if this affects all MCP7x devices or a subset of them?
Signature · 5 lines
Anssi Hannula _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: Wrong channel order with multichannel HDMI on NVIDIA MCP7A
At Tue, 3 Aug 2010 22:01:47 +0300,
Quoted 32 lines · Anssi Hannula
Anssi Hannula kirjoitti torstai, 29. heinäkuuta 2010 17:41:15:
Quoted 25 lines
Anssi Hannula kirjoitti keskiviikko, 28. heinäkuuta 2010 05:42:09:
Quoted 19 lines
Wei Ni kirjoitti tiistai, 27. heinäkuuta 2010 10:14:37:
Quoted 13 lines
Hi, Takashi
MCP7x use old HW design in HDMI, they don't support channel mapping like MCP89. It usenvhdmi_dig_playback_pcm_prepare_8ch()to prepare channel mapping and steam id,format.Anssi Hannula
Please try the following changes inpatch_nvhdmi.cstatichda_nid_tnvhdmi_con_nids_7x[4] = {/*front, rear, clfe, rear_surr */(quoted diff) +1
-1- 0x6, 0x8, 0xa, 0xc, + 0x6, 0xa, 0x8, 0xc,Quoted 1 line
};
I actually tried that already, but for some reason changing the order in
nvhdmi_con_nids_7xdoesn't have any effect.Quoted 4 lines
Actually, disabling the whole for loop that assigns the channels in
nvhdmi_dig_playback_pcm_prepare_8ch()has no effect, leading me to believe that the commands are not reaching the hardware or they are being overridden.Quoted 4 lines
Well, I confirmed with
AC_VERB_GET_CONVthat they are getting through, and they are still the same innvhdmi_dig_playback_pcm_close_8ch_7x().Any idea why they are having no effect?
Quoted 8 lines
If this can't be fixed (either due to hardware or missing documentation), how can this be workarounded in alsa?
Only idea I can come up with is reserving a special device index in hda-intel for use with "broken hdmi", which can then be handled in HDA-Intel.conf with an appropriate ttable.. But that would be rather ugly.
Also, do we know if this affects all MCP7x devices or a subset of them?
Well, this is one of my looong-standing TODOs.
Originally I wanted to implement a new API to get/set the channel-mapping, mainly for HDMI.
But, I've been recently too busy for other tasks (I can spend little time for ALSA), thus it's pending forever.
Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: Wrong channel order with multichannel HDMI on NVIDIA MCP7A
Quoted 5 lines
Well, this is one of my looong-standing TODOs.
Originally I wanted to implement a new API to get/set the channel-mapping, mainly for HDMI.
But, I've been recently too busy for other tasks (I can spend little time for ALSA), thus it's pending forever.
You would only need an API to get the channel mapping. The HDMI sink will report its speaker configuration through a CEA code (section 7.4 of the spec), and if we parsed the EDID info we could present the relevant channel order to user-space apps.
Re: Wrong channel order with multichannel HDMI on NVIDIA MCP7A
pl bossart kirjoitti tiistai, 3. elokuuta 2010 23:15:28:
Quoted 10 lines
Quoted 5 lines
Well, this is one of my looong-standing TODOs.
Originally I wanted to implement a new API to get/set the channel-mapping, mainly for HDMI.
But, I've been recently too busy for other tasks (I can spend little time for ALSA), thus it's pending forever.You would only need an API to get the channel mapping. The HDMI sink will report its speaker configuration through a CEA code (section 7.4 of the spec), and if we parsed the EDID info we could present the relevant channel order to user-space apps.
I'm not sure I see how that will help with the problem of this thread, though, i.e. NVIDIA MCP7A hdmi codec apparently assuming audio being fed in windows channel order instead of alsa channel order.
Signature · 1 line
Anssi Hannula
Re: Wrong channel order with multichannel HDMI on NVIDIA MCP7A
At Tue, 3 Aug 2010 23:32:45 +0300,
Quoted 8 lines · Anssi Hannula
pl bossart kirjoitti tiistai, 3. elokuuta 2010 23:15:28:
Quoted 6 lines
Quoted 5 lines
Well, this is one of my looong-standing TODOs.
Originally I wanted to implement a new API to get/set the channel-mapping, mainly for HDMI.
But, I've been recently too busy for other tasks (I can spend little time for ALSA), thus it's pending forever.
Quoted 8 lines
Quoted 4 lines
You would only need an API to get the channel mapping. The HDMI sink will report its speaker configuration through a CEA code (section 7.4 of the spec), and if we parsed the EDID info we could present the relevant channel order to user-space apps.
I'm not sure I see how that will help with the problem of this thread, though, i.e. NVIDIA MCP7A hdmi codec apparently assuming audio being fed in windows channel order instead of alsa channel order.
If we get the channel order, the channels could be remapped either by the app itself or an alsa-lib plugin. The channel-map API itself is just a bridge for that...
Takashi
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: Wrong channel order with multichannel HDMI on NVIDIA MCP7A
(restored CC)
Kirjoitit tiistai, 3. elokuuta 2010 23:40:13:
Quoted 17 lines · Anssi Hannula
Quoted 7 lines
pl bossart kirjoitti tiistai, 3. elokuuta 2010 23:15:28:
Quoted 6 lines
Quoted 5 lines
Well, this is one of my looong-standing TODOs.
Originally I wanted to implement a new API to get/set the channel-mapping, mainly for HDMI.
But, I've been recently too busy for other tasks (I can spend little time for ALSA), thus it's pending forever.Quoted 8 lines
Quoted 4 lines
You would only need an API to get the channel mapping. The HDMI sink will report its speaker configuration through a CEA code (section 7.4 of the spec), and if we parsed the EDID info we could present the relevant channel order to user-space apps.
I'm not sure I see how that will help with the problem of this thread, though, i.e. NVIDIA MCP7A hdmi codec apparently assuming audio being fed in windows channel order instead of alsa channel order.
Quoted 5 lines
You can in theory specify the channel order in the InfoFrame (CA field). If you had access to a register to program this, you would no longer be tied to alsa or windows or whatever order. You would just provide ALSA with the channels in the order you configured with the CA code.
The CA field is programmable, but the channel orders are predefined and no arbitrary channel formats are possible (see patch_hdmi.c or the related CEA spec).
The nvhdmi MCP7x codec driver tries to specify a channel order by using the channel_id field in AC_VERB_SET_CHANNEL_STREAMID for the 4 slave digital converters, but it doesn't seem to have any effect (at least on hardware I have; confirmed by swapping the channel_ids around with no effect).
Signature · 1 line
Anssi Hannula
Re: Wrong channel order with multichannel HDMI on NVIDIA MCP7A
In reply to pl bossartAt Tue, 3 Aug 2010 13:15:28 -0700,
Quoted 11 lines · pl bossart
Quoted 6 lines
Well, this is one of my looong-standing TODOs.
Originally I wanted to implement a new API to get/set the channel-mapping, mainly for HDMI.
But, I've been recently too busy for other tasks (I can spend little time for ALSA), thus it's pending forever.You would only need an API to get the channel mapping. The HDMI sink will report its speaker configuration through a CEA code (section 7.4 of the spec), and if we parsed the EDID info we could present the relevant channel order to user-space apps.
But if the hardware is capable of channel-remapping (the intel hdmi code actually does even now), it's better as it works without any software-side channel swaps. Ditto for analog surrounds.
Of course, setting the channel-map is optional. The first step is to provide the API to get the map.
Takashi