Em Quarta-feira 04 Fevereiro 2009, às 15:01:26, Jean-Pierre André escreveu:
Hi Herton,
I have identified why applying your patch broke the sound worse on my computer, by reverting each individual modification until the sound comes back. It has not brought overall improvements for me, but this might help you getting it right.
Hmm yes, for now just disregard my original patch, I think the default pin configs inside it are not right/needed for HP laptops.
On my computer, the main problem is an IRQ one, which I knew you did not address, but I still wanted to know if something would improve (see below)
<snip>
Your patch contained the following, mostly deleting code which was replaced :
switch (spec->board_config) {
case STAC_HP_M4:
/* enable internal microphone */
stac92xx_set_config_reg(codec, 0x0e, 0x01813040);
stac92xx_auto_set_pinctl(codec, 0x0e,
AC_PINCTL_IN_EN | AC_PINCTL_VREF_80);
/* fallthru */
case STAC_DELL_M4_2:
spec->num_dmics = 0;
spec->num_smuxes = 0;
spec->num_dmuxes = 0;
break;
case STAC_DELL_M4_1:
case STAC_DELL_M4_3:
spec->num_dmics = 1;
spec->num_smuxes = 0;
spec->num_dmuxes = 0;
break;
default:
spec->num_dmics = STAC92HD71BXX_NUM_DMICS;
spec->num_smuxes = ARRAY_SIZE(stac92hd71bxx_smux_nids);
spec->num_dmuxes = ARRAY_SIZE(stac92hd71bxx_dmux_nids);
};
spec->multiout.num_dacs = 1; spec->multiout.hp_nid = 0x11; spec->multiout.dac_nids = stac92hd71bxx_dac_nids;
if (spec->dinput_mux)
spec->private_dimux.num_items +=
- spec->private_dimux.num_items += spec->num_dmics - (ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1);
The main bad thing is the following line which is indicated as unchanged, but which does not appear in alsa 1.0.19, so I cannot tell if this line is wrong by itself or if this line requires some other code not present in alsa 1.0.19. With this line present I get no sound at all :
spec->multiout.num_dacs = 1;
The second point is you have deleted and not replaced the following :
/* enable internal microphone */
stac92xx_set_config_reg(codec, 0x0e, 0x01813040);
stac92xx_auto_set_pinctl(codec, 0x0e,
AC_PINCTL_IN_EN | AC_PINCTL_VREF_80);
This line is required to get a PCM control in the sound volume controls. It is also related to getting the following in the syslog :
Line In at Ext Rear Jack as /devices/pci0000:00/0000:00:1b.0/input/input61
To me, "internal microphone", "PCM control" and "Line In at Ext Rear Jack" are different things (and in my computer there is no rear jack !), so there must be something wrong in the configuration.
I don't know now if the default pin configs in my patch had something missing/wrong, or something in current patch_sigmatel.c autoconfig code needs this additional forced line-in to avoid hitting some case, but I thought it's better to let away the pin configs I added. In the new patches I rebased and posted the forced line-in is left unchanged.
With these two changes to your patch, I get the same results as with alsa 1.0.19.
This was tested on a HP dv4-1115ef, with a sound device identified as :
Codec: IDT 92HD71B7X Codec: Generic 10de ID 3 vendor id : 111d76b2 subsyst id 103c30f7 revis id 100302
Regards
Jean-Pierre
-- []'s Herton