diff options
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r-- | sound/soc/samsung/ac97.c | 4 | ||||
-rw-r--r-- | sound/soc/samsung/dma.c | 2 | ||||
-rw-r--r-- | sound/soc/samsung/i2s.c | 27 | ||||
-rw-r--r-- | sound/soc/samsung/i2s.h | 2 | ||||
-rw-r--r-- | sound/soc/samsung/littlemill.c | 3 | ||||
-rw-r--r-- | sound/soc/samsung/neo1973_wm8753.c | 73 | ||||
-rw-r--r-- | sound/soc/samsung/pcm.c | 4 | ||||
-rw-r--r-- | sound/soc/samsung/s3c24xx_simtec.c | 6 | ||||
-rw-r--r-- | sound/soc/samsung/smdk_wm8580.c | 4 | ||||
-rw-r--r-- | sound/soc/samsung/smdk_wm9713.c | 4 |
10 files changed, 39 insertions, 90 deletions
diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 7b9bf93e370..3d04c1fa678 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -4,7 +4,7 @@ * Evolved from s3c2443-ac97.c * * Copyright (c) 2010 Samsung Electronics Co. Ltd - * Author: Jaswinder Singh <jassi.brar@samsung.com> + * Author: Jaswinder Singh <jassisinghbrar@gmail.com> * Credits: Graeme Gregory, Sean Choi * * This program is free software; you can redistribute it and/or modify @@ -511,7 +511,7 @@ static struct platform_driver s3c_ac97_driver = { module_platform_driver(s3c_ac97_driver); -MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); +MODULE_AUTHOR("Jaswinder Singh, <jassisinghbrar@gmail.com>"); MODULE_DESCRIPTION("AC97 driver for the Samsung SoC"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:samsung-ac97"); diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index e4ba17ce6b3..ddc6cde14e2 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -411,7 +411,7 @@ static int dma_new(struct snd_soc_pcm_runtime *rtd) if (!card->dev->dma_mask) card->dev->dma_mask = &dma_mask; if (!card->dev->coherent_dma_mask) - card->dev->coherent_dma_mask = 0xffffffff; + card->dev->coherent_dma_mask = DMA_BIT_MASK(32); if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { ret = preallocate_dma_buffer(pcm, diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 87a874dc7a3..6ac7b8281a0 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -3,7 +3,7 @@ * ALSA SoC Audio Layer - Samsung I2S Controller driver * * Copyright (c) 2010 Samsung Electronics Co. Ltd. - * Jaswinder Singh <jassi.brar@samsung.com> + * Jaswinder Singh <jassisinghbrar@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -559,6 +559,17 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, mod |= MOD_DC1_EN; break; case 2: + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + i2s->dma_playback.dma_size = 4; + else + i2s->dma_capture.dma_size = 4; + break; + case 1: + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + i2s->dma_playback.dma_size = 2; + else + i2s->dma_capture.dma_size = 2; + break; default: dev_err(&i2s->pdev->dev, "%d channels not supported\n", @@ -761,15 +772,13 @@ static int i2s_trigger(struct snd_pcm_substream *substream, case SNDRV_PCM_TRIGGER_PAUSE_PUSH: local_irq_save(flags); - if (capture) + if (capture) { i2s_rxctrl(i2s, 0); - else - i2s_txctrl(i2s, 0); - - if (capture) i2s_fifo(i2s, FIC_RXFLUSH); - else + } else { + i2s_txctrl(i2s, 0); i2s_fifo(i2s, FIC_TXFLUSH); + } local_irq_restore(flags); break; @@ -965,7 +974,7 @@ struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS; if (!sec) { - i2s->i2s_dai_drv.capture.channels_min = 2; + i2s->i2s_dai_drv.capture.channels_min = 1; i2s->i2s_dai_drv.capture.channels_max = 2; i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES; i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS; @@ -1143,7 +1152,7 @@ static struct platform_driver samsung_i2s_driver = { module_platform_driver(samsung_i2s_driver); /* Module information */ -MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); +MODULE_AUTHOR("Jaswinder Singh, <jassisinghbrar@gmail.com>"); MODULE_DESCRIPTION("Samsung I2S Interface"); MODULE_ALIAS("platform:samsung-i2s"); MODULE_LICENSE("GPL"); diff --git a/sound/soc/samsung/i2s.h b/sound/soc/samsung/i2s.h index 8e15f6a616d..d420a7ca56c 100644 --- a/sound/soc/samsung/i2s.h +++ b/sound/soc/samsung/i2s.h @@ -3,7 +3,7 @@ * ALSA SoC Audio Layer - Samsung I2S Controller driver * * Copyright (c) 2010 Samsung Electronics Co. Ltd. - * Jaswinder Singh <jassi.brar@samsung.com> + * Jaswinder Singh <jassisinghbrar@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as diff --git a/sound/soc/samsung/littlemill.c b/sound/soc/samsung/littlemill.c index 9dd818bde06..e7416851bf7 100644 --- a/sound/soc/samsung/littlemill.c +++ b/sound/soc/samsung/littlemill.c @@ -189,6 +189,9 @@ static int littlemill_late_probe(struct snd_soc_card *card) /* This will check device compatibility itself */ wm8958_mic_detect(codec, &littlemill_headset, NULL, NULL); + /* As will this */ + wm8994_mic_detect(codec, &littlemill_headset, 1); + return 0; } diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index 7ac0ba2025c..321d51134e4 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c @@ -230,8 +230,6 @@ static const struct snd_kcontrol_new neo1973_wm8753_controls[] = { /* GTA02 specific routes and controls */ -#ifdef CONFIG_MACH_NEO1973_GTA02 - static int gta02_speaker_enabled; static int lm4853_set_spk(struct snd_kcontrol *kcontrol, @@ -298,7 +296,7 @@ static int neo1973_gta02_wm8753_init(struct snd_soc_codec *codec) if (ret) return ret; - ret = snd_soc_add_controls(codec, neo1973_gta02_wm8753_controls, + ret = snd_soc_add_card_controls(codec->card, neo1973_gta02_wm8753_controls, ARRAY_SIZE(neo1973_gta02_wm8753_controls)); if (ret) return ret; @@ -311,10 +309,6 @@ static int neo1973_gta02_wm8753_init(struct snd_soc_codec *codec) return 0; } -#else -static int neo1973_gta02_wm8753_init(struct snd_soc_code *codec) { return 0; } -#endif - static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; @@ -322,10 +316,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) int ret; /* set up NC codec pins */ - if (machine_is_neo1973_gta01()) { - snd_soc_dapm_nc_pin(dapm, "LOUT2"); - snd_soc_dapm_nc_pin(dapm, "ROUT2"); - } snd_soc_dapm_nc_pin(dapm, "OUT3"); snd_soc_dapm_nc_pin(dapm, "OUT4"); snd_soc_dapm_nc_pin(dapm, "LINE1"); @@ -338,7 +328,7 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) return ret; /* add neo1973 specific controls */ - ret = snd_soc_add_controls(codec, neo1973_wm8753_controls, + ret = snd_soc_add_card_controls(rtd->card, neo1973_wm8753_controls, ARRAY_SIZE(neo1973_wm8753_controls)); if (ret) return ret; @@ -370,50 +360,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) return 0; } -/* GTA01 specific controls */ - -#ifdef CONFIG_MACH_NEO1973_GTA01 - -static const struct snd_soc_dapm_route neo1973_lm4857_routes[] = { - {"Amp IN", NULL, "ROUT1"}, - {"Amp IN", NULL, "LOUT1"}, - - {"Handset Spk", NULL, "Amp EP"}, - {"Stereo Out", NULL, "Amp LS"}, - {"Headphone", NULL, "Amp HP"}, -}; - -static const struct snd_soc_dapm_widget neo1973_lm4857_dapm_widgets[] = { - SND_SOC_DAPM_SPK("Handset Spk", NULL), - SND_SOC_DAPM_SPK("Stereo Out", NULL), - SND_SOC_DAPM_HP("Headphone", NULL), -}; - -static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) -{ - int ret; - - ret = snd_soc_dapm_new_controls(dapm, neo1973_lm4857_dapm_widgets, - ARRAY_SIZE(neo1973_lm4857_dapm_widgets)); - if (ret) - return ret; - - ret = snd_soc_dapm_add_routes(dapm, neo1973_lm4857_routes, - ARRAY_SIZE(neo1973_lm4857_routes)); - if (ret) - return ret; - - snd_soc_dapm_ignore_suspend(dapm, "Stereo Out"); - snd_soc_dapm_ignore_suspend(dapm, "Handset Spk"); - snd_soc_dapm_ignore_suspend(dapm, "Headphone"); - - return 0; -} - -#else -static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) { return 0; }; -#endif - static struct snd_soc_dai_link neo1973_dai[] = { { /* Hifi Playback - for similatious use with voice below */ .name = "WM8753", @@ -421,7 +367,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { .platform_name = "samsung-audio", .cpu_dai_name = "s3c24xx-iis", .codec_dai_name = "wm8753-hifi", - .codec_name = "wm8753-codec.0-001a", + .codec_name = "wm8753.0-001a", .init = neo1973_wm8753_init, .ops = &neo1973_hifi_ops, }, @@ -430,7 +376,7 @@ static struct snd_soc_dai_link neo1973_dai[] = { .stream_name = "Voice", .cpu_dai_name = "dfbmcs320-pcm", .codec_dai_name = "wm8753-voice", - .codec_name = "wm8753-codec.0-001a", + .codec_name = "wm8753.0-001a", .ops = &neo1973_voice_ops, }, }; @@ -440,11 +386,6 @@ static struct snd_soc_aux_dev neo1973_aux_devs[] = { .name = "dfbmcs320", .codec_name = "dfbmcs320.0", }, - { - .name = "lm4857", - .codec_name = "lm4857.0-007c", - .init = neo1973_lm4857_init, - }, }; static struct snd_soc_codec_conf neo1973_codec_conf[] = { @@ -454,14 +395,10 @@ static struct snd_soc_codec_conf neo1973_codec_conf[] = { }, }; -#ifdef CONFIG_MACH_NEO1973_GTA02 static const struct gpio neo1973_gta02_gpios[] = { { GTA02_GPIO_HP_IN, GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" }, { GTA02_GPIO_AMP_SHUT, GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" }, }; -#else -static const struct gpio neo1973_gta02_gpios[] = {}; -#endif static struct snd_soc_card neo1973 = { .name = "neo1973", @@ -480,7 +417,7 @@ static int __init neo1973_init(void) { int ret; - if (!machine_is_neo1973_gta01() && !machine_is_neo1973_gta02()) + if (!machine_is_neo1973_gta02()) return -ENODEV; if (machine_is_neo1973_gta02()) { diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index 56780206c00..b7b2a1f9142 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -3,7 +3,7 @@ * ALSA SoC Audio Layer - S3C PCM-Controller driver * * Copyright (c) 2009 Samsung Electronics Co. Ltd - * Author: Jaswinder Singh <jassi.brar@samsung.com> + * Author: Jaswinder Singh <jassisinghbrar@gmail.com> * based upon I2S drivers by Ben Dooks. * * This program is free software; you can redistribute it and/or modify @@ -639,7 +639,7 @@ static struct platform_driver s3c_pcm_driver = { module_platform_driver(s3c_pcm_driver); /* Module information */ -MODULE_AUTHOR("Jaswinder Singh, <jassi.brar@samsung.com>"); +MODULE_AUTHOR("Jaswinder Singh, <jassisinghbrar@gmail.com>"); MODULE_DESCRIPTION("S3C PCM Controller Driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:samsung-pcm"); diff --git a/sound/soc/samsung/s3c24xx_simtec.c b/sound/soc/samsung/s3c24xx_simtec.c index a253bcc1646..656d5afe4ca 100644 --- a/sound/soc/samsung/s3c24xx_simtec.c +++ b/sound/soc/samsung/s3c24xx_simtec.c @@ -134,18 +134,18 @@ static const struct snd_kcontrol_new amp_unmute_controls[] = { void simtec_audio_init(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_codec *codec = rtd->codec; + struct snd_soc_card *card = rtd->card; if (pdata->amp_gpio > 0) { pr_debug("%s: adding amp routes\n", __func__); - snd_soc_add_controls(codec, amp_unmute_controls, + snd_soc_add_card_controls(card, amp_unmute_controls, ARRAY_SIZE(amp_unmute_controls)); } if (pdata->amp_gain[0] > 0) { pr_debug("%s: adding amp controls\n", __func__); - snd_soc_add_controls(codec, amp_gain_controls, + snd_soc_add_card_controls(card, amp_gain_controls, ARRAY_SIZE(amp_gain_controls)); } } diff --git a/sound/soc/samsung/smdk_wm8580.c b/sound/soc/samsung/smdk_wm8580.c index bff8758e7f2..ade2809cf39 100644 --- a/sound/soc/samsung/smdk_wm8580.c +++ b/sound/soc/samsung/smdk_wm8580.c @@ -2,7 +2,7 @@ * smdk_wm8580.c * * Copyright (c) 2009 Samsung Electronics Co. Ltd - * Author: Jaswinder Singh <jassi.brar@samsung.com> + * Author: Jaswinder Singh <jassisinghbrar@gmail.com> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -253,6 +253,6 @@ static void __exit smdk_audio_exit(void) } module_exit(smdk_audio_exit); -MODULE_AUTHOR("Jaswinder Singh, jassi.brar@samsung.com"); +MODULE_AUTHOR("Jaswinder Singh, jassisinghbrar@gmail.com"); MODULE_DESCRIPTION("ALSA SoC SMDK WM8580"); MODULE_LICENSE("GPL"); diff --git a/sound/soc/samsung/smdk_wm9713.c b/sound/soc/samsung/smdk_wm9713.c index 8e26a730fcd..55b2ca7f329 100644 --- a/sound/soc/samsung/smdk_wm9713.c +++ b/sound/soc/samsung/smdk_wm9713.c @@ -2,7 +2,7 @@ * smdk_wm9713.c -- SoC audio for SMDK * * Copyright 2010 Samsung Electronics Co. Ltd. - * Author: Jaswinder Singh Brar <jassi.brar@samsung.com> + * Author: Jaswinder Singh Brar <jassisinghbrar@gmail.com> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -103,6 +103,6 @@ module_init(smdk_init); module_exit(smdk_exit); /* Module information */ -MODULE_AUTHOR("Jaswinder Singh Brar, jassi.brar@samsung.com"); +MODULE_AUTHOR("Jaswinder Singh Brar, jassisinghbrar@gmail.com"); MODULE_DESCRIPTION("ALSA SoC SMDK+WM9713"); MODULE_LICENSE("GPL"); |