From e6b85f3c9d5ea3807dee651c28d5b0d5982ae2fa Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 7 Jan 2013 11:54:34 +0100 Subject: 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 --- sound/pci/hda/hda_generic.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sound/pci/hda/hda_generic.h') 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 { /* active stream id */ enum { STREAM_MULTI_OUT, STREAM_INDEP_HP }; +/* PCM hook action */ +enum { + HDA_GEN_PCM_ACT_OPEN, + HDA_GEN_PCM_ACT_PREPARE, + HDA_GEN_PCM_ACT_CLEANUP, + HDA_GEN_PCM_ACT_CLOSE, +}; + struct hda_gen_spec { char stream_name_analog[32]; /* analog PCM stream */ const struct hda_pcm_stream *stream_analog_playback; @@ -191,6 +199,12 @@ struct hda_gen_spec { void (*automute_hook)(struct hda_codec *codec); void (*cap_sync_hook)(struct hda_codec *codec); + /* PCM playback hook */ + void (*pcm_playback_hook)(struct hda_pcm_stream *hinfo, + struct hda_codec *codec, + struct snd_pcm_substream *substream, + int action); + /* automute / autoswitch hooks */ void (*hp_automute_hook)(struct hda_codec *codec, struct hda_jack_tbl *tbl); -- cgit v1.2.2