/openbmc/linux/sound/pci/hda/ |
H A D | hda_jack.c | 3 * Jack-detection handling for HD-audio 13 #include <sound/jack.h> 20 * is_jack_detectable - Check whether the given pin is jack-detectable 24 * Check whether the given pin is capable to report the jack detection. 25 * The jack detection might not work by various reasons, e.g. the jack 65 * snd_hda_jack_tbl_get_mst - query the jack-table entry for the given NID 73 struct hda_jack_tbl *jack = codec->jacktbl.list; in snd_hda_jack_tbl_get_mst() local 76 if (!nid || !jack) in snd_hda_jack_tbl_get_mst() 78 for (i = 0; i < codec->jacktbl.used; i++, jack++) in snd_hda_jack_tbl_get_mst() 79 if (jack->nid == nid && jack->dev_id == dev_id) in snd_hda_jack_tbl_get_mst() [all …]
|
H A D | hda_jack.h | 3 * Jack-detection handling for HD-audio 12 #include <sound/jack.h> 26 struct hda_jack_tbl *jack; /* associated jack entry */ member 35 /* jack-detection stuff */ 37 unsigned int jack_detect:1; /* capable of jack-detection? */ 41 hda_nid_t gating_jack; /* valid when gating jack plugged */ 42 hda_nid_t gated_jack; /* gated is dependent on this jack */ 43 hda_nid_t key_report_jack; /* key reports to this jack */ 46 struct snd_jack *jack; member 58 * snd_hda_jack_tbl_get - query the jack-table entry for the given NID [all …]
|
/openbmc/linux/sound/core/ |
H A D | jack.c | 3 * Jack abstraction layer 14 #include <sound/jack.h> 20 struct list_head list; /* list of controls belong to the same jack */ 22 struct snd_jack *jack; /* pointer to struct snd_jack */ member 40 static void snd_jack_remove_debugfs(struct snd_jack *jack); 44 struct snd_jack *jack = device->device_data; in snd_jack_dev_disconnect() local 46 snd_jack_remove_debugfs(jack); in snd_jack_dev_disconnect() 49 guard(mutex)(&jack->input_dev_lock); in snd_jack_dev_disconnect() 50 if (!jack->input_dev) in snd_jack_dev_disconnect() 55 if (jack->registered) in snd_jack_dev_disconnect() [all …]
|
/openbmc/linux/sound/soc/ |
H A D | soc-jack.c | 3 // soc-jack.c -- ALSA SoC jack handling 9 #include <sound/jack.h> 21 * snd_soc_jack_report - Report the current status for a jack 23 * @jack: the jack 34 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) in snd_soc_jack_report() argument 40 if (!jack || !jack->jack) in snd_soc_jack_report() 42 trace_snd_soc_jack_report(jack, mask, status); in snd_soc_jack_report() 44 dapm = &jack->card->dapm; in snd_soc_jack_report() 46 mutex_lock(&jack->mutex); in snd_soc_jack_report() 48 jack->status &= ~mask; in snd_soc_jack_report() [all …]
|
H A D | soc-card.c | 12 #include <sound/jack.h> 66 struct snd_soc_jack *jack, bool initial_kctl) in jack_new() argument 68 mutex_init(&jack->mutex); in jack_new() 69 jack->card = card; in jack_new() 70 INIT_LIST_HEAD(&jack->pins); in jack_new() 71 INIT_LIST_HEAD(&jack->jack_zones); in jack_new() 72 BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier); in jack_new() 74 return snd_jack_new(card->snd_card, id, type, &jack->jack, initial_kctl, false); in jack_new() 78 * snd_soc_card_jack_new - Create a new jack without pins 80 * @id: an identifying string for this jack [all …]
|
/openbmc/linux/Documentation/sound/soc/ |
H A D | jack.rst | 2 ASoC jack detection 6 the kernel side of which can be seen in include/sound/jack.h. ASoC 9 - It allows more than one jack detection method to work together on one 10 user visible jack. In embedded systems it is common for multiple 11 to be present on a single jack but handled by separate bits of 15 automatically based on the detected jack status (eg, turning off the 19 together: the jack itself represented by a struct snd_soc_jack, sets of 21 code providing jack reporting mechanisms. 23 For example, a system may have a stereo headset jack with two reporting 27 headphone when the headphone jack status changes. [all …]
|
/openbmc/linux/Documentation/sound/designs/ |
H A D | jack-controls.rst | 2 ALSA Jack Controls 5 Why we need Jack kcontrols 13 The old ALSA jack code only created input devices for each registered 14 jack. These jack input devices are not readable by userspace devices 17 The new jack code creates embedded jack kcontrols for each jack that 21 intelligently based on jack insertion or removal events. 23 Jack Kcontrol Internals 26 Each jack will have a kcontrol list, so that we can create a kcontrol 27 and attach it to the jack, at jack creation stage. We can also add a 28 kcontrol to an existing jack, at anytime when required. [all …]
|
H A D | jack-injection.rst | 2 ALSA Jack Software Injection 5 Simple Introduction On Jack Injection 8 Here jack injection means users could inject plugin or plugout events 14 jack or to some audio jacks, we don't need to physically access the 15 machine and plug/unplug physical devices to the audio jack. 17 In this design, an audio jack doesn't equal to a physical audio jack. 18 Sometimes a physical audio jack contains multi functions, and the 20 ``snd_jack`` represents a physical audio jack and the ``jack_kctl`` 21 represents a function, for example a physical jack has two functions: 23 for this jack. The jack injection is implemented based on the [all …]
|
/openbmc/linux/include/sound/ |
H A D | soc-jack.h | 3 * soc-jack.h 12 * struct snd_soc_jack_pin - Describes a pin to update based on jack detection 15 * @mask: bits to check for in reported jack status 27 * struct snd_soc_jack_zone - Describes voltage zones of jack detection 31 * @jack_type: type of jack that is expected for this voltage 32 * @debounce_time: debounce_time for jack, codec driver should wait for this 45 * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection 53 * @report: value to report when jack detected 72 struct snd_soc_jack *jack; member 84 struct snd_jack *jack; member [all …]
|
H A D | jack.h | 6 * Jack abstraction layer 16 * enum snd_jack_types - Jack types which can be reported 35 * sound/core/jack.c. 79 struct snd_jack **jack, bool initial_kctl, bool phantom_jack); 80 int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask); 82 void snd_jack_set_parent(struct snd_jack *jack, struct device *parent); 83 int snd_jack_set_key(struct snd_jack *jack, enum snd_jack_types type, 86 void snd_jack_report(struct snd_jack *jack, int status); 90 struct snd_jack **jack, bool initial_kctl, bool phantom_jack) in snd_jack_new() argument 95 static inline int snd_jack_add_new_kctl(struct snd_jack *jack, const char * name, int mask) in snd_jack_add_new_kctl() argument [all …]
|
/openbmc/linux/sound/soc/pxa/ |
H A D | spitz.c | 50 /* set up jack connection */ in spitz_ext_control() 53 /* enable and unmute hp jack, disable mic bias */ in spitz_ext_control() 54 snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack"); in spitz_ext_control() 55 snd_soc_dapm_disable_pin_unlocked(dapm, "Mic Jack"); in spitz_ext_control() 56 snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); in spitz_ext_control() 57 snd_soc_dapm_enable_pin_unlocked(dapm, "Headphone Jack"); in spitz_ext_control() 62 /* enable mic jack and bias, mute hp */ in spitz_ext_control() 63 snd_soc_dapm_disable_pin_unlocked(dapm, "Headphone Jack"); in spitz_ext_control() 64 snd_soc_dapm_disable_pin_unlocked(dapm, "Headset Jack"); in spitz_ext_control() 65 snd_soc_dapm_disable_pin_unlocked(dapm, "Line Jack"); in spitz_ext_control() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/sound/ |
H A D | fsl-asoc-card.txt | 70 * Line Out Jack 71 * Line In Jack 72 * Headphone Jack 73 * Mic Jack 75 * AMIC (stands for Analog Microphone Jack) 76 * DMIC (stands for Digital Microphone Jack) 78 Note: The "Mic Jack" and "AMIC" are redundant while 105 "Line Out Jack", "AOUT1L", 106 "Line Out Jack", "AOUT1R", 107 "Line Out Jack", "AOUT2L", [all …]
|
/openbmc/linux/sound/soc/intel/avs/boards/ |
H A D | da7219.c | 11 #include <sound/jack.h> 23 SOC_DAPM_PIN_SWITCH("Headphone Jack"), 57 SND_SOC_DAPM_HP("Headphone Jack", NULL), 65 /* HP jack connectors - unknown if we have jack detection */ 66 {"Headphone Jack", NULL, "HPL"}, 67 {"Headphone Jack", NULL, "HPR"}, 71 { "Headphone Jack", NULL, "Platform Clock" }, 78 .pin = "Headphone Jack", 97 struct snd_soc_jack *jack; in avs_da7219_codec_init() local 102 jack = snd_soc_card_get_drvdata(card); in avs_da7219_codec_init() [all …]
|
H A D | rt5682.c | 16 #include <sound/jack.h> 64 SOC_DAPM_PIN_SWITCH("Headphone Jack"), 69 SND_SOC_DAPM_HP("Headphone Jack", NULL), 74 /* HP jack connectors - unknown if we have jack detect */ 75 { "Headphone Jack", NULL, "HPOL" }, 76 { "Headphone Jack", NULL, "HPOR" }, 84 .pin = "Headphone Jack", 98 struct snd_soc_jack *jack; in avs_rt5682_codec_init() local 101 jack = snd_soc_card_get_drvdata(card); in avs_rt5682_codec_init() 116 ret = snd_soc_card_jack_new_pins(card, "Headset Jack", SND_JACK_HEADSET | SND_JACK_BTN_0 | in avs_rt5682_codec_init() [all …]
|
H A D | rt5663.c | 12 #include <sound/jack.h> 22 struct snd_soc_jack jack; member 26 SOC_DAPM_PIN_SWITCH("Headphone Jack"), 31 SND_SOC_DAPM_HP("Headphone Jack", NULL), 36 /* HP jack connectors */ 37 { "Headphone Jack", NULL, "HPOL" }, 38 { "Headphone Jack", NULL, "HPOR" }, 47 .pin = "Headphone Jack", 61 struct snd_soc_jack *jack; in avs_rt5663_codec_init() local 64 jack = &priv->jack; in avs_rt5663_codec_init() [all …]
|
H A D | nau8825.c | 13 #include <sound/jack.h> 48 SOC_DAPM_PIN_SWITCH("Headphone Jack"), 53 SND_SOC_DAPM_HP("Headphone Jack", NULL), 60 { "Headphone Jack", NULL, "HPOL" }, 61 { "Headphone Jack", NULL, "HPOR" }, 65 { "Headphone Jack", NULL, "Platform Clock" }, 71 .pin = "Headphone Jack", 84 struct snd_soc_jack *jack; in avs_nau8825_codec_init() local 87 jack = snd_soc_card_get_drvdata(card); in avs_nau8825_codec_init() 100 jack, pins, num_pins); in avs_nau8825_codec_init() [all …]
|
H A D | rt286.c | 10 #include <sound/jack.h> 20 SOC_DAPM_PIN_SWITCH("Headphone Jack"), 21 SOC_DAPM_PIN_SWITCH("Mic Jack"), 26 SND_SOC_DAPM_HP("Headphone Jack", NULL), 27 SND_SOC_DAPM_MIC("Mic Jack", NULL), 32 /* HP jack connectors - unknown if we have jack detect */ 33 {"Headphone Jack", NULL, "HPO Pin"}, 34 {"MIC1", NULL, "Mic Jack"}, 42 .pin = "Headphone Jack", 46 .pin = "Mic Jack", [all …]
|
H A D | rt298.c | 11 #include <sound/jack.h> 31 SOC_DAPM_PIN_SWITCH("Headphone Jack"), 32 SOC_DAPM_PIN_SWITCH("Mic Jack"), 37 SND_SOC_DAPM_HP("Headphone Jack", NULL), 38 SND_SOC_DAPM_MIC("Mic Jack", NULL), 43 /* HP jack connectors - unknown if we have jack detect */ 44 {"Headphone Jack", NULL, "HPO Pin"}, 45 {"MIC1", NULL, "Mic Jack"}, 53 .pin = "Headphone Jack", 57 .pin = "Mic Jack", [all …]
|
H A D | rt274.c | 10 #include <sound/jack.h> 22 SOC_DAPM_PIN_SWITCH("Headphone Jack"), 23 SOC_DAPM_PIN_SWITCH("Mic Jack"), 38 /* Codec needs clock for Jack detection and button press */ in avs_rt274_clock_control() 63 SND_SOC_DAPM_HP("Headphone Jack", NULL), 64 SND_SOC_DAPM_MIC("Mic Jack", NULL), 70 {"Headphone Jack", NULL, "HPO Pin"}, 71 {"MIC", NULL, "Mic Jack"}, 73 {"Headphone Jack", NULL, "Platform Clock"}, 79 .pin = "Headphone Jack", [all …]
|
/openbmc/linux/sound/soc/intel/boards/ |
H A D | sof_sdw_cs42l42.c | 17 #include <sound/jack.h> 26 /* HP jack connectors - unknown if we have jack detection */ 55 struct snd_soc_jack *jack; in cs42l42_rtd_init() local 86 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack", in cs42l42_rtd_init() 94 dev_err(rtd->card->dev, "Headset Jack creation failed: %d\n", in cs42l42_rtd_init() 99 jack = &ctx->sdw_headset; in cs42l42_rtd_init() 101 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in cs42l42_rtd_init() 102 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in cs42l42_rtd_init() 103 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in cs42l42_rtd_init() 104 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in cs42l42_rtd_init() [all …]
|
H A D | sof_sdw_rt700.c | 15 #include <sound/jack.h> 54 struct snd_soc_jack *jack; in rt700_rtd_init() local 85 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack", in rt700_rtd_init() 93 dev_err(rtd->card->dev, "Headset Jack creation failed: %d\n", in rt700_rtd_init() 98 jack = &ctx->sdw_headset; in rt700_rtd_init() 100 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt700_rtd_init() 101 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt700_rtd_init() 102 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt700_rtd_init() 103 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt700_rtd_init() 105 ret = snd_soc_component_set_jack(component, jack, NULL); in rt700_rtd_init() [all …]
|
H A D | sof_sdw_rt5682.c | 17 #include <sound/jack.h> 54 struct snd_soc_jack *jack; in rt5682_rtd_init() local 85 ret = snd_soc_card_jack_new_pins(rtd->card, "Headset Jack", in rt5682_rtd_init() 93 dev_err(rtd->card->dev, "Headset Jack creation failed: %d\n", in rt5682_rtd_init() 98 jack = &ctx->sdw_headset; in rt5682_rtd_init() 100 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in rt5682_rtd_init() 101 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in rt5682_rtd_init() 102 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in rt5682_rtd_init() 103 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in rt5682_rtd_init() 105 ret = snd_soc_component_set_jack(component, jack, NULL); in rt5682_rtd_init() [all …]
|
/openbmc/linux/sound/virtio/ |
H A D | virtio_jack.c | 7 #include <sound/jack.h> 23 * struct virtio_jack - VirtIO jack. 24 * @jack: Kernel jack control. 26 * @features: Jack virtio feature bit map (1 << VIRTIO_SND_JACK_F_XXX). 29 * @connected: Current jack connection status. 30 * @type: Kernel jack type (SND_JACK_XXX). 33 struct snd_jack *jack; member 43 * virtsnd_jack_get_label() - Get the name string for the jack. 44 * @vjack: VirtIO jack. 46 * Returns the jack name based on the default pin configuration value (see HDA [all …]
|
/openbmc/linux/Documentation/sound/hd-audio/ |
H A D | models.rst | 8 3-jack in back and a headphone out 10 3-jack in back, a HP out and a SPDIF out 12 5-jack in back, 2-jack in front 14 5-jack in back, 2-jack in front, a SPDIF out 16 6-jack in back, 2-jack in front 18 6-jack with a SPDIF out 20 6-jack with headphone jack detection 31 Quirk for FSC S7020 with jack modes and HP mic support 76 Indicates a combined headset (headphone+mic) jack 88 Headset jack, which can also be used as mic-in [all …]
|
/openbmc/linux/sound/soc/qcom/ |
H A D | sc7180.c | 14 #include <sound/jack.h> 38 static void sc7180_jack_free(struct snd_jack *jack) in sc7180_jack_free() argument 40 struct snd_soc_component *component = jack->private_data; in sc7180_jack_free() 47 .pin = "Headphone Jack", 62 struct snd_jack *jack; in sc7180_headset_init() local 65 rval = snd_soc_card_jack_new_pins(card, "Headset Jack", in sc7180_headset_init() 75 dev_err(card->dev, "Unable to add Headset Jack\n"); in sc7180_headset_init() 79 jack = pdata->hs_jack.jack; in sc7180_headset_init() 81 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in sc7180_headset_init() 82 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in sc7180_headset_init() [all …]
|