diff options
author | Jie Yang <yang.jie@intel.com> | 2015-04-27 21:20:58 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-04-27 21:37:41 +0200 |
commit | 4e3f0dc65883cac95807549b2f7a3ac183686bcb (patch) | |
tree | 68b4c872e0a9167909730354af05cf54b061c02c /sound/pci | |
parent | b8dd086674cfbfc246a5b9d7d7ff37f62350a878 (diff) | |
download | linux-stable-4e3f0dc65883cac95807549b2f7a3ac183686bcb.tar.gz linux-stable-4e3f0dc65883cac95807549b2f7a3ac183686bcb.tar.bz2 linux-stable-4e3f0dc65883cac95807549b2f7a3ac183686bcb.zip |
ALSA: jack: extend snd_jack_new to support phantom jack
Dont create input devices for phantom jacks.
Here, we extend snd_jack_new() to support phantom jack creating:
pass in a bool param for [non-]phantom flag, and a bool param
initial_jack to indicate whether we need to create a kctl at
this stage.
We can also add a kctl to the jack after its created meaning we
can now integrate the HDA and ASoC jacks.
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_jack.c | 2 | ||||
-rw-r--r-- | sound/pci/oxygen/xonar_wm87x6.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c index 05b49aa8af6c..16281c69bcd6 100644 --- a/sound/pci/hda/hda_jack.c +++ b/sound/pci/hda/hda_jack.c @@ -417,7 +417,7 @@ static int __snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid, if (!phantom_jack) { jack->type = get_input_jack_type(codec, nid); err = snd_jack_new(codec->card, name, jack->type, - &jack->jack); + &jack->jack, false, false); if (err < 0) return err; jack->jack->private_data = jack; diff --git a/sound/pci/oxygen/xonar_wm87x6.c b/sound/pci/oxygen/xonar_wm87x6.c index 6ce68604c25e..90ac479f389f 100644 --- a/sound/pci/oxygen/xonar_wm87x6.c +++ b/sound/pci/oxygen/xonar_wm87x6.c @@ -286,7 +286,7 @@ static void xonar_ds_init(struct oxygen *chip) xonar_enable_output(chip); snd_jack_new(chip->card, "Headphone", - SND_JACK_HEADPHONE, &data->hp_jack); + SND_JACK_HEADPHONE, &data->hp_jack, false, false); xonar_ds_handle_hp_jack(chip); snd_component_add(chip->card, "WM8776"); |