16 #include <linux/types.h>
18 #include <linux/module.h>
29 static unsigned int rates[] = {
45 .pin =
"Headphone Jack",
55 static struct snd_soc_jack_gpio hp_jack_gpios[] = {
69 runtime->
hw.rate_min = hw_rates.
list[0];
70 runtime->
hw.rate_max = hw_rates.
list[hw_rates.
count - 1];
97 dev_err(&rtd->
dev,
"%s: rate %d is not supported\n",
142 .startup = h1940_startup,
143 .hw_params = h1940_hw_params,
167 {
"Headphone Jack",
NULL,
"VOUTLHP"},
168 {
"Headphone Jack",
NULL,
"VOUTRHP"},
171 {
"Speaker",
NULL,
"VOUTL"},
172 {
"Speaker",
NULL,
"VOUTR"},
175 {
"VINM",
NULL,
"Mic Jack"},
196 snd_soc_jack_add_gpios(&hp_jack,
ARRAY_SIZE(hp_jack_gpios),
206 .stream_name =
"UDA1380 Duplex",
207 .cpu_dai_name =
"s3c24xx-iis",
208 .codec_dai_name =
"uda1380-hifi",
209 .init = h1940_uda1380_init,
210 .platform_name =
"samsung-audio",
211 .codec_name =
"uda1380-codec.0-001a",
219 .dai_link = h1940_uda1380_dai,
222 .dapm_widgets = uda1380_dapm_widgets,
223 .num_dapm_widgets =
ARRAY_SIZE(uda1380_dapm_widgets),
224 .dapm_routes = audio_map,
228 static int __init h1940_init(
void)
232 if (!machine_is_h1940())
245 if (!s3c24xx_snd_device) {
250 platform_set_drvdata(s3c24xx_snd_device, &h1940_asoc);
267 static void __exit h1940_exit(
void)
270 snd_soc_jack_free_gpios(&hp_jack,
ARRAY_SIZE(hp_jack_gpios),