aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorChristoph Plattner <christoph.plattner@gmx.at>2009-03-09 19:05:56 -0400
committerTakashi Iwai <tiwai@suse.de>2009-03-10 02:36:19 -0400
commit443e26d014c242623dd70cda054cc6e5ebf7993d (patch)
treed564fdfa37c86387a77eda918745c03fa6a273b7 /sound/pci/hda/patch_sigmatel.c
parentae6241fbf5c8863631532e8069037bae460607be (diff)
ALSA: hda - Rework on patch_sigmatel.c for HP HDX16/HDX18
Code rework, comments of mail tiwai@suse.de (2009-03-09) incorporated. Code tested on HP HDX16 (not tested on HDX18 yet). Signed-off-by: Christoph Plattner <christoph.plattner@gmx.at> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index fb9f4ccba885..d119feed42c9 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4489,14 +4489,10 @@ static int stac92xx_resume(struct hda_codec *codec)
4489 */ 4489 */
4490 4490
4491#ifdef CONFIG_SND_HDA_POWER_SAVE 4491#ifdef CONFIG_SND_HDA_POWER_SAVE
4492static int stac92xx_check_power_status (struct hda_codec * codec, hda_nid_t nid) 4492static int stac92xx_hp_hdx_check_power_status (struct hda_codec * codec, hda_nid_t nid)
4493{ 4493{
4494 struct sigmatel_spec *spec = codec->spec; 4494 struct sigmatel_spec *spec = codec->spec;
4495 4495
4496 /* only handle on HP HDX */
4497 if (spec->board_config != STAC_HP_HDX)
4498 return 0;
4499
4500 if (nid == 0x10) 4496 if (nid == 0x10)
4501 { 4497 {
4502 if (snd_hda_codec_amp_read(codec, nid, 0, HDA_OUTPUT, 0) & 4498 if (snd_hda_codec_amp_read(codec, nid, 0, HDA_OUTPUT, 0) &
@@ -4535,9 +4531,6 @@ static struct hda_codec_ops stac92xx_patch_ops = {
4535 .suspend = stac92xx_suspend, 4531 .suspend = stac92xx_suspend,
4536 .resume = stac92xx_resume, 4532 .resume = stac92xx_resume,
4537#endif 4533#endif
4538#ifdef CONFIG_SND_HDA_POWER_SAVE
4539 .check_power_status = stac92xx_check_power_status,
4540#endif
4541}; 4534};
4542 4535
4543static int patch_stac9200(struct hda_codec *codec) 4536static int patch_stac9200(struct hda_codec *codec)
@@ -5134,13 +5127,6 @@ again:
5134 /* no output amps */ 5127 /* no output amps */
5135 spec->num_pwrs = 0; 5128 spec->num_pwrs = 0;
5136 /* fallthru */ 5129 /* fallthru */
5137 case 0x111d76b2: /* Codec of HP HDX16/HDX18 */
5138
5139 /* orange/white mute led on GPIO3, orange=0, white=1 */
5140 spec->gpio_mask |= 0x08;
5141 spec->gpio_dir |= 0x08;
5142 spec->gpio_data |= 0x08; /* set to white */
5143 /* fallthru */
5144 default: 5130 default:
5145 memcpy(&spec->private_dimux, &stac92hd71bxx_dmux_amixer, 5131 memcpy(&spec->private_dimux, &stac92hd71bxx_dmux_amixer,
5146 sizeof(stac92hd71bxx_dmux_amixer)); 5132 sizeof(stac92hd71bxx_dmux_amixer));
@@ -5199,6 +5185,20 @@ again:
5199 spec->num_dmics = 1; 5185 spec->num_dmics = 1;
5200 spec->num_dmuxes = 1; 5186 spec->num_dmuxes = 1;
5201 spec->num_smuxes = 1; 5187 spec->num_smuxes = 1;
5188 /*
5189 * For controlling MUTE LED on HP HDX16/HDX18 notebooks,
5190 * the CONFIG_SND_HDA_POWER_SAVE is needed to be set.
5191 */
5192#ifdef CONFIG_SND_HDA_POWER_SAVE
5193 /* orange/white mute led on GPIO3, orange=0, white=1 */
5194 spec->gpio_mask |= 0x08;
5195 spec->gpio_dir |= 0x08;
5196 spec->gpio_data |= 0x08; /* set to white */
5197
5198 /* register check_power_status callback. */
5199 codec->patch_ops.check_power_status =
5200 stac92xx_hp_hdx_check_power_status;
5201#endif
5202 break; 5202 break;
5203 }; 5203 };
5204 5204