diff options
Diffstat (limited to 'kernel/sound/soc/samsung')
-rw-r--r-- | kernel/sound/soc/samsung/Kconfig | 15 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/arndale_rt5631.c | 1 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/h1940_uda1380.c | 5 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/i2s.c | 23 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/lowland.c | 2 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/rx1950_uda1380.c | 5 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/smartq_wm8987.c | 6 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/smdk_wm8994.c | 3 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/snow.c | 1 | ||||
-rw-r--r-- | kernel/sound/soc/samsung/speyside.c | 2 |
10 files changed, 33 insertions, 30 deletions
diff --git a/kernel/sound/soc/samsung/Kconfig b/kernel/sound/soc/samsung/Kconfig index 0632a3685..3744c9ed5 100644 --- a/kernel/sound/soc/samsung/Kconfig +++ b/kernel/sound/soc/samsung/Kconfig @@ -174,7 +174,8 @@ config SND_SOC_SMDK_WM8994_PCM config SND_SOC_SPEYSIDE tristate "Audio support for Wolfson Speyside" - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && I2C && SPI_MASTER + depends on SND_SOC_SAMSUNG && I2C && SPI_MASTER + depends on MACH_WLF_CRAGG_6410 || COMPILE_TEST select SND_SAMSUNG_I2S select SND_SOC_WM8996 select SND_SOC_WM9081 @@ -183,13 +184,15 @@ config SND_SOC_SPEYSIDE config SND_SOC_TOBERMORY tristate "Audio support for Wolfson Tobermory" - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && INPUT && I2C + depends on SND_SOC_SAMSUNG && INPUT && I2C + depends on MACH_WLF_CRAGG_6410 || COMPILE_TEST select SND_SAMSUNG_I2S select SND_SOC_WM8962 config SND_SOC_BELLS tristate "Audio support for Wolfson Bells" - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && MFD_ARIZONA && I2C && SPI_MASTER + depends on SND_SOC_SAMSUNG && MFD_ARIZONA && I2C && SPI_MASTER + depends on MACH_WLF_CRAGG_6410 || COMPILE_TEST select SND_SAMSUNG_I2S select SND_SOC_WM5102 select SND_SOC_WM5110 @@ -199,14 +202,16 @@ config SND_SOC_BELLS config SND_SOC_LOWLAND tristate "Audio support for Wolfson Lowland" - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && I2C + depends on SND_SOC_SAMSUNG && I2C + depends on MACH_WLF_CRAGG_6410 || COMPILE_TEST select SND_SAMSUNG_I2S select SND_SOC_WM5100 select SND_SOC_WM9081 config SND_SOC_LITTLEMILL tristate "Audio support for Wolfson Littlemill" - depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && I2C + depends on SND_SOC_SAMSUNG && I2C + depends on MACH_WLF_CRAGG_6410 || COMPILE_TEST select SND_SAMSUNG_I2S select MFD_WM8994 select SND_SOC_WM8994 diff --git a/kernel/sound/soc/samsung/arndale_rt5631.c b/kernel/sound/soc/samsung/arndale_rt5631.c index 9e371eb3e..ee1fda92f 100644 --- a/kernel/sound/soc/samsung/arndale_rt5631.c +++ b/kernel/sound/soc/samsung/arndale_rt5631.c @@ -71,6 +71,7 @@ static struct snd_soc_dai_link arndale_rt5631_dai[] = { static struct snd_soc_card arndale_rt5631 = { .name = "Arndale RT5631", + .owner = THIS_MODULE, .dai_link = arndale_rt5631_dai, .num_links = ARRAY_SIZE(arndale_rt5631_dai), }; diff --git a/kernel/sound/soc/samsung/h1940_uda1380.c b/kernel/sound/soc/samsung/h1940_uda1380.c index c72e9fb26..5f5825fae 100644 --- a/kernel/sound/soc/samsung/h1940_uda1380.c +++ b/kernel/sound/soc/samsung/h1940_uda1380.c @@ -26,16 +26,15 @@ #include <mach/gpio-samsung.h> #include "s3c24xx-i2s.h" -static unsigned int rates[] = { +static const unsigned int rates[] = { 11025, 22050, 44100, }; -static struct snd_pcm_hw_constraint_list hw_rates = { +static const struct snd_pcm_hw_constraint_list hw_rates = { .count = ARRAY_SIZE(rates), .list = rates, - .mask = 0, }; static struct snd_soc_jack hp_jack; diff --git a/kernel/sound/soc/samsung/i2s.c b/kernel/sound/soc/samsung/i2s.c index b92ab40d2..7dbf899b2 100644 --- a/kernel/sound/soc/samsung/i2s.c +++ b/kernel/sound/soc/samsung/i2s.c @@ -480,10 +480,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, unsigned int cdcon_mask = 1 << i2s_regs->cdclkcon_off; unsigned int rsrc_mask = 1 << i2s_regs->rclksrc_off; u32 mod, mask, val = 0; + unsigned long flags; - spin_lock(i2s->lock); + spin_lock_irqsave(i2s->lock, flags); mod = readl(i2s->addr + I2SMOD); - spin_unlock(i2s->lock); + spin_unlock_irqrestore(i2s->lock, flags); switch (clk_id) { case SAMSUNG_I2S_OPCLK: @@ -574,11 +575,11 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, return -EINVAL; } - spin_lock(i2s->lock); + spin_lock_irqsave(i2s->lock, flags); mod = readl(i2s->addr + I2SMOD); mod = (mod & ~mask) | val; writel(mod, i2s->addr + I2SMOD); - spin_unlock(i2s->lock); + spin_unlock_irqrestore(i2s->lock, flags); return 0; } @@ -589,6 +590,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, struct i2s_dai *i2s = to_info(dai); int lrp_shift, sdf_shift, sdf_mask, lrp_rlow, mod_slave; u32 mod, tmp = 0; + unsigned long flags; lrp_shift = i2s->variant_regs->lrp_off; sdf_shift = i2s->variant_regs->sdf_off; @@ -648,7 +650,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, return -EINVAL; } - spin_lock(i2s->lock); + spin_lock_irqsave(i2s->lock, flags); mod = readl(i2s->addr + I2SMOD); /* * Don't change the I2S mode if any controller is active on this @@ -656,7 +658,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, */ if (any_active(i2s) && ((mod & (sdf_mask | lrp_rlow | mod_slave)) != tmp)) { - spin_unlock(i2s->lock); + spin_unlock_irqrestore(i2s->lock, flags); dev_err(&i2s->pdev->dev, "%s:%d Other DAI busy\n", __func__, __LINE__); return -EAGAIN; @@ -665,7 +667,7 @@ static int i2s_set_fmt(struct snd_soc_dai *dai, mod &= ~(sdf_mask | lrp_rlow | mod_slave); mod |= tmp; writel(mod, i2s->addr + I2SMOD); - spin_unlock(i2s->lock); + spin_unlock_irqrestore(i2s->lock, flags); return 0; } @@ -675,6 +677,7 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, { struct i2s_dai *i2s = to_info(dai); u32 mod, mask = 0, val = 0; + unsigned long flags; if (!is_secondary(i2s)) mask |= (MOD_DC2_EN | MOD_DC1_EN); @@ -743,11 +746,11 @@ static int i2s_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - spin_lock(i2s->lock); + spin_lock_irqsave(i2s->lock, flags); mod = readl(i2s->addr + I2SMOD); mod = (mod & ~mask) | val; writel(mod, i2s->addr + I2SMOD); - spin_unlock(i2s->lock); + spin_unlock_irqrestore(i2s->lock, flags); samsung_asoc_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture); @@ -1493,7 +1496,7 @@ static const struct samsung_i2s_dai_data samsung_dai_type_sec = { .dai_type = TYPE_SEC, }; -static struct platform_device_id samsung_i2s_driver_ids[] = { +static const struct platform_device_id samsung_i2s_driver_ids[] = { { .name = "samsung-i2s", .driver_data = (kernel_ulong_t)&i2sv3_dai_type, diff --git a/kernel/sound/soc/samsung/lowland.c b/kernel/sound/soc/samsung/lowland.c index 5f1560931..0d0f58208 100644 --- a/kernel/sound/soc/samsung/lowland.c +++ b/kernel/sound/soc/samsung/lowland.c @@ -72,7 +72,7 @@ static int lowland_wm9081_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; - snd_soc_dapm_nc_pin(&codec->dapm, "LINEOUT"); + snd_soc_dapm_nc_pin(&rtd->card->dapm, "LINEOUT"); /* At any time the WM9081 is active it will have this clock */ return snd_soc_codec_set_sysclk(codec, WM9081_SYSCLK_MCLK, 0, diff --git a/kernel/sound/soc/samsung/rx1950_uda1380.c b/kernel/sound/soc/samsung/rx1950_uda1380.c index 35e37c457..fa096abe9 100644 --- a/kernel/sound/soc/samsung/rx1950_uda1380.c +++ b/kernel/sound/soc/samsung/rx1950_uda1380.c @@ -38,16 +38,15 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream, static int rx1950_spk_power(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event); -static unsigned int rates[] = { +static const unsigned int rates[] = { 16000, 44100, 48000, }; -static struct snd_pcm_hw_constraint_list hw_rates = { +static const struct snd_pcm_hw_constraint_list hw_rates = { .count = ARRAY_SIZE(rates), .list = rates, - .mask = 0, }; static struct snd_soc_jack hp_jack; diff --git a/kernel/sound/soc/samsung/smartq_wm8987.c b/kernel/sound/soc/samsung/smartq_wm8987.c index dfbe2db1c..a0fe37fbe 100644 --- a/kernel/sound/soc/samsung/smartq_wm8987.c +++ b/kernel/sound/soc/samsung/smartq_wm8987.c @@ -137,8 +137,7 @@ static const struct snd_soc_dapm_route audio_map[] = { static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; + struct snd_soc_dapm_context *dapm = &rtd->card->dapm; int err = 0; /* set endpoints to not connected */ @@ -147,9 +146,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd) snd_soc_dapm_nc_pin(dapm, "OUT3"); snd_soc_dapm_nc_pin(dapm, "ROUT1"); - /* set endpoints to default off mode */ - snd_soc_dapm_disable_pin(dapm, "Headphone Jack"); - /* Headphone jack detection */ err = snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE, &smartq_jack, diff --git a/kernel/sound/soc/samsung/smdk_wm8994.c b/kernel/sound/soc/samsung/smdk_wm8994.c index d38595fbd..ff57b192d 100644 --- a/kernel/sound/soc/samsung/smdk_wm8994.c +++ b/kernel/sound/soc/samsung/smdk_wm8994.c @@ -86,8 +86,7 @@ static struct snd_soc_ops smdk_ops = { static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd) { - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; + struct snd_soc_dapm_context *dapm = &rtd->card->dapm; /* Other pins NC */ snd_soc_dapm_nc_pin(dapm, "HPOUT2P"); diff --git a/kernel/sound/soc/samsung/snow.c b/kernel/sound/soc/samsung/snow.c index 7651dc924..07ce2cfa4 100644 --- a/kernel/sound/soc/samsung/snow.c +++ b/kernel/sound/soc/samsung/snow.c @@ -56,6 +56,7 @@ static int snow_late_probe(struct snd_soc_card *card) static struct snd_soc_card snow_snd = { .name = "Snow-I2S", + .owner = THIS_MODULE, .dai_link = snow_dai, .num_links = ARRAY_SIZE(snow_dai), diff --git a/kernel/sound/soc/samsung/speyside.c b/kernel/sound/soc/samsung/speyside.c index 2dcb988bd..d1ae21c5e 100644 --- a/kernel/sound/soc/samsung/speyside.c +++ b/kernel/sound/soc/samsung/speyside.c @@ -123,7 +123,7 @@ static void speyside_set_polarity(struct snd_soc_codec *codec, gpio_direction_output(WM8996_HPSEL_GPIO, speyside_jack_polarity); /* Re-run DAPM to make sure we're using the correct mic bias */ - snd_soc_dapm_sync(&codec->dapm); + snd_soc_dapm_sync(snd_soc_codec_get_dapm(codec)); } static int speyside_wm0010_init(struct snd_soc_pcm_runtime *rtd) |