updates for Intel SandyBridge/CougarPoint HDMI codec V2
cover updates for Intel SandyBridge/CougarPoint HDMI codec V2
Hi Takashi,
The Intel SandyBridge/CougarPoint HDMI codec is very similar to the IbexPeak HDMI codec, except that it exports one more Audio Converter.
Now we have 3 Audio Converters, each of them present one HDMI PCM device:
(and expect a 4th HDMI PCM device in future)
$ aplay -l | grep HDMI card 0: PCH [HDA Intel PCH], device 3: INTEL HDMI 0 [INTEL HDMI 0] card 0: PCH [HDA Intel PCH], device 7: INTEL HDMI 1 [INTEL HDMI 1] card 0: PCH [HDA Intel PCH], device 8: INTEL HDMI 2 [INTEL HDMI 2]
So enable devices minors to support more than 8 PCM playback devices.
Thanks,
Fengguang
PATCH 1/4 intelhdmi - add dependency on SND_DYNAMIC_MINORS
This is necessary to support >=3 HDMI playback devices starting from the CougarPoint codec.
--- sound/pci/hda/Kconfig | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/Kconfig +1 -0
@@ -145,6 +145,7 @@ config SND_HDA_CODEC_NVHDMI config SND_HDA_CODEC_INTELHDMI bool "Build INTEL HDMI HD-audio codec support" + select SND_DYNAMIC_MINORS default y help Say Y here to include INTEL HDMI HD-audio codec support in
PATCH 2/4 intelhdmi - user friendly codec name
In reply to Wu FengguangUse the full chipset codename as codec name.
They are more user friendly than the spec abbrs.
--- sound/pci/hda/patch_intelhdmi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
sound/pci/hda/patch_intelhdmi.c +8 -8
@@ -185,14 +185,14 @@ static int patch_intel_hdmi(struct hda_c }static struct hda_codec_preset snd_hda_preset_intelhdmi[] = { - { .id =0x808629fb , .name ="G45 DEVCL" , .patch = patch_intel_hdmi }, - { .id =0x80862801 , .name ="G45 DEVBLC" , .patch = patch_intel_hdmi }, - { .id =0x80862802 , .name ="G45 DEVCTG" , .patch = patch_intel_hdmi }, - { .id =0x80862803 , .name ="G45 DEVELK" , .patch = patch_intel_hdmi }, - { .id =0x80862804 , .name ="G45 DEVIBX" , .patch = patch_intel_hdmi }, - { .id =0x80860054 , .name ="Q57 DEVIBX" , .patch = patch_intel_hdmi }, - { .id =0x10951392 , .name ="SiI1392 HDMI" , .patch = patch_intel_hdmi }, - {}/* terminator */ +{ .id =0x808629fb , .name ="Crestline HDMI" , .patch = patch_intel_hdmi }, +{ .id =0x80862801 , .name ="Bearlake HDMI" , .patch = patch_intel_hdmi }, +{ .id =0x80862802 , .name ="Cantiga HDMI" , .patch = patch_intel_hdmi }, +{ .id =0x80862803 , .name ="Eaglelake HDMI" , .patch = patch_intel_hdmi }, +{ .id =0x80862804 , .name ="IbexPeak HDMI" , .patch = patch_intel_hdmi }, +{ .id =0x80860054 , .name ="IbexPeak HDMI" , .patch = patch_intel_hdmi }, +{ .id =0x10951392 , .name ="SiI1392 HDMI" , .patch = patch_intel_hdmi }, +{}/* terminator */ };MODULE_ALIAS ("snd-hda-codec-id:808629fb" );
PATCH 3/4 intelhdmi - add id for the CougarPoint chipset
In reply to Wu FengguangAdd id for Intel CougarPoint HDMI audio codec.
CougarPoint provides 3 Audio Converters.
Increase MAX_HDMI_CVTS/MAX_HDMI_PINS accordingly.
--- sound/pci/hda/patch_intelhdmi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/pci/hda/patch_intelhdmi.c +4 -1
@@ -40,7 +40,7 @@* * The HDA correspondence of pipes/ports are converter/pin nodes. */ -#define MAX_HDMI_CVTS 2 +#define MAX_HDMI_CVTS 3#define MAX_HDMI_PINS 3#include "patch_hdmi.c"
@@ -48,6 +48,7 @@static char *intel_hdmi_pcm_names[MAX_HDMI_CVTS ] = {"INTEL HDMI 0" ,"INTEL HDMI 1" , +"INTEL HDMI 2" , };/*
@@ -191,6 +192,7 @@ static struct hda_codec_preset snd_hda_p { .id = 0x80862803, .name = "Eaglelake HDMI", .patch = patch_intel_hdmi }, { .id = 0x80862804, .name = "IbexPeak HDMI", .patch = patch_intel_hdmi }, { .id = 0x80860054, .name = "IbexPeak HDMI", .patch = patch_intel_hdmi }, +{ .id = 0x80862805, .name = "CougarPoint HDMI", .patch = patch_intel_hdmi }, { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi }, {}/* terminator */ };
@@ -200,6 +202,7 @@ MODULE_ALIAS("snd-hda-codec-id:80862801"MODULE_ALIAS ("snd-hda-codec-id:80862802" );MODULE_ALIAS ("snd-hda-codec-id:80862803" );MODULE_ALIAS ("snd-hda-codec-id:80862804" ); +MODULE_ALIAS ("snd-hda-codec-id:80862805" );MODULE_ALIAS ("snd-hda-codec-id:80860054" );MODULE_ALIAS ("snd-hda-codec-id:10951392" );
PATCH 4/4 hdmi - dont fail on extra nodes
In reply to Wu FengguangThe number of HDMI nodes is expected to go up in future. So don't fail hard on seeing extra converter/pin nodes.
We can still operate safely on the nodes within
MAX_HDMI_CVTS/MAX_HDMI_PINS.
--- sound/pci/hda/patch_hdmi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
sound/pci/hda/patch_hdmi.c +4 -6
@@ -766,7 +766,7 @@ static int hdmi_add_pin(struct hda_codecif (spec->num_pins >=MAX_HDMI_PINS ) {snd_printk (KERN_WARNING "HDMI: no space for pin %d\n" , pin_nid); -return -EINVAL ; +return -E2BIG ; }hdmi_present_sense (codec, pin_nid, &spec->sink_eld[spec->num_pins]);
@@ -788,7 +788,7 @@ static int hdmi_add_cvt(struct hda_codecif (spec->num_cvts >=MAX_HDMI_CVTS ) {snd_printk (KERN_WARNING "HDMI: no space for converter %d\n" , nid); -return -EINVAL ; +return -E2BIG ; } spec->cvt[spec->num_cvts] = nid;
@@ -820,15 +820,13 @@ static int hdmi_parse_codec(struct hda_cswitch (type) {case AC_WID_AUD_OUT : -if (hdmi_add_cvt (codec, nid) <0 ) -return -EINVAL ; +hdmi_add_cvt (codec, nid);break ;case AC_WID_PIN : caps =snd_hda_param_read (codec, nid,AC_PAR_PIN_CAP );if (!(caps & (AC_PINCAP_HDMI |AC_PINCAP_DP )))continue ; -if (hdmi_add_pin (codec, nid) <0 ) -return -EINVAL ; +hdmi_add_pin (codec, nid);break ; } }
Takashi Iwai
AppliedAt Fri, 14 May 2010 16:36:11 +0800,
Quoted 9 lines · Wu Fengguang
Hi Takashi,
The Intel SandyBridge/CougarPoint HDMI codec is very similar to the IbexPeak HDMI codec, except that it exports one more Audio Converter.
Now we have 3 Audio Converters, each of them present one HDMI PCM device:
(and expect a 4th HDMI PCM device in future)
Quoted 6 lines
$ aplay -l | grep HDMI card 0: PCH [HDA Intel PCH], device 3: INTEL HDMI 0 [INTEL HDMI 0] card 0: PCH [HDA Intel PCH], device 7: INTEL HDMI 1 [INTEL HDMI 1] card 0: PCH [HDA Intel PCH], device 8: INTEL HDMI 2 [INTEL HDMI 2]So enable devices minors to support more than 8 PCM playback devices.
Applied all patches now. Thanks.
Takashi