aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/rt5645.c13
-rw-r--r--sound/soc/codecs/rt5677.c5
-rw-r--r--sound/soc/codecs/tfa9879.c4
-rw-r--r--sound/soc/codecs/uda1380.c2
-rw-r--r--sound/soc/codecs/wm8960.c2
-rw-r--r--sound/soc/codecs/wm8994.c2
-rw-r--r--sound/soc/davinci/davinci-mcasp.c2
-rw-r--r--sound/soc/fsl/fsl_ssi.c2
-rw-r--r--sound/soc/intel/Makefile2
-rw-r--r--sound/soc/intel/baytrail/sst-baytrail-ipc.c1
-rw-r--r--sound/soc/intel/haswell/sst-haswell-ipc.c1
-rw-r--r--sound/soc/qcom/lpass-cpu.c2
-rw-r--r--sound/soc/samsung/s3c24xx-i2s.c4
-rw-r--r--sound/soc/sh/rcar/dma.c1
-rw-r--r--sound/soc/soc-dapm.c11
15 files changed, 36 insertions, 18 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 69528ae5410c..be4d741c45ba 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -18,6 +18,7 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/spi/spi.h> 19#include <linux/spi/spi.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/acpi.h>
21#include <sound/core.h> 22#include <sound/core.h>
22#include <sound/pcm.h> 23#include <sound/pcm.h>
23#include <sound/pcm_params.h> 24#include <sound/pcm_params.h>
@@ -2656,6 +2657,15 @@ static const struct i2c_device_id rt5645_i2c_id[] = {
2656}; 2657};
2657MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id); 2658MODULE_DEVICE_TABLE(i2c, rt5645_i2c_id);
2658 2659
2660#ifdef CONFIG_ACPI
2661static struct acpi_device_id rt5645_acpi_match[] = {
2662 { "10EC5645", 0 },
2663 { "10EC5650", 0 },
2664 {},
2665};
2666MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
2667#endif
2668
2659static int rt5645_i2c_probe(struct i2c_client *i2c, 2669static int rt5645_i2c_probe(struct i2c_client *i2c,
2660 const struct i2c_device_id *id) 2670 const struct i2c_device_id *id)
2661{ 2671{
@@ -2770,7 +2780,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
2770 2780
2771 case RT5645_DMIC_DATA_GPIO12: 2781 case RT5645_DMIC_DATA_GPIO12:
2772 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1, 2782 regmap_update_bits(rt5645->regmap, RT5645_DMIC_CTRL1,
2773 RT5645_DMIC_1_DP_MASK, RT5645_DMIC_2_DP_GPIO12); 2783 RT5645_DMIC_2_DP_MASK, RT5645_DMIC_2_DP_GPIO12);
2774 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1, 2784 regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1,
2775 RT5645_GP12_PIN_MASK, 2785 RT5645_GP12_PIN_MASK,
2776 RT5645_GP12_PIN_DMIC2_SDA); 2786 RT5645_GP12_PIN_DMIC2_SDA);
@@ -2872,6 +2882,7 @@ static struct i2c_driver rt5645_i2c_driver = {
2872 .driver = { 2882 .driver = {
2873 .name = "rt5645", 2883 .name = "rt5645",
2874 .owner = THIS_MODULE, 2884 .owner = THIS_MODULE,
2885 .acpi_match_table = ACPI_PTR(rt5645_acpi_match),
2875 }, 2886 },
2876 .probe = rt5645_i2c_probe, 2887 .probe = rt5645_i2c_probe,
2877 .remove = rt5645_i2c_remove, 2888 .remove = rt5645_i2c_remove,
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index af182586712d..169aa471ffbd 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -62,6 +62,9 @@ static const struct reg_default init_list[] = {
62 {RT5677_PR_BASE + 0x1e, 0x0000}, 62 {RT5677_PR_BASE + 0x1e, 0x0000},
63 {RT5677_PR_BASE + 0x12, 0x0eaa}, 63 {RT5677_PR_BASE + 0x12, 0x0eaa},
64 {RT5677_PR_BASE + 0x14, 0x018a}, 64 {RT5677_PR_BASE + 0x14, 0x018a},
65 {RT5677_PR_BASE + 0x15, 0x0490},
66 {RT5677_PR_BASE + 0x38, 0x0f71},
67 {RT5677_PR_BASE + 0x39, 0x0f71},
65}; 68};
66#define RT5677_INIT_REG_LEN ARRAY_SIZE(init_list) 69#define RT5677_INIT_REG_LEN ARRAY_SIZE(init_list)
67 70
@@ -914,7 +917,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w,
914{ 917{
915 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 918 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
916 struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); 919 struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
917 int idx = rl6231_calc_dmic_clk(rt5677->sysclk); 920 int idx = rl6231_calc_dmic_clk(rt5677->lrck[RT5677_AIF1] << 8);
918 921
919 if (idx < 0) 922 if (idx < 0)
920 dev_err(codec->dev, "Failed to set DMIC clock\n"); 923 dev_err(codec->dev, "Failed to set DMIC clock\n");
diff --git a/sound/soc/codecs/tfa9879.c b/sound/soc/codecs/tfa9879.c
index 16f1b71edb55..aab0af681e8c 100644
--- a/sound/soc/codecs/tfa9879.c
+++ b/sound/soc/codecs/tfa9879.c
@@ -280,8 +280,8 @@ static int tfa9879_i2c_probe(struct i2c_client *i2c,
280 int i; 280 int i;
281 281
282 tfa9879 = devm_kzalloc(&i2c->dev, sizeof(*tfa9879), GFP_KERNEL); 282 tfa9879 = devm_kzalloc(&i2c->dev, sizeof(*tfa9879), GFP_KERNEL);
283 if (IS_ERR(tfa9879)) 283 if (!tfa9879)
284 return PTR_ERR(tfa9879); 284 return -ENOMEM;
285 285
286 i2c_set_clientdata(i2c, tfa9879); 286 i2c_set_clientdata(i2c, tfa9879);
287 287
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index dc7778b6dd7f..c3c33bd0df1c 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -437,7 +437,7 @@ static int uda1380_set_dai_fmt_both(struct snd_soc_dai *codec_dai,
437 if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS) 437 if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS)
438 return -EINVAL; 438 return -EINVAL;
439 439
440 uda1380_write(codec, UDA1380_IFACE, iface); 440 uda1380_write_reg_cache(codec, UDA1380_IFACE, iface);
441 441
442 return 0; 442 return 0;
443} 443}
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 3035d9856415..e97a7615df85 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -395,7 +395,7 @@ static const struct snd_soc_dapm_route audio_paths[] = {
395 { "Right Input Mixer", "Boost Switch", "Right Boost Mixer", }, 395 { "Right Input Mixer", "Boost Switch", "Right Boost Mixer", },
396 { "Right Input Mixer", NULL, "RINPUT1", }, /* Really Boost Switch */ 396 { "Right Input Mixer", NULL, "RINPUT1", }, /* Really Boost Switch */
397 { "Right Input Mixer", NULL, "RINPUT2" }, 397 { "Right Input Mixer", NULL, "RINPUT2" },
398 { "Right Input Mixer", NULL, "LINPUT3" }, 398 { "Right Input Mixer", NULL, "RINPUT3" },
399 399
400 { "Left ADC", NULL, "Left Input Mixer" }, 400 { "Left ADC", NULL, "Left Input Mixer" },
401 { "Right ADC", NULL, "Right Input Mixer" }, 401 { "Right ADC", NULL, "Right Input Mixer" },
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 4fbc7689339a..a1c04dab6684 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2754,7 +2754,7 @@ static struct {
2754}; 2754};
2755 2755
2756static int fs_ratios[] = { 2756static int fs_ratios[] = {
2757 64, 128, 192, 256, 348, 512, 768, 1024, 1408, 1536 2757 64, 128, 192, 256, 384, 512, 768, 1024, 1408, 1536
2758}; 2758};
2759 2759
2760static int bclk_divs[] = { 2760static int bclk_divs[] = {
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index bb4b78eada58..23c91fa65ab8 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1247,7 +1247,7 @@ static int davinci_mcasp_suspend(struct snd_soc_dai *dai)
1247 u32 reg; 1247 u32 reg;
1248 int i; 1248 int i;
1249 1249
1250 context->pm_state = pm_runtime_enabled(mcasp->dev); 1250 context->pm_state = pm_runtime_active(mcasp->dev);
1251 if (!context->pm_state) 1251 if (!context->pm_state)
1252 pm_runtime_get_sync(mcasp->dev); 1252 pm_runtime_get_sync(mcasp->dev);
1253 1253
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index e8bb8eef1d16..0d48804218b1 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1357,7 +1357,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
1357 } 1357 }
1358 1358
1359 ssi_private->irq = platform_get_irq(pdev, 0); 1359 ssi_private->irq = platform_get_irq(pdev, 0);
1360 if (!ssi_private->irq) { 1360 if (ssi_private->irq < 0) {
1361 dev_err(&pdev->dev, "no irq for node %s\n", pdev->name); 1361 dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
1362 return ssi_private->irq; 1362 return ssi_private->irq;
1363 } 1363 }
diff --git a/sound/soc/intel/Makefile b/sound/soc/intel/Makefile
index cd9aee9871a3..3853ec2ddbc7 100644
--- a/sound/soc/intel/Makefile
+++ b/sound/soc/intel/Makefile
@@ -4,7 +4,7 @@ obj-$(CONFIG_SND_SOC_INTEL_SST) += common/
4# Platform Support 4# Platform Support
5obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/ 5obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/
6obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/ 6obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/
7obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += atom/ 7obj-$(CONFIG_SND_SST_MFLD_PLATFORM) += atom/
8 8
9# Machine support 9# Machine support
10obj-$(CONFIG_SND_SOC_INTEL_SST) += boards/ 10obj-$(CONFIG_SND_SOC_INTEL_SST) += boards/
diff --git a/sound/soc/intel/baytrail/sst-baytrail-ipc.c b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
index 1efb33b36303..a839dbfa5218 100644
--- a/sound/soc/intel/baytrail/sst-baytrail-ipc.c
+++ b/sound/soc/intel/baytrail/sst-baytrail-ipc.c
@@ -759,7 +759,6 @@ fw_err:
759dsp_new_err: 759dsp_new_err:
760 sst_ipc_fini(ipc); 760 sst_ipc_fini(ipc);
761ipc_init_err: 761ipc_init_err:
762 kfree(byt);
763 762
764 return err; 763 return err;
765} 764}
diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c
index 344a1e9bbce5..324eceb07b25 100644
--- a/sound/soc/intel/haswell/sst-haswell-ipc.c
+++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
@@ -2201,7 +2201,6 @@ dma_err:
2201dsp_new_err: 2201dsp_new_err:
2202 sst_ipc_fini(ipc); 2202 sst_ipc_fini(ipc);
2203ipc_init_err: 2203ipc_init_err:
2204 kfree(hsw);
2205 return ret; 2204 return ret;
2206} 2205}
2207EXPORT_SYMBOL_GPL(sst_hsw_dsp_init); 2206EXPORT_SYMBOL_GPL(sst_hsw_dsp_init);
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index 6698d058de29..dc790abaa331 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -194,7 +194,7 @@ static int lpass_cpu_daiops_trigger(struct snd_pcm_substream *substream,
194 int cmd, struct snd_soc_dai *dai) 194 int cmd, struct snd_soc_dai *dai)
195{ 195{
196 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai); 196 struct lpass_data *drvdata = snd_soc_dai_get_drvdata(dai);
197 int ret; 197 int ret = -EINVAL;
198 198
199 switch (cmd) { 199 switch (cmd) {
200 case SNDRV_PCM_TRIGGER_START: 200 case SNDRV_PCM_TRIGGER_START:
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 326d3c3804e3..5bf723689692 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -461,8 +461,8 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev)
461 return -ENOENT; 461 return -ENOENT;
462 } 462 }
463 s3c24xx_i2s.regs = devm_ioremap_resource(&pdev->dev, res); 463 s3c24xx_i2s.regs = devm_ioremap_resource(&pdev->dev, res);
464 if (s3c24xx_i2s.regs == NULL) 464 if (IS_ERR(s3c24xx_i2s.regs))
465 return -ENXIO; 465 return PTR_ERR(s3c24xx_i2s.regs);
466 466
467 s3c24xx_i2s_pcm_stereo_out.dma_addr = res->start + S3C2410_IISFIFO; 467 s3c24xx_i2s_pcm_stereo_out.dma_addr = res->start + S3C2410_IISFIFO;
468 s3c24xx_i2s_pcm_stereo_in.dma_addr = res->start + S3C2410_IISFIFO; 468 s3c24xx_i2s_pcm_stereo_in.dma_addr = res->start + S3C2410_IISFIFO;
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index ac3756f6af60..144308f15fb3 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -156,6 +156,7 @@ static int rsnd_dmaen_init(struct rsnd_priv *priv, struct rsnd_dma *dma, int id,
156 (void *)id); 156 (void *)id);
157 } 157 }
158 if (IS_ERR_OR_NULL(dmaen->chan)) { 158 if (IS_ERR_OR_NULL(dmaen->chan)) {
159 dmaen->chan = NULL;
159 dev_err(dev, "can't get dma channel\n"); 160 dev_err(dev, "can't get dma channel\n");
160 goto rsnd_dma_channel_err; 161 goto rsnd_dma_channel_err;
161 } 162 }
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index defe0f0082b5..158204d08924 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3100,11 +3100,16 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
3100 } 3100 }
3101 3101
3102 prefix = soc_dapm_prefix(dapm); 3102 prefix = soc_dapm_prefix(dapm);
3103 if (prefix) 3103 if (prefix) {
3104 w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name); 3104 w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name);
3105 else 3105 if (widget->sname)
3106 w->sname = kasprintf(GFP_KERNEL, "%s %s", prefix,
3107 widget->sname);
3108 } else {
3106 w->name = kasprintf(GFP_KERNEL, "%s", widget->name); 3109 w->name = kasprintf(GFP_KERNEL, "%s", widget->name);
3107 3110 if (widget->sname)
3111 w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname);
3112 }
3108 if (w->name == NULL) { 3113 if (w->name == NULL) {
3109 kfree(w); 3114 kfree(w);
3110 return NULL; 3115 return NULL;