ALSA: hda - Implement independent HP control
Similar like the implementation in patch_analog.c and patch_via.c,
the generic parser can provide the independent HP PCM stream now.
It's enabled when spec->indep_hp is set by the caller while parsing.
Currently no dynamic PCM switching as in patch_via.c is implemented
yet. The control returns -EBUSY when the value is changed during PCM
operations.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index 85d138f..5c1569c 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -65,6 +65,9 @@
unsigned int attr; /* pin attribute (INPUT_PIN_ATTR_*) */
};
+/* active stream id */
+enum { STREAM_MULTI_OUT, STREAM_INDEP_HP };
+
struct hda_gen_spec {
char stream_name_analog[32]; /* analog PCM stream */
const struct hda_pcm_stream *stream_analog_playback;
@@ -76,6 +79,10 @@
const struct hda_pcm_stream *stream_digital_playback;
const struct hda_pcm_stream *stream_digital_capture;
+ /* PCM */
+ unsigned int active_streams;
+ struct mutex pcm_mutex;
+
/* playback */
struct hda_multi_out multiout; /* playback set-up
* max_channels, dacs must be set
@@ -150,6 +157,8 @@
unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
unsigned int own_eapd_ctl:1; /* set EAPD by own function */
unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */
+ unsigned int indep_hp:1; /* independent HP supported */
+ unsigned int indep_hp_enabled:1; /* independent HP enabled */
/* for virtual master */
hda_nid_t vmaster_nid;