Skip to contentSkip to conversation

Support for Compaq Presario F700 - model 755US - NVidia MCP67 Audio - Codec Conexant 5051

DISCUSSION Philippe Paravicini 5 participants 8 messages Jan 19, 2008 – Jan 21, 2008 Sound

lore
Share & tools
lore
#0 lore raw

I recently purchased the laptop listed above and installed kubuntu-7.10-desktop-amd64 Feisty on it.

The sound card works, but, much to my chagrin, plugging in the headphone jack does not mute the speaker.

<wining>
This is less than ideal for me because I use Skype quite a bit, and work in a no-walls small office with other people. Having the ability to use my headset for talking on the phone and drowning out ambient noise is important. </wining><deepbreath/>

I have googled high and low and have tried various suggested solutions, including changing:

options snd-hda-intel model=laptop

in /etc/modprobe.d/alsa-base to various settings (laptop-hp, laptop-eahd, test).

I have also downloaded, compiled and installed the 1.0.15 driver and utils according to the instructions at:

https://help.ubuntu.com/community/HdaIntelSoundHowto

without success.

I consulted the page at:

http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt

dated 2007-10-11 and could note see support for the Conexant 5051 Codec or NVidia MCP67 Audio.

Has anyone had experience with this soundcard/codec and gotten the headphones jack to mute the speakers correctly ?

Any help would be greatly appreciated. I am a java programmer with very high reverence for linux C-programmers and would be happy to help test a patch for this device (I may need a little help to get going), or trade for java programming/consulting. Please let me know if you additional information other than the one listed below.

Thank you kindly for any help.

Sincerely,

Philippe Paravicini

lspci -v outputs:
...
00:07.0 Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1)
Subsystem: Hewlett-Packard Company Unknown device 30ea
...

lspci -vn
...
00:07.0 0403: 10de:055c (rev a1)
Subsystem: 103c:30ea
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21
Memory at f6480000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [44] Power Management version 2
Capabilities: [50] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/0 Enable-
Capabilities: [6c] HyperTransport: MSI Mapping
...

cat /proc/asound/card0/codec#0

Codec: Conexant ID 5051
Address: 0
Vendor Id: 0x14f15051
Subsystem Id: 0x103c30ea
Revision Id: 0x100000
Modem Function Group: 0x2
Default PCM:

    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM

Default Amp-In caps: N/A
Default Amp-Out caps: N/A
Node 0x10 [Audio Output] wcaps 0xc1d: Stereo Amp-Out
Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=0 Amp-Out vals: [0x3a 0x3a]
PCM:

    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM

Power: 0x0
Node 0x11 [Audio Output] wcaps 0xc1d: Stereo Amp-Out
Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=0 Amp-Out vals: [0x4a 0x4a]
PCM:

    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: 0x0
Node 0x12 [Audio Output] wcaps 0x211: Stereo Digital
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3

Node 0x13 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=0 Amp-Out vals: [0x00]
Node 0x14 [Audio Input] wcaps 0x100d1b: Stereo Amp-In
Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=0 Amp-In vals: [0x06 0x06] [0x35 0x35]
PCM:

    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: 0x0
  Connection: 2
     0x1d 0x17*

Node 0x15 [Audio Input] wcaps 0x100d1b: Stereo Amp-In
Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=0 Amp-In vals: [0x4a 0x4a]
PCM:

    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: 0x0
  Connection: 1
     0x18

Node 0x16 [Pin Complex] wcaps 0x400581: Stereo
Pincap 0x081c: OUT HP Detect
Pin Default 0x02211030: [Jack] HP Out at Ext Front
Conn = 1/8, Color = Black
Pin-ctls: 0xc0: OUT HP
Power: 0x0
Connection: 2

     0x10* 0x11

Node 0x17 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0 Amp-In vals:
Pincap 0x081224: IN Detect
Pin Default 0x02a19020: [Jack] Mic at Ext Front
Conn = 1/8, Color = Pink
Pin-ctls: 0x24: IN
Power: 0x0
Node 0x18 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0 Amp-In vals:
Pincap 0x081224: IN Detect
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x00:
Power: 0x0
Node 0x19 [Pin Complex] wcaps 0x400581: Stereo
Pincap 0x0814: OUT Detect
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x00:
Power: 0x0
Connection: 2

     0x10 0x11*

Node 0x1a [Pin Complex] wcaps 0x400501: Stereo
Pincap 0x0810010: OUT EAPD
Pin Default 0x95170110: [Fixed] Speaker at Int Top
Conn = Analog, Color = Unknown
Pin-ctls: 0x40: OUT
Power: 0x0
Connection: 2

     0x10* 0x11

Node 0x1b [Pin Complex] wcaps 0x400500: Mono
Pincap 0x0810010: OUT EAPD
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x40: OUT
Power: 0x0
Connection: 2

     0x10* 0x11

