[alsa-devel] [PATCH] hda: Add logic to force HP mixer creation
Mario Limonciello
mario_limonciello at dell.com
Tue Feb 17 19:02:22 CET 2009
I've tested the patch, and it does greatly aid userfriendliness. the
"Surround" mixer no longer has a function, but it's clear that you need
to turn up the Headphone mixer to make headphones work.
Here's the alsa-info.sh output with that patch applied and the other s14
patch applied to the latest git snapshot from today. I thought you
mentioned the s14 patch was applied to git, but I didn't see it in the
snapshot for some reason.
Takashi Iwai wrote:
> At Sun, 15 Feb 2009 11:01:01 -0500,
> Matthew Ranostay wrote:
>
>> In some instances like a laptop PCI_QUIRK you may want to force a
>> headphone mixer otherwise a "Front" mixer would be in its place, this
>> is to aid user friendlyness.
>>
>> Signed-off-by: Matthew Ranostay <mranostay at embeddedalley.com>
>>
>
> Well, the change looks a bit too ad hoc.
> Could you give alsa-info.sh output for this?
>
>
> thanks,
>
> Takashi
>
>
>> ---
>> sound/pci/hda/patch_sigmatel.c | 25 ++++++++++++++++++-------
>> 1 files changed, 18 insertions(+), 7 deletions(-)
>>
>> diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
>> index aeb5d21..e02a187 100644
>> --- a/sound/pci/hda/patch_sigmatel.c
>> +++ b/sound/pci/hda/patch_sigmatel.c
>> @@ -168,6 +168,7 @@ struct sigmatel_spec {
>> unsigned int surr_switch: 1;
>> unsigned int alt_switch: 1;
>> unsigned int hp_detect: 1;
>> + unsigned int hp_mixer: 1;
>> unsigned int spdif_mute: 1;
>> unsigned int check_volume_offset:1;
>>
>> @@ -857,9 +858,9 @@ static struct hda_verb stac92hd73xx_10ch_core_init[] = {
>> };
>>
>> static struct hda_verb stac92hd83xxx_core_init[] = {
>> - { 0xa, AC_VERB_SET_CONNECT_SEL, 0x1},
>> - { 0xb, AC_VERB_SET_CONNECT_SEL, 0x1},
>> - { 0xd, AC_VERB_SET_CONNECT_SEL, 0x0},
>> + { 0xa, AC_VERB_SET_CONNECT_SEL, 0x0},
>> + { 0xb, AC_VERB_SET_CONNECT_SEL, 0x0},
>> + { 0xd, AC_VERB_SET_CONNECT_SEL, 0x1},
>>
>> /* power state controls amps */
>> { 0x01, AC_VERB_SET_EAPD, 1 << 2},
>> @@ -3115,12 +3116,12 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
>> "Front", "Surround", NULL /*CLFE*/, "Side"
>> };
>> hda_nid_t nid = 0;
>> - int i, err;
>> + int i, idx = 0, err;
>> unsigned int wid_caps;
>>
>> for (i = 0; i < cfg->line_outs && spec->multiout.dac_nids[i]; i++) {
>> nid = spec->multiout.dac_nids[i];
>> - if (i == 2) {
>> + if (idx == 2) {
>> /* Center/LFE */
>> err = create_controls(codec, "Center", nid, 1);
>> if (err < 0)
>> @@ -3139,9 +3140,9 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
>> if (err < 0)
>> return err;
>> }
>> -
>> + idx++;
>> } else {
>> - const char *name = chname[i];
>> + const char *name = chname[idx];
>> /* if it's a single DAC, assign a better name */
>> if (!i && is_unique_dac(spec, nid)) {
>> switch (cfg->line_out_type) {
>> @@ -3153,6 +3154,10 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
>> break;
>> }
>> }
>> + if (!i && spec->hp_mixer)
>> + name = "Headphone";
>> + else
>> + idx++;
>> err = create_controls(codec, name, nid, 3);
>> if (err < 0)
>> return err;
>> @@ -4894,6 +4899,12 @@ again:
>> break;
>> }
>>
>> + switch (spec->board_config) {
>> + case STAC_DELL_S14:
>> + spec->hp_mixer = 1;
>> + break;
>> + }
>> +
>> err = stac92xx_parse_auto_config(codec, 0x1d, 0);
>> if (!err) {
>> if (spec->board_config < 0) {
>> --
>> 1.5.6.3
>>
>>
--
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello at dell.com
-------------- next part --------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 1.0.19.11.g5fc41.195.g772ce+s14+headphone_logic.alsa-info.txt
Url: http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090217/6024d163/attachment-0001.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090217/6024d163/attachment-0001.sig
More information about the Alsa-devel
mailing list