aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-07 05:54:34 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:43:52 -0500
commite6b85f3c9d5ea3807dee651c28d5b0d5982ae2fa (patch)
treed92d1da51d487dcaa18966427b1ce09285dd3d82 /sound/pci/hda/hda_generic.h
parentc2c803830a5d9897344cd3ffd82daddd7f9f3864 (diff)
ALSA: hda - Add pcm_playback_hook to hda_gen_spec
The new hook which is called at each PCM playback ops. It can be used to control the codec-specific power-saving feature in each codec driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.h')
-rw-r--r--sound/pci/hda/hda_generic.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 4c0d9add6145..7e84c22f98b8 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -69,6 +69,14 @@ struct automic_entry {
69/* active stream id */ 69/* active stream id */
70enum { STREAM_MULTI_OUT, STREAM_INDEP_HP }; 70enum { STREAM_MULTI_OUT, STREAM_INDEP_HP };
71 71
72/* PCM hook action */
73enum {
74 HDA_GEN_PCM_ACT_OPEN,
75 HDA_GEN_PCM_ACT_PREPARE,
76 HDA_GEN_PCM_ACT_CLEANUP,
77 HDA_GEN_PCM_ACT_CLOSE,
78};
79
72struct hda_gen_spec { 80struct hda_gen_spec {
73 char stream_name_analog[32]; /* analog PCM stream */ 81 char stream_name_analog[32]; /* analog PCM stream */
74 const struct hda_pcm_stream *stream_analog_playback; 82 const struct hda_pcm_stream *stream_analog_playback;
@@ -191,6 +199,12 @@ struct hda_gen_spec {
191 void (*automute_hook)(struct hda_codec *codec); 199 void (*automute_hook)(struct hda_codec *codec);
192 void (*cap_sync_hook)(struct hda_codec *codec); 200 void (*cap_sync_hook)(struct hda_codec *codec);
193 201
202 /* PCM playback hook */
203 void (*pcm_playback_hook)(struct hda_pcm_stream *hinfo,
204 struct hda_codec *codec,
205 struct snd_pcm_substream *substream,
206 int action);
207
194 /* automute / autoswitch hooks */ 208 /* automute / autoswitch hooks */
195 void (*hp_automute_hook)(struct hda_codec *codec, 209 void (*hp_automute_hook)(struct hda_codec *codec,
196 struct hda_jack_tbl *tbl); 210 struct hda_jack_tbl *tbl);