Node 0x1c [Pin Complex] wcaps 0x400701: Stereo Digital
Pincap 0x0810: OUT
Pin Default 0x224511f0: [Jack] SPDIF Out at Sep Front
Conn = Optical, Color = Black
Pin-ctls: 0x00:
Power: 0x0
Connection: 1

     0x12

Node 0x1d [Pin Complex] wcaps 0x40040b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0 Amp-In vals:
Pincap 0x0820: IN
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x00:
Power: 0x0
Node 0x1e [Vendor Defined Widget] wcaps 0xf00000: Mono

#1 lore raw

I have already requested documentation and a development board from Conexant, so I should be able to get a fully functional driver going soon. In the meantime, I'll try to get a test patch out to you as soon as possible.

Tobin

Quoted 181 lines · Philippe Paravicini

I recently purchased the laptop listed above and installed kubuntu-7.10-desktop-amd64 Feisty on it.

The sound card works, but, much to my chagrin, plugging in the headphone jack does not mute the speaker.

<wining>
This is less than ideal for me because I use Skype quite a bit, and work in a no-walls small office with other people. Having the ability to use my headset for talking on the phone and drowning out ambient noise is important. </wining><deepbreath/>

I have googled high and low and have tried various suggested solutions, including changing:

options snd-hda-intel model=laptop

in /etc/modprobe.d/alsa-base to various settings (laptop-hp, laptop-eahd, test).

I have also downloaded, compiled and installed the 1.0.15 driver and utils according to the instructions at:

https://help.ubuntu.com/community/HdaIntelSoundHowto

without success.

I consulted the page at:

http://www.mjmwired.net/kernel/Documentation/sound/alsa/ALSA-Configuration.txt

dated 2007-10-11 and could note see support for the Conexant 5051 Codec or NVidia MCP67 Audio.

Has anyone had experience with this soundcard/codec and gotten the headphones jack to mute the speakers correctly ?

Any help would be greatly appreciated. I am a java programmer with very high reverence for linux C-programmers and would be happy to help test a patch for this device (I may need a little help to get going), or trade for java programming/consulting. Please let me know if you additional information other than the one listed below.

Thank you kindly for any help.

Sincerely,

Philippe Paravicini

lspci -v outputs:
...
00:07.0 Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1)
Subsystem: Hewlett-Packard Company Unknown device 30ea
...

lspci -vn
...
00:07.0 0403: 10de:055c (rev a1)
Subsystem: 103c:30ea
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 21
Memory at f6480000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [44] Power Management version 2
Capabilities: [50] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/0 Enable-
Capabilities: [6c] HyperTransport: MSI Mapping
...

cat /proc/asound/card0/codec#0

Codec: Conexant ID 5051
Address: 0
Vendor Id: 0x14f15051
Subsystem Id: 0x103c30ea
Revision Id: 0x100000
Modem Function Group: 0x2
Default PCM:

    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM

Default Amp-In caps: N/A
Default Amp-Out caps: N/A
Node 0x10 [Audio Output] wcaps 0xc1d: Stereo Amp-Out
Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=0 Amp-Out vals: [0x3a 0x3a]
PCM:

    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM

Power: 0x0
Node 0x11 [Audio Output] wcaps 0xc1d: Stereo Amp-Out
Amp-Out caps: ofs=0x4a, nsteps=0x4a, stepsize=0x03, mute=0 Amp-Out vals: [0x4a 0x4a]
PCM:

    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: 0x0
Node 0x12 [Audio Output] wcaps 0x211: Stereo Digital
  PCM:
    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x5]: PCM AC3

Node 0x13 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=0 Amp-Out vals: [0x00]
Node 0x14 [Audio Input] wcaps 0x100d1b: Stereo Amp-In
Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=0 Amp-In vals: [0x06 0x06] [0x35 0x35]
PCM:

    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: 0x0
  Connection: 2
     0x1d 0x17*

Node 0x15 [Audio Input] wcaps 0x100d1b: Stereo Amp-In
Amp-In caps: ofs=0x4a, nsteps=0x50, stepsize=0x03, mute=0 Amp-In vals: [0x4a 0x4a]
PCM:

    rates [0x160]: 44100 48000 96000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power: 0x0
  Connection: 1
     0x18

Node 0x16 [Pin Complex] wcaps 0x400581: Stereo
Pincap 0x081c: OUT HP Detect
Pin Default 0x02211030: [Jack] HP Out at Ext Front
Conn = 1/8, Color = Black
Pin-ctls: 0xc0: OUT HP
Power: 0x0
Connection: 2

     0x10* 0x11

