diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 14 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.h | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 13 |
3 files changed, 14 insertions, 17 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 1131c86ad495..f84874445b50 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -2218,7 +2218,7 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate, | |||
2218 | * | 2218 | * |
2219 | * Returns 0 if successful, otherwise a negative error code. | 2219 | * Returns 0 if successful, otherwise a negative error code. |
2220 | */ | 2220 | */ |
2221 | int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, | 2221 | static int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, |
2222 | u32 *ratesp, u64 *formatsp, unsigned int *bpsp) | 2222 | u32 *ratesp, u64 *formatsp, unsigned int *bpsp) |
2223 | { | 2223 | { |
2224 | int i; | 2224 | int i; |
@@ -3374,18 +3374,6 @@ int snd_hda_resume(struct hda_bus *bus) | |||
3374 | } | 3374 | } |
3375 | return 0; | 3375 | return 0; |
3376 | } | 3376 | } |
3377 | #ifdef CONFIG_SND_HDA_POWER_SAVE | ||
3378 | int snd_hda_codecs_inuse(struct hda_bus *bus) | ||
3379 | { | ||
3380 | struct hda_codec *codec; | ||
3381 | |||
3382 | list_for_each_entry(codec, &bus->codec_list, list) { | ||
3383 | if (snd_hda_codec_needs_resume(codec)) | ||
3384 | return 1; | ||
3385 | } | ||
3386 | return 0; | ||
3387 | } | ||
3388 | #endif | ||
3389 | #endif | 3377 | #endif |
3390 | 3378 | ||
3391 | /* | 3379 | /* |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index a70b181bbace..e1077df5e882 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -852,8 +852,6 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate, | |||
852 | unsigned int channels, | 852 | unsigned int channels, |
853 | unsigned int format, | 853 | unsigned int format, |
854 | unsigned int maxbps); | 854 | unsigned int maxbps); |
855 | int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, | ||
856 | u32 *ratesp, u64 *formatsp, unsigned int *bpsp); | ||
857 | int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, | 855 | int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, |
858 | unsigned int format); | 856 | unsigned int format); |
859 | 857 | ||
@@ -884,12 +882,10 @@ const char *snd_hda_get_jack_location(u32 cfg); | |||
884 | void snd_hda_power_up(struct hda_codec *codec); | 882 | void snd_hda_power_up(struct hda_codec *codec); |
885 | void snd_hda_power_down(struct hda_codec *codec); | 883 | void snd_hda_power_down(struct hda_codec *codec); |
886 | #define snd_hda_codec_needs_resume(codec) codec->power_count | 884 | #define snd_hda_codec_needs_resume(codec) codec->power_count |
887 | int snd_hda_codecs_inuse(struct hda_bus *bus); | ||
888 | #else | 885 | #else |
889 | static inline void snd_hda_power_up(struct hda_codec *codec) {} | 886 | static inline void snd_hda_power_up(struct hda_codec *codec) {} |
890 | static inline void snd_hda_power_down(struct hda_codec *codec) {} | 887 | static inline void snd_hda_power_down(struct hda_codec *codec) {} |
891 | #define snd_hda_codec_needs_resume(codec) 1 | 888 | #define snd_hda_codec_needs_resume(codec) 1 |
892 | #define snd_hda_codecs_inuse(bus) 1 | ||
893 | #endif | 889 | #endif |
894 | 890 | ||
895 | #endif /* __SOUND_HDA_CODEC_H */ | 891 | #endif /* __SOUND_HDA_CODEC_H */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6462d758e641..f13ec4c71f8a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1896,6 +1896,19 @@ static void azx_power_notify(struct hda_bus *bus) | |||
1896 | else if (chip->running && power_save_controller) | 1896 | else if (chip->running && power_save_controller) |
1897 | azx_stop_chip(chip); | 1897 | azx_stop_chip(chip); |
1898 | } | 1898 | } |
1899 | |||
1900 | static int snd_hda_codecs_inuse(struct hda_bus *bus) | ||
1901 | { | ||
1902 | struct hda_codec *codec; | ||
1903 | |||
1904 | list_for_each_entry(codec, &bus->codec_list, list) { | ||
1905 | if (snd_hda_codec_needs_resume(codec)) | ||
1906 | return 1; | ||
1907 | } | ||
1908 | return 0; | ||
1909 | } | ||
1910 | #else /* !CONFIG_SND_HDA_POWER_SAVE */ | ||
1911 | #define snd_hda_codecs_inuse(bus) 1 | ||
1899 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ | 1912 | #endif /* CONFIG_SND_HDA_POWER_SAVE */ |
1900 | 1913 | ||
1901 | #ifdef CONFIG_PM | 1914 | #ifdef CONFIG_PM |