aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-30 04:24:05 -0400
committerTakashi Iwai <tiwai@suse.de>2014-09-30 04:24:05 -0400
commit5498380e4f403c0938801e2cd6683353d0029cac (patch)
treec65ab75034cac68e45da4d5bbb1513728bacec84 /sound
parente76bf634870e3c5e3a767ad575f1d404c9f1cab8 (diff)
parent82b925c405444b760e743b55a9ad498cb3551afe (diff)
Merge tag 'asoc-v3.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.17 A few small driver specific fixes and a couple of error handling fixes in the core.
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt286.c7
-rw-r--r--sound/soc/fsl/fsl_ssi.c12
-rw-r--r--sound/soc/soc-compress.c6
-rw-r--r--sound/soc/soc-core.c2
4 files changed, 13 insertions, 14 deletions
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index e4f6102efc1a..b86b426f159d 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -51,7 +51,7 @@ static struct reg_default rt286_index_def[] = {
51 { 0x04, 0xaf01 }, 51 { 0x04, 0xaf01 },
52 { 0x08, 0x000d }, 52 { 0x08, 0x000d },
53 { 0x09, 0xd810 }, 53 { 0x09, 0xd810 },
54 { 0x0a, 0x0060 }, 54 { 0x0a, 0x0120 },
55 { 0x0b, 0x0000 }, 55 { 0x0b, 0x0000 },
56 { 0x0d, 0x2800 }, 56 { 0x0d, 0x2800 },
57 { 0x0f, 0x0000 }, 57 { 0x0f, 0x0000 },
@@ -60,7 +60,7 @@ static struct reg_default rt286_index_def[] = {
60 { 0x33, 0x0208 }, 60 { 0x33, 0x0208 },
61 { 0x49, 0x0004 }, 61 { 0x49, 0x0004 },
62 { 0x4f, 0x50e9 }, 62 { 0x4f, 0x50e9 },
63 { 0x50, 0x2c00 }, 63 { 0x50, 0x2000 },
64 { 0x63, 0x2902 }, 64 { 0x63, 0x2902 },
65 { 0x67, 0x1111 }, 65 { 0x67, 0x1111 },
66 { 0x68, 0x1016 }, 66 { 0x68, 0x1016 },
@@ -104,7 +104,6 @@ static const struct reg_default rt286_reg[] = {
104 { 0x02170700, 0x00000000 }, 104 { 0x02170700, 0x00000000 },
105 { 0x02270100, 0x00000000 }, 105 { 0x02270100, 0x00000000 },
106 { 0x02370100, 0x00000000 }, 106 { 0x02370100, 0x00000000 },
107 { 0x02040000, 0x00004002 },
108 { 0x01870700, 0x00000020 }, 107 { 0x01870700, 0x00000020 },
109 { 0x00830000, 0x000000c3 }, 108 { 0x00830000, 0x000000c3 },
110 { 0x00930000, 0x000000c3 }, 109 { 0x00930000, 0x000000c3 },
@@ -192,7 +191,6 @@ static int rt286_hw_write(void *context, unsigned int reg, unsigned int value)
192 /*handle index registers*/ 191 /*handle index registers*/
193 if (reg <= 0xff) { 192 if (reg <= 0xff) {
194 rt286_hw_write(client, RT286_COEF_INDEX, reg); 193 rt286_hw_write(client, RT286_COEF_INDEX, reg);
195 reg = RT286_PROC_COEF;
196 for (i = 0; i < INDEX_CACHE_SIZE; i++) { 194 for (i = 0; i < INDEX_CACHE_SIZE; i++) {
197 if (reg == rt286->index_cache[i].reg) { 195 if (reg == rt286->index_cache[i].reg) {
198 rt286->index_cache[i].def = value; 196 rt286->index_cache[i].def = value;
@@ -200,6 +198,7 @@ static int rt286_hw_write(void *context, unsigned int reg, unsigned int value)
200 } 198 }
201 199
202 } 200 }
201 reg = RT286_PROC_COEF;
203 } 202 }
204 203
205 data[0] = (reg >> 24) & 0xff; 204 data[0] = (reg >> 24) & 0xff;
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 87eb5776a39b..de6ab06f58a5 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -748,8 +748,9 @@ static int fsl_ssi_hw_free(struct snd_pcm_substream *substream,
748 return 0; 748 return 0;
749} 749}
750 750
751static int _fsl_ssi_set_dai_fmt(struct fsl_ssi_private *ssi_private, 751static int _fsl_ssi_set_dai_fmt(struct device *dev,
752 unsigned int fmt) 752 struct fsl_ssi_private *ssi_private,
753 unsigned int fmt)
753{ 754{
754 struct regmap *regs = ssi_private->regs; 755 struct regmap *regs = ssi_private->regs;
755 u32 strcr = 0, stcr, srcr, scr, mask; 756 u32 strcr = 0, stcr, srcr, scr, mask;
@@ -758,7 +759,7 @@ static int _fsl_ssi_set_dai_fmt(struct fsl_ssi_private *ssi_private,
758 ssi_private->dai_fmt = fmt; 759 ssi_private->dai_fmt = fmt;
759 760
760 if (fsl_ssi_is_i2s_master(ssi_private) && IS_ERR(ssi_private->baudclk)) { 761 if (fsl_ssi_is_i2s_master(ssi_private) && IS_ERR(ssi_private->baudclk)) {
761 dev_err(&ssi_private->pdev->dev, "baudclk is missing which is necessary for master mode\n"); 762 dev_err(dev, "baudclk is missing which is necessary for master mode\n");
762 return -EINVAL; 763 return -EINVAL;
763 } 764 }
764 765
@@ -913,7 +914,7 @@ static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
913{ 914{
914 struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai); 915 struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai);
915 916
916 return _fsl_ssi_set_dai_fmt(ssi_private, fmt); 917 return _fsl_ssi_set_dai_fmt(cpu_dai->dev, ssi_private, fmt);
917} 918}
918 919
919/** 920/**
@@ -1387,7 +1388,8 @@ static int fsl_ssi_probe(struct platform_device *pdev)
1387 1388
1388done: 1389done:
1389 if (ssi_private->dai_fmt) 1390 if (ssi_private->dai_fmt)
1390 _fsl_ssi_set_dai_fmt(ssi_private, ssi_private->dai_fmt); 1391 _fsl_ssi_set_dai_fmt(&pdev->dev, ssi_private,
1392 ssi_private->dai_fmt);
1391 1393
1392 return 0; 1394 return 0;
1393 1395
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 3092b58fede6..cecfab3cc948 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -102,13 +102,11 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
102 fe->dpcm[stream].runtime = fe_substream->runtime; 102 fe->dpcm[stream].runtime = fe_substream->runtime;
103 103
104 ret = dpcm_path_get(fe, stream, &list); 104 ret = dpcm_path_get(fe, stream, &list);
105 if (ret < 0) { 105 if (ret < 0)
106 mutex_unlock(&fe->card->mutex);
107 goto fe_err; 106 goto fe_err;
108 } else if (ret == 0) { 107 else if (ret == 0)
109 dev_dbg(fe->dev, "ASoC: %s no valid %s route\n", 108 dev_dbg(fe->dev, "ASoC: %s no valid %s route\n",
110 fe->dai_link->name, stream ? "capture" : "playback"); 109 fe->dai_link->name, stream ? "capture" : "playback");
111 }
112 110
113 /* calculate valid and active FE <-> BE dpcms */ 111 /* calculate valid and active FE <-> BE dpcms */
114 dpcm_process_paths(fe, stream, &list, 1); 112 dpcm_process_paths(fe, stream, &list, 1);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 889f4e3d35dc..d074aa91b023 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3203,7 +3203,7 @@ int snd_soc_bytes_put(struct snd_kcontrol *kcontrol,
3203 unsigned int val, mask; 3203 unsigned int val, mask;
3204 void *data; 3204 void *data;
3205 3205
3206 if (!component->regmap) 3206 if (!component->regmap || !params->num_regs)
3207 return -EINVAL; 3207 return -EINVAL;
3208 3208
3209 len = params->num_regs * component->val_bytes; 3209 len = params->num_regs * component->val_bytes;