Node 0x17 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0 Amp-In vals:
Pincap 0x081224: IN Detect
Pin Default 0x02a19020: [Jack] Mic at Ext Front
Conn = 1/8, Color = Pink
Pin-ctls: 0x24: IN
Power: 0x0
Node 0x18 [Pin Complex] wcaps 0x40048b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0 Amp-In vals:
Pincap 0x081224: IN Detect
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x00:
Power: 0x0
Node 0x19 [Pin Complex] wcaps 0x400581: Stereo
Pincap 0x0814: OUT Detect
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x00:
Power: 0x0
Connection: 2

     0x10 0x11*

Node 0x1a [Pin Complex] wcaps 0x400501: Stereo
Pincap 0x0810010: OUT EAPD
Pin Default 0x95170110: [Fixed] Speaker at Int Top
Conn = Analog, Color = Unknown
Pin-ctls: 0x40: OUT
Power: 0x0
Connection: 2

     0x10* 0x11

Node 0x1b [Pin Complex] wcaps 0x400500: Mono
Pincap 0x0810010: OUT EAPD
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x40: OUT
Power: 0x0
Connection: 2

     0x10* 0x11

Node 0x1c [Pin Complex] wcaps 0x400701: Stereo Digital
Pincap 0x0810: OUT
Pin Default 0x224511f0: [Jack] SPDIF Out at Sep Front
Conn = Optical, Color = Black
Pin-ctls: 0x00:
Power: 0x0
Connection: 1

     0x12

