From 6ef08682be0e4213f013c0e8fa149319dcbdf28a Mon Sep 17 00:00:00 2001 From: Christoph Plattner Date: Tue, 10 Mar 2009 00:05:56 +0100 Subject: [PATCH] --- yaml --- r: 133110 b: refs/heads/master c: 443e26d014c242623dd70cda054cc6e5ebf7993d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_sigmatel.c | 30 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index a654391bd037..99e69645e51a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ae6241fbf5c8863631532e8069037bae460607be +refs/heads/master: 443e26d014c242623dd70cda054cc6e5ebf7993d diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index fb9f4ccba885..d119feed42c9 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -4489,14 +4489,10 @@ static int stac92xx_resume(struct hda_codec *codec) */ #ifdef CONFIG_SND_HDA_POWER_SAVE -static int stac92xx_check_power_status (struct hda_codec * codec, hda_nid_t nid) +static int stac92xx_hp_hdx_check_power_status (struct hda_codec * codec, hda_nid_t nid) { struct sigmatel_spec *spec = codec->spec; - /* only handle on HP HDX */ - if (spec->board_config != STAC_HP_HDX) - return 0; - if (nid == 0x10) { if (snd_hda_codec_amp_read(codec, nid, 0, HDA_OUTPUT, 0) & @@ -4535,9 +4531,6 @@ static struct hda_codec_ops stac92xx_patch_ops = { .suspend = stac92xx_suspend, .resume = stac92xx_resume, #endif -#ifdef CONFIG_SND_HDA_POWER_SAVE - .check_power_status = stac92xx_check_power_status, -#endif }; static int patch_stac9200(struct hda_codec *codec) @@ -5134,13 +5127,6 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) /* no output amps */ spec->num_pwrs = 0; /* fallthru */ - case 0x111d76b2: /* Codec of HP HDX16/HDX18 */ - - /* orange/white mute led on GPIO3, orange=0, white=1 */ - spec->gpio_mask |= 0x08; - spec->gpio_dir |= 0x08; - spec->gpio_data |= 0x08; /* set to white */ - /* fallthru */ default: memcpy(&spec->private_dimux, &stac92hd71bxx_dmux_amixer, sizeof(stac92hd71bxx_dmux_amixer)); @@ -5199,6 +5185,20 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) spec->num_dmics = 1; spec->num_dmuxes = 1; spec->num_smuxes = 1; + /* + * For controlling MUTE LED on HP HDX16/HDX18 notebooks, + * the CONFIG_SND_HDA_POWER_SAVE is needed to be set. + */ +#ifdef CONFIG_SND_HDA_POWER_SAVE + /* orange/white mute led on GPIO3, orange=0, white=1 */ + spec->gpio_mask |= 0x08; + spec->gpio_dir |= 0x08; + spec->gpio_data |= 0x08; /* set to white */ + + /* register check_power_status callback. */ + codec->patch_ops.check_power_status = + stac92xx_hp_hdx_check_power_status; +#endif break; };