All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Ranostay <mranostay@embeddedalley.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] hda: Add logic to force HP mixer creation
Date: Mon, 16 Feb 2009 18:34:35 -0500	[thread overview]
Message-ID: <4999F80B.9020808@embeddedalley.com> (raw)
In-Reply-To: <s5hiqnaiwa1.wl%tiwai@suse.de>

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@embeddedalley.com>
> 
> Well, the change looks a bit too ad hoc.
> Could you give alsa-info.sh output for this?
> 

http://www.alsa-project.org/db/?f=1cd2363ec823c8c2db005acf996608da67ff7a3e

> 
> 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
>>
> 

  reply	other threads:[~2009-02-16 23:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15 16:01 [PATCH] hda: Add logic to force HP mixer creation Matthew Ranostay
2009-02-16  9:08 ` Takashi Iwai
2009-02-16 23:34   ` Matthew Ranostay [this message]
2009-02-17 17:16     ` Takashi Iwai
2009-02-17 18:02   ` Mario Limonciello
2009-02-17 18:28     ` Takashi Iwai
2009-02-17 19:27       ` Mario Limonciello
2009-02-17 20:42         ` Matthew Ranostay
2009-02-17 20:44         ` Takashi Iwai
2009-02-17 21:06           ` Mario Limonciello
2009-02-18  6:43             ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4999F80B.9020808@embeddedalley.com \
    --to=mranostay@embeddedalley.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.