diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-07 11:54:34 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-12 08:43:52 +0100 |
commit | e6b85f3c9d5ea3807dee651c28d5b0d5982ae2fa (patch) | |
tree | d92d1da51d487dcaa18966427b1ce09285dd3d82 /sound/pci/hda/hda_generic.h | |
parent | c2c803830a5d9897344cd3ffd82daddd7f9f3864 (diff) | |
download | lwn-e6b85f3c9d5ea3807dee651c28d5b0d5982ae2fa.tar.gz lwn-e6b85f3c9d5ea3807dee651c28d5b0d5982ae2fa.zip |
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.h | 14 |
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 { /* 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); |