Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371710
b: refs/heads/master
c: ba615b8
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Mar 13, 2013
1 parent 53da694 commit c2ff0d5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bce0d2a80e428aac3b39bf19675f1f57126f9cb6
refs/heads/master: ba615b86d6a3ba6e244973672c63903c8b2831a3
13 changes: 6 additions & 7 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,8 +1296,6 @@ static bool snd_hda_codec_get_supported_ps(struct hda_codec *codec,

static unsigned int hda_set_power_state(struct hda_codec *codec,
unsigned int power_state);
static unsigned int default_power_filter(struct hda_codec *codec, hda_nid_t nid,
unsigned int power_state);

/**
* snd_hda_codec_new - create a HDA codec
Expand Down Expand Up @@ -1418,7 +1416,6 @@ int snd_hda_codec_new(struct hda_bus *bus,
#endif
codec->epss = snd_hda_codec_get_supported_ps(codec, fg,
AC_PWRST_EPSS);
codec->power_filter = default_power_filter;

/* power-up all before initialization */
hda_set_power_state(codec, AC_PWRST_D0);
Expand Down Expand Up @@ -3759,8 +3756,9 @@ static unsigned int hda_sync_power_state(struct hda_codec *codec,
}

/* don't power down the widget if it controls eapd and EAPD_BTLENABLE is set */
static unsigned int default_power_filter(struct hda_codec *codec, hda_nid_t nid,
unsigned int power_state)
unsigned int snd_hda_codec_eapd_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state)
{
if (power_state == AC_PWRST_D3 &&
get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_PIN &&
Expand All @@ -3772,6 +3770,7 @@ static unsigned int default_power_filter(struct hda_codec *codec, hda_nid_t nid,
}
return power_state;
}
EXPORT_SYMBOL_HDA(snd_hda_codec_eapd_power_filter);

/*
* set power state of the codec, and return the power state
Expand Down Expand Up @@ -3816,8 +3815,8 @@ static void sync_power_up_states(struct hda_codec *codec)
hda_nid_t nid = codec->start_nid;
int i;

/* don't care if no or standard filter is used */
if (!codec->power_filter || codec->power_filter == default_power_filter)
/* don't care if no filter is used */
if (!codec->power_filter)
return;

for (i = 0; i < codec->num_nodes; i++, nid++) {
Expand Down
4 changes: 4 additions & 0 deletions trunk/sound/pci/hda/hda_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,10 @@ snd_hda_check_power_state(struct hda_codec *codec, hda_nid_t nid,
return (state != target_state);
}

unsigned int snd_hda_codec_eapd_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state);

/*
* AMP control callbacks
*/
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/pci/hda/patch_conexant.c
Original file line number Diff line number Diff line change
Expand Up @@ -3350,7 +3350,6 @@ static int patch_conexant_auto(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x14f15045:
codec->single_adc_amp = 1;
codec->power_filter = NULL; /* Needs speaker amp to D3 to avoid click */
break;
case 0x14f15047:
codec->pin_amp_workaround = 1;
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -3774,6 +3774,7 @@ static int patch_stac9200(struct hda_codec *codec)
spec->gen.own_eapd_ctl = 1;

codec->patch_ops = stac_patch_ops;
codec->power_filter = snd_hda_codec_eapd_power_filter;

snd_hda_add_verbs(codec, stac9200_eapd_init);

Expand Down

0 comments on commit c2ff0d5

Please sign in to comment.