Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375738
b: refs/heads/master
c: 478e858
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed May 16, 2013
1 parent e1d6cdf commit da8d5e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 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: 407a0e18ecfbd7f58f49c307a657b63e6f32544d
refs/heads/master: 478e858b2fd4d0cbeef039befb7ef25b9c9bdc37
2 changes: 1 addition & 1 deletion trunk/sound/oss/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ config MSND_FIFOSIZE
menuconfig SOUND_OSS
tristate "OSS sound modules"
depends on ISA_DMA_API && VIRT_TO_BUS
depends on !ISA_DMA_SUPPORT_BROKEN
depends on !GENERIC_ISA_DMA_SUPPORT_BROKEN
help
OSS is the Open Sound System suite of sound card drivers. They make
sound programming easier since they provide a common API. Say Y or
Expand Down
9 changes: 7 additions & 2 deletions trunk/sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ static bool is_active_nid(struct hda_codec *codec, hda_nid_t nid,
return false;
}

/* check whether the NID is referred by any active paths */
#define is_active_nid_for_any(codec, nid) \
is_active_nid(codec, nid, HDA_OUTPUT, 0)

/* get the default amp value for the target state */
static int get_amp_val_to_activate(struct hda_codec *codec, hda_nid_t nid,
int dir, unsigned int caps, bool enable)
Expand Down Expand Up @@ -759,7 +763,8 @@ static void path_power_down_sync(struct hda_codec *codec, struct nid_path *path)

for (i = 0; i < path->depth; i++) {
hda_nid_t nid = path->path[i];
if (!snd_hda_check_power_state(codec, nid, AC_PWRST_D3)) {
if (!snd_hda_check_power_state(codec, nid, AC_PWRST_D3) &&
!is_active_nid_for_any(codec, nid)) {
snd_hda_codec_write(codec, nid, 0,
AC_VERB_SET_POWER_STATE,
AC_PWRST_D3);
Expand Down Expand Up @@ -4157,7 +4162,7 @@ static unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec,
return power_state;
if (get_wcaps_type(get_wcaps(codec, nid)) >= AC_WID_POWER)
return power_state;
if (is_active_nid(codec, nid, HDA_OUTPUT, 0))
if (is_active_nid_for_any(codec, nid))
return power_state;
return AC_PWRST_D3;
}
Expand Down

0 comments on commit da8d5e1

Please sign in to comment.