Node 0x1d [Pin Complex] wcaps 0x40040b: Stereo Amp-In
Amp-In caps: ofs=0x00, nsteps=0x04, stepsize=0x27, mute=0 Amp-In vals:
Pincap 0x0820: IN
Pin Default 0x400001f0: [N/A] Line Out at Ext N/A
Conn = Unknown, Color = Unknown
Pin-ctls: 0x00:
Power: 0x0
Node 0x1e [Vendor Defined Widget] wcaps 0xf00000: Mono
_______________________________________________
Alsa-devel mailing list [email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 6 lines
Tobin Davis  


BOFH excuse #206:

Police are examining all internet packets in the search for a narco-net-trafficker
#2 lore raw
Quoted 4 lines · Tobin Davis

I have already requested documentation and a development board from Conexant, so I should be able to get a fully functional driver going soon. In the meantime, I'll try to get a test patch out to you as soon as possible.

If this is the Hermosa codec (see
http://helllabs.org/codecgraph/out/hp-spartan-ng.svg), Herton has just finished fully functional support to it, based on the HP "Spartan 1.1" laptop (subdevice ID is 14f1:5051).

Herton, did you submit the patches for Hermosa support to the list?

#3 lore raw

Em Saturday 19 January 2008 12:45:52 Claudio Matsuoka escreveu:

Quoted 9 lines · Tobin Davis
Quoted 4 lines

I have already requested documentation and a development board from Conexant, so I should be able to get a fully functional driver going soon. In the meantime, I'll try to get a test patch out to you as soon as possible.

If this is the Hermosa codec (see
http://helllabs.org/codecgraph/out/hp-spartan-ng.svg), Herton has just finished fully functional support to it, based on the HP "Spartan 1.1"

Yes, it was working, but there were some things to sort out, like the Spartan 1.1 doesn't have to switch between capture source as each mic (int, ext) has its own adc, and I hacked it without removing the capture source from mixer.

Also I worked on the same code provided by hsfmodem, that already has support for 5051, but I don't know why it wasn't sent upstream yet by Conexant/hsfmodem people.

Quoted 3 lines

laptop (subdevice ID is 14f1:5051).

Herton, did you submit the patches for Hermosa support to the list?

No, as I didn't fixed the patches for proper submission, and the part of hsfmodem probably Conexant/Linuxant people should send with proper Signed-offs etc. But anyway I'll attach here the patches for reference, that are not ready for inclusion and will not apply to current alsa tree.

The patch that adds code with support for the Hermosa chip is entirely from hsfmodem-7.68.00.04full [1]. Note that hsfmodem has its proprietary part but this is only GPL code, and Linuxant also adds a Copyright for this code at the start of the patch_conexant.c that isn't in this patch ("Copyright (c) 2005-2006 Linuxant Inc."), as this patch applies above others in local tree here that after integrates with hsfmodem licensed by HP (copyright line is added by another patch).

The other patch is my hacked modifications to support the Spartan 1.1 (yes, it's ugly, should be a separate model), that also needs to remove Capture Source mixer item that doesn't make sense for it.

[1]
http://www.linuxant.com/drivers/hsf/full/downloads.php ->
http://www.linuxant.com/drivers/hsf/full/archive/hsfmodem-7.68.00.04full/hsfmodem-7.68.00.04full.tar.gz

--
[]'s
Herton

Conexant 5051 support from hsfmodem-7.68.00.04full
(http://www.linuxant.com/drivers/hsf/full/archive/hsfmodem-7.68.00.04full/hsfmodem-7.68.00.04full.tar.gz)

sound/pci/hda/patch_conexant.c renamed from sound/pci/hda/patch_conexant.c.orig +346 -0
@@ -1641,11 +1641,357 @@ static int patch_cxt5047(struct hda_code
 	return 0;
 }
 
+
+/* Conexant 5051 specific */
+static hda_nid_t cxt5051_dac_nids[1] = { 0x10 };
+static hda_nid_t cxt5051_adc_nids[1] = { 0x14 };
+static hda_nid_t cxt5051_capsrc_nids[1] = { 0x14 };
+#define CXT5051_SPDIF_OUT	0x1C
+#define CXT5051_PORTB_EVENT	0x38
+#define CXT5051_PORTC_EVENT	0x39
+
+static struct hda_channel_mode cxt5051_modes[1] = {
+	{ 2, NULL },
+};
+
+static struct hda_input_mux cxt5051_capture_source = {
+	.num_items = 2,
+	.items = {
+		{ "IntMic", 0x1 },
+		{ "LineIn", 0x2 },
+	}
+};
+
+/* turn on/off EAPD (+ mute HP) as a master switch */
+static int cxt5051_hp_master_sw_put(struct snd_kcontrol *kcontrol,
+				    struct snd_ctl_elem_value *ucontrol)
+{
+	static struct hda_verb spk_on[] = {
+		{0x1A, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+		{}
+	};
+	static struct hda_verb spk_off[] = {
+		{0x1A, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
+		{}
+	};
+	static struct hda_verb hp_on[] = {
+		{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+		{}
+	};
+	static struct hda_verb hp_off[] = {
+		{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
+		{}
+	};
+	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+	struct conexant_spec *spec = codec->spec;
+	unsigned int bits;
+
+	if (!cxt_eapd_put(kcontrol, ucontrol))
+		return 0;
+
+	/* toggle internal speakers mute depending of presence of
+	 * the headphone jack
+	 */
+	bits = (!spec->hp_present && spec->cur_eapd) ? 0 : 0x80;
+	if (bits)
+		snd_hda_sequence_write(codec, spk_off);
+	else
+		snd_hda_sequence_write(codec, spk_on);
+
+	bits = (spec->cur_eapd) ? 0 : 0x80;
+	if (bits)
+		snd_hda_sequence_write(codec, hp_off);
+	else
+		snd_hda_sequence_write(codec, hp_on);
+
+	return 1;
+}
+
+/* bind volumes of both NID 0x10 and 0x11 */
+static int cxt5051_hp_master_vol_put(struct snd_kcontrol *kcontrol,
+				     struct snd_ctl_elem_value *ucontrol)
+{
+	struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
+	long *valp = ucontrol->value.integer.value;
+	int change;
+
+	change = snd_hda_codec_amp_update(codec, 0x10, 0, HDA_OUTPUT, 0,
+					  0x7f, valp[0] & 0x7f);
+	change |= snd_hda_codec_amp_update(codec, 0x10, 1, HDA_OUTPUT, 0,
+					   0x7f, valp[1] & 0x7f);
+	return change;
+}
+
+/* toggle input of built-in and mic jack appropriately */
+static void cxt5051_portb_automic(struct hda_codec *codec)
+{
+	static struct hda_verb mic_jack_on[] = {
+		{0x14, AC_VERB_SET_CONNECT_SEL,0x1},
+		{}
+	};
+	static struct hda_verb mic_jack_off[] = {
+		{0x14, AC_VERB_SET_CONNECT_SEL,0x1},
+		{}
+	};
+	unsigned int present;
+
+	present = snd_hda_codec_read(codec, 0x17, 0,
+				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+	printk(KERN_DEBUG"cxt5051_portb_automic present =%x\n",present);
+
+	if (present)
+		snd_hda_sequence_write(codec, mic_jack_on);
+	else
+		snd_hda_sequence_write(codec, mic_jack_off);
+
+}
+
+static void cxt5051_portc_automic(struct hda_codec *codec)
+{
+/*
+	static struct hda_verb mic_jack_on[] = {
+		{}
+	};
+	static struct hda_verb mic_jack_off[] = {
+		{}
+	};
+	unsigned int present;
+
+	present = snd_hda_codec_read(codec, 0x18, 0,
+				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+	printk(KERN_DEBUG"cxt5051_portc_automic present =%x\n",present);
+
+	if (present)
+		snd_hda_sequence_write(codec, mic_jack_on);
+	else
+		snd_hda_sequence_write(codec, mic_jack_off);
+*/
+}
+
+/* mute internal speaker if HP is plugged */
+static void cxt5051_hp_automute(struct hda_codec *codec)
+{
+	static struct hda_verb spk_on[] = {
+		{0x1A, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
+		{}
+	};
+	static struct hda_verb spk_off[] = {
+		{0x1A, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
+		{}
+	};
+
+	struct conexant_spec *spec = codec->spec;
+	unsigned int bits;
+
+	spec->hp_present = snd_hda_codec_read(codec, 0x16, 0,
+				     AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
+
+
+	bits = (spec->hp_present || !spec->cur_eapd) ? 0x80 : 0; 
+	if (bits)
+		snd_hda_sequence_write(codec, spk_off);
+	else
+		snd_hda_sequence_write(codec, spk_on);
+
+	printk(KERN_DEBUG"cxt5051_hp_automute bits =%x\n",bits);
+}
+
+/* unsolicited event for HP jack sensing */
+static void cxt5051_hp_unsol_event(struct hda_codec *codec,
+				   unsigned int res)
+{
+	switch (res >> 26) {
+	case CONEXANT_HP_EVENT:
+		cxt5051_hp_automute(codec);
+		break;
+	case CXT5051_PORTB_EVENT:
+		cxt5051_portb_automic(codec);
+		break;
+	case CXT5051_PORTC_EVENT:
+		cxt5051_portc_automic(codec);
+		break;
+
+	default:
+		conexant_unsol_event(codec, res);
+		break;
+
+	}
+}
+
+static struct snd_kcontrol_new cxt5051_mixers[] = {
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "Capture Source",
+		.info = conexant_mux_enum_info,
+		.get = conexant_mux_enum_get,
+		.put = conexant_mux_enum_put
+	},
+//	HDA_CODEC_VOLUME("Int Mic Volume", 0x14, 0x00, HDA_INPUT),
+//	HDA_CODEC_MUTE("Int Mic Switch", 0x14, 0x00, HDA_INPUT),
+	HDA_CODEC_VOLUME("Mic Volume", 0x14, 0x01, HDA_INPUT),
+	HDA_CODEC_MUTE("Mic Switch", 0x14, 0x01, HDA_INPUT),
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "Master Playback Volume",
+		.info = snd_hda_mixer_amp_volume_info,
+		.get = snd_hda_mixer_amp_volume_get,
+		.put = cxt5051_hp_master_vol_put,
+		.private_value = HDA_COMPOSE_AMP_VAL(0x10, 3, 0, HDA_OUTPUT),
+	},
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "Master Playback Switch",
+		.info = cxt_eapd_info,
+		.get = cxt_eapd_get,
+		.put = cxt5051_hp_master_sw_put,
+		.private_value = 0x1A,
+	},
+
+	{}
+};
+
+static struct hda_verb cxt5051_init_verbs[] = {
+	/* Line in, Mic */
+	{0x17, AC_VERB_SET_AMP_GAIN_MUTE,AC_AMP_SET_INPUT|AC_AMP_SET_LEFT
+	|AC_AMP_SET_RIGHT|0x2},
+	{0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 },
+	{0x18, AC_VERB_SET_AMP_GAIN_MUTE,AC_AMP_SET_INPUT|AC_AMP_SET_LEFT
+	|AC_AMP_SET_RIGHT|0x2},
+	{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 },
+	{0x1D, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
+	/* SPK  */
+	{0x1A, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
+	{0x1A, AC_VERB_SET_CONNECT_SEL,0x00},
+	/* HP, Amp  */
+	{0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP|PIN_OUT },
+	{0x16, AC_VERB_SET_CONNECT_SEL,0x00},
+	/* DAC1 */	
+	{0x10, AC_VERB_SET_AMP_GAIN_MUTE,
+	 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x01},
+	{0x10, AC_VERB_SET_AMP_GAIN_MUTE,
+	 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x02},
+	{0x10, AC_VERB_SET_AMP_GAIN_MUTE,
+	 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x03},
+	{0x10, AC_VERB_SET_AMP_GAIN_MUTE,
+	 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x04},
+	/* Record selector: Int mic */
+	{0x14, AC_VERB_SET_AMP_GAIN_MUTE,
+	 AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x44},
+	{0x14, AC_VERB_SET_AMP_GAIN_MUTE,AC_AMP_SET_INPUT|AC_AMP_SET_RIGHT|
+	AC_AMP_SET_LEFT|0x44|1<<AC_AMP_SET_INDEX_SHIFT},
+	/* SPDIF route: PCM */
+	{ 0x1C, AC_VERB_SET_CONNECT_SEL, 0x0 },
+	/* EAPD */
+	{0x1A, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ 
+	{0x16, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CONEXANT_HP_EVENT},
+	{0x17, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CXT5051_PORTB_EVENT},
+	{0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | CXT5051_PORTC_EVENT},
+	{ } /* end */
+};
+
+
+#if 0
+static struct hda_verb cxt5051_mic_wid1d_init_verbs[] = {
+	/* pin sensing on HP jack */
+	{0x14, AC_VERB_SET_CONNECT_SEL,0x0},
+	{ } /* end */
+};
+#endif
+
+/* For HP's configuration always use portB as Internal and External Mic */
+static struct hda_verb cxt5051_mic_wid17_init_verbs[] = {
+	/* pin sensing on HP jack */
+	{0x14, AC_VERB_SET_CONNECT_SEL,0x1},
+	{ } /* end */
+};
+
+
+/* initialize jack-sensing, too */
+static int cxt5051_init(struct hda_codec *codec)
+{
+	conexant_init(codec);
+	return 0;
+}
+
+
+enum {
+	CXT5051_LAPTOP,	 /* Laptops w/ EAPD support */
+	CXT5051_MODELS
+};
+
+static const char *cxt5051_models[CXT5051_MODELS] = {
+	[CXT5051_LAPTOP]	= "laptop",
+};
+
+static struct snd_pci_quirk cxt5051_cfg_tbl[] = {
+	SND_PCI_QUIRK(0x14F1, 0x0101, "Conexant Reference board", CXT5051_LAPTOP),
+	{}
+};
+
+static int patch_cxt5051(struct hda_codec *codec)
+{
+	struct conexant_spec *spec;
+	int board_config;
+
+	spec = kzalloc(sizeof(*spec), GFP_KERNEL);
+	if (!spec)
+		return -ENOMEM;
+	mutex_init(&spec->amp_mutex);
+	codec->spec = spec;
+
+	spec->multiout.max_channels = 2;
+	spec->multiout.num_dacs = ARRAY_SIZE(cxt5051_dac_nids);
+	spec->multiout.dac_nids = cxt5051_dac_nids;
+	spec->multiout.dig_out_nid = CXT5051_SPDIF_OUT;
+	spec->num_adc_nids = 1;
+	spec->adc_nids = cxt5051_adc_nids;
+	spec->capsrc_nids = cxt5051_capsrc_nids;
+	spec->input_mux = &cxt5051_capture_source;
+	spec->num_mixers = 1;
+	spec->mixers[0] = cxt5051_mixers;
+	spec->num_init_verbs = 1;
+	spec->init_verbs[0] = cxt5051_init_verbs;
+	spec->spdif_route = 0;
+	spec->num_channel_mode = ARRAY_SIZE(cxt5051_modes),
+	spec->channel_mode = cxt5051_modes,
+
+
+	codec->patch_ops = conexant_patch_ops;
+
+	board_config = snd_hda_check_board_config(codec, CXT5051_MODELS,
+						  cxt5051_models,
+						  cxt5051_cfg_tbl);
+	switch (board_config) {
+	default:
+	case CXT5051_LAPTOP:
+		codec->patch_ops.unsol_event = cxt5051_hp_unsol_event;
+		spec->input_mux = &cxt5051_capture_source;
+		spec->num_init_verbs = 2;
+		spec->init_verbs[1] = cxt5051_mic_wid17_init_verbs;
+		spec->mixers[0] = cxt5051_mixers;
+		codec->patch_ops.init = cxt5051_init;
+		break;
+	}
+
+	if(codec->mfg) {
+		int (*cnxthwhda_probe)(void *codec, struct device *hwDev, void **ppDevNode);
+		cnxthwhda_probe = (void*)symbol_request(cnxthwhda_probe);
+		if(cnxthwhda_probe)
+			symbol_put(cnxthwhda_probe);
+		else
+			printk(KERN_ERR"%s: symbol_request(cnxthwhda_probe) failed\n", __FUNCTION__);
+	}
+
+	return 0;
+}
+
 struct hda_codec_preset snd_hda_preset_conexant[] = {
 	{ .id = 0x14f15045, .name = "CX20549 (Venice)",
 	  .patch = patch_cxt5045 },
 	{ .id = 0x14f15047, .name = "CX20551 (Waikiki)",
 	  .patch = patch_cxt5047 },
+	{ .id = 0x14f15051, .name = "CX20561 (Hermosa)",
+	  .patch = patch_cxt5051 },
 	{ .id = 0x14f12bfa, .mfg = 2, .name = "HSF",
 	  .patch = patch_cxthsf },
 	{ .id = 0x14f12c06, .mfg = 2, .name = "HSF",
sound/pci/hda/patch_conexant.c renamed from sound/pci/hda/patch_conexant.c.orig +35 -27

174 lines not on this page · raw message

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#4 lore raw

At Sat, 19 Jan 2008 21:23:29 -0200,

Quoted 20 lines · Herton Ronaldo Krzesinski

Em Saturday 19 January 2008 12:45:52 Claudio Matsuoka escreveu:

Quoted 9 lines · Tobin Davis
Quoted 4 lines

I have already requested documentation and a development board from Conexant, so I should be able to get a fully functional driver going soon. In the meantime, I'll try to get a test patch out to you as soon as possible.

If this is the Hermosa codec (see
http://helllabs.org/codecgraph/out/hp-spartan-ng.svg), Herton has just finished fully functional support to it, based on the HP "Spartan 1.1"

Yes, it was working, but there were some things to sort out, like the Spartan 1.1 doesn't have to switch between capture source as each mic (int, ext) has its own adc, and I hacked it without removing the capture source from mixer.

Also I worked on the same code provided by hsfmodem, that already has support for 5051, but I don't know why it wasn't sent upstream yet by Conexant/hsfmodem people.

Quoted 8 lines
Quoted 3 lines

laptop (subdevice ID is 14f1:5051).

Herton, did you submit the patches for Hermosa support to the list?

No, as I didn't fixed the patches for proper submission, and the part of hsfmodem probably Conexant/Linuxant people should send with proper Signed-offs etc. But anyway I'll attach here the patches for reference, that are not ready for inclusion and will not apply to current alsa tree.

Thanks. Do you happen to know how linuxant guys think of the patch submission? Of couse, the HSF modem part can be never merged to the upstream, but the sane GPL'ed part could be good to merge.

Takashi

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

#5 lore raw

Em Monday 21 January 2008 09:03:30 Takashi Iwai escreveu:

Quoted 27 lines

At Sat, 19 Jan 2008 21:23:29 -0200,

Quoted 24 lines · Herton Ronaldo Krzesinski

Em Saturday 19 January 2008 12:45:52 Claudio Matsuoka escreveu:

Quoted 9 lines · Tobin Davis
Quoted 4 lines

I have already requested documentation and a development board from Conexant, so I should be able to get a fully functional driver going soon. In the meantime, I'll try to get a test patch out to you as soon as possible.

If this is the Hermosa codec (see
http://helllabs.org/codecgraph/out/hp-spartan-ng.svg), Herton has just finished fully functional support to it, based on the HP "Spartan 1.1"

Yes, it was working, but there were some things to sort out, like the Spartan 1.1 doesn't have to switch between capture source as each mic (int, ext) has its own adc, and I hacked it without removing the capture source from mixer.

Also I worked on the same code provided by hsfmodem, that already has support for 5051, but I don't know why it wasn't sent upstream yet by Conexant/hsfmodem people.

Quoted 3 lines

laptop (subdevice ID is 14f1:5051).

Herton, did you submit the patches for Hermosa support to the list?

Quoted 8 lines
Quoted 4 lines

No, as I didn't fixed the patches for proper submission, and the part of hsfmodem probably Conexant/Linuxant people should send with proper Signed-offs etc. But anyway I'll attach here the patches for reference, that are not ready for inclusion and will not apply to current alsa tree.

Thanks. Do you happen to know how linuxant guys think of the patch submission? Of couse, the HSF modem part can be never merged to the upstream, but the sane GPL'ed part could be good to merge.

Hi, don't know too, I'll try to contact Linuxant and ask about submission for Hermosa support.

Quoted 3 lines

Takashi

--
[]'s
Herton

#6 lore raw

I already did. They said they'd submit a patch sometime soon. As a matter of fact, I just got a message in my inbox from them, that I'll forward.

Tobin

Quoted 51 lines · Herton Ronaldo Krzesinski

Em Monday 21 January 2008 09:03:30 Takashi Iwai escreveu:

Quoted 27 lines

At Sat, 19 Jan 2008 21:23:29 -0200,

Quoted 24 lines · Herton Ronaldo Krzesinski

Em Saturday 19 January 2008 12:45:52 Claudio Matsuoka escreveu:

Quoted 9 lines · Tobin Davis
Quoted 4 lines

I have already requested documentation and a development board from Conexant, so I should be able to get a fully functional driver going soon. In the meantime, I'll try to get a test patch out to you as soon as possible.

If this is the Hermosa codec (see
http://helllabs.org/codecgraph/out/hp-spartan-ng.svg), Herton has just finished fully functional support to it, based on the HP "Spartan 1.1"

Yes, it was working, but there were some things to sort out, like the Spartan 1.1 doesn't have to switch between capture source as each mic (int, ext) has its own adc, and I hacked it without removing the capture source from mixer.

Also I worked on the same code provided by hsfmodem, that already has support for 5051, but I don't know why it wasn't sent upstream yet by Conexant/hsfmodem people.

Quoted 3 lines

laptop (subdevice ID is 14f1:5051).

Herton, did you submit the patches for Hermosa support to the list?

Quoted 8 lines
Quoted 4 lines

No, as I didn't fixed the patches for proper submission, and the part of hsfmodem probably Conexant/Linuxant people should send with proper Signed-offs etc. But anyway I'll attach here the patches for reference, that are not ready for inclusion and will not apply to current alsa tree.

Thanks. Do you happen to know how linuxant guys think of the patch submission? Of couse, the HSF modem part can be never merged to the upstream, but the sane GPL'ed part could be good to merge.

Hi, don't know too, I'll try to contact Linuxant and ask about submission for Hermosa support.

Quoted 3 lines

Takashi

--
[]'s
Herton
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#7 lore raw

Good news ! I installed the patch at:

Quoted 1 line

http://www.linuxant.com/alsa-hg-20080120.patch

and was able to get the jack to mute the speakers. I also tested w/ skype and the mic appears to work properly. I understand from the email from the linuxant people that there may still be a couple of issues with the driver, but from my perspective it solved my short-term problem (jack not muting the speakers). I also see that the alsa-mixer and kmixer have more settings.

Thank you very much for your help,
let me know if I can help you test the patch further.

Open Source rocks !

Philippe Paravicini

For the sake of posterity, I describe below the steps that I took to install the patched driver.

The patch above, as stated in the email forwarded by the linuxant folks is relative to the current source in the mercurial source repository as of around 2008-11-20. It will not work against the current 1.0.15 source distribution, or prior sources.

Hence, one needs to download the source from the source repository.

I followed these steps:

1. 'apt-get install mercurial' (for debian/ubuntu folks) to install the mercurial source repository client

2. download the 'alsa-driver' and 'alsa-kernel' sources as indicated at:

http://www.alsa-project.org/main/index.php/SourceCodeRepository

I installed these in /usr/src/alsa

3. download the patch:

	http://www.linuxant.com/alsa-hg-20080120.patch

4. patch the alsa-kernel/pci/hda folder:

	cp alsa-hg-20080120.pach alsa-kernel/pci/hda
	cd alsa-kernel/pci/hda
	patch -i alsa-hg-20080120.patch    (should run w/o errors)

5. consult the alsa-driver/INSTALL file, section 'Compiling from HG Sources'
6. cd alsa-driver
7. ./hgcompile
8. make install
9. reboot (there is probably a shorter way to reload the driver)

Note that before taking the steps above, I attempted to fix the problem by installing from source the latest 1.0.15 version of the alsa-driver, alsa-libs and alsa-utils projects, as described in:

https://help.ubuntu.com/community/HdaIntelSoundHowto

Hence, I do not know whether the patched drive above will work when used with versions 1.0.14 and prior of the alsa-libs and alsa-utils projects.

---- Original Message ----

Subject: Re: [alsa-devel] Support for Compaq Presario F700 - model 755US -
NVidia MCP67 Audio - Codec Conexant 5051
Date: Monday 21 January 2008
From: Tobin Davis <[email protected]>
To: Herton Ronaldo Krzesinski <[email protected]>

Quoted 63 lines

I already did. They said they'd submit a patch sometime soon. As a matter of fact, I just got a message in my inbox from them, that I'll forward.

Tobin

Quoted 44 lines · Herton Ronaldo Krzesinski

Em Monday 21 January 2008 09:03:30 Takashi Iwai escreveu:

Quoted 34 lines

At Sat, 19 Jan 2008 21:23:29 -0200,

Quoted 23 lines · Herton Ronaldo Krzesinski

Em Saturday 19 January 2008 12:45:52 Claudio Matsuoka escreveu:

Quoted 10 lines · Tobin Davis
Quoted 4 lines

I have already requested documentation and a development board from Conexant, so I should be able to get a fully functional driver going soon. In the meantime, I'll try to get a test patch out to you as soon as possible.

If this is the Hermosa codec (see
http://helllabs.org/codecgraph/out/hp-spartan-ng.svg), Herton has just finished fully functional support to it, based on the HP "Spartan 1.1"

Yes, it was working, but there were some things to sort out, like the Spartan 1.1 doesn't have to switch between capture source as each mic (int, ext) has its own adc, and I hacked it without removing the capture source from mixer.

Also I worked on the same code provided by hsfmodem, that already has support for 5051, but I don't know why it wasn't sent upstream yet by Conexant/hsfmodem people.

Quoted 2 lines

laptop (subdevice ID is 14f1:5051).

Quoted 7 lines
Quoted 1 line

Herton, did you submit the patches for Hermosa support to the list?

No, as I didn't fixed the patches for proper submission, and the part of hsfmodem probably Conexant/Linuxant people should send with proper Signed-offs etc. But anyway I'll attach here the patches for reference, that are not ready for inclusion and will not apply to current alsa tree.

Quoted 3 lines

Thanks. Do you happen to know how linuxant guys think of the patch submission? Of couse, the HSF modem part can be never merged to the upstream, but the sane GPL'ed part could be good to merge.

Hi, don't know too, I'll try to contact Linuxant and ask about submission for Hermosa support.

Quoted 1 line

Takashi

Quoted 7 lines

--
[]'s
Herton
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel