[alsa-devel] [PATCH v2 1/2] ALSA: jack: create jack kcontrols for every jack input device

Jie, Yang yang.jie at intel.com
Thu Mar 26 13:43:40 CET 2015


Sorry, Correct a typo(removing line "create "Mic Jack" kctl;" in default case)

snd_jack_new(struct snd_card *card, const char *id, int type, struct snd_jack **jjack) { ...
	Switch(type | SND_JACK_HEADSET)
	{
		case SND_JACK_MICROPHONE:
			create "Mic Jack" kctl;
			break;
		case SND_JACK_HEADSET:
			if (id == "Headphone Mic Headset") {
				create " Headphone Mic Jack " kctl;
				create " Headset Mic Jack " kctl;
			} else {
				create " Headphone Jack " kctl;
				create " Headset Mic Jack " kctl;
			}
			break;
		case SND_JACK_HEADPHONE:
			if (id == "Headset Mic") {
				create " Headphone Jack " kctl;
			//	create " Headset Mic Phantom Jack " kctl;
			} else if (id == "Headphone Mic")  {
				create " Headphone Mic Jack " kctl;
			} else if (id == "Headset Headphone Mic")  {
				create " Headphone Mic Jack " kctl;
			//	create " Headset Mic Phantom Jack " kctl;
			} else {
				create " Headphone Jack " kctl;
			}
			break;
		default:
			break;
	}
...
}


Jack Type			Jack name			kctls/switches name
SND_JACK_HEADPHONE	Headphone			Headphone Jack
SND_JACK_MICROPHONE	Mic				Mic Jack
SND_JACK_HEADSET		Headset			Headphone Jack
								Headset Mic Jack
SND_JACK_HEADPHONE	Headset Mic			Headphone Jack
								Headset Mic Phantom Jack
SND_JACK_HEADPHONE 	Headphone Mic		Headphone Mic Jack
SND_JACK_HEADPHONE 	Headset Headphone Mic	Headphone Mic Jack
								Headset Mic Phantom Jack
SND_JACK_HEADSET 		Headphone Mic Headset	Headphone Mic Jack
								Headset Mic Jack

~Keyon



More information about the Alsa-devel mailing list