aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-05-14 08:24:09 -0400
committerTakashi Iwai <tiwai@suse.de>2014-05-14 08:24:09 -0400
commit7ca33c7a1d7f8566d8b08a0df55b26758d985a15 (patch)
tree247070a39b0fe18dbcee8685c02f952ce4f6cb95 /sound/soc
parent927cdab3b6fe7e32990f5563d295eedfc355be6d (diff)
parentf9a405961eec4ee9a71a433a473b244ae2d74c3c (diff)
Merge tag 'asoc-v3.15-rc5-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Driver fixes for v3.15 A small set of driver fixes, nothing remarkable in itself or of any relevance outside of the driver.
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/tlv320aic31xx.c2
-rw-r--r--sound/soc/codecs/wm8962.c15
-rw-r--r--sound/soc/codecs/wm8962.h4
-rw-r--r--sound/soc/fsl/fsl_esai.c22
-rw-r--r--sound/soc/fsl/imx-audmux.c2
-rw-r--r--sound/soc/sh/rcar/core.c5
6 files changed, 34 insertions, 16 deletions
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index fa158cfe9b32..d1929de641e2 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -376,7 +376,7 @@ static int aic31xx_dapm_power_event(struct snd_soc_dapm_widget *w,
376 reg = AIC31XX_ADCFLAG; 376 reg = AIC31XX_ADCFLAG;
377 break; 377 break;
378 default: 378 default:
379 dev_err(w->codec->dev, "Unknown widget '%s' calling %s/n", 379 dev_err(w->codec->dev, "Unknown widget '%s' calling %s\n",
380 w->name, __func__); 380 w->name, __func__);
381 return -EINVAL; 381 return -EINVAL;
382 } 382 }
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 5522d2566c67..ecd26dd2e442 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -154,6 +154,7 @@ static struct reg_default wm8962_reg[] = {
154 { 40, 0x0000 }, /* R40 - SPKOUTL volume */ 154 { 40, 0x0000 }, /* R40 - SPKOUTL volume */
155 { 41, 0x0000 }, /* R41 - SPKOUTR volume */ 155 { 41, 0x0000 }, /* R41 - SPKOUTR volume */
156 156
157 { 49, 0x0010 }, /* R49 - Class D Control 1 */
157 { 51, 0x0003 }, /* R51 - Class D Control 2 */ 158 { 51, 0x0003 }, /* R51 - Class D Control 2 */
158 159
159 { 56, 0x0506 }, /* R56 - Clocking 4 */ 160 { 56, 0x0506 }, /* R56 - Clocking 4 */
@@ -795,7 +796,6 @@ static bool wm8962_volatile_register(struct device *dev, unsigned int reg)
795 case WM8962_ALC2: 796 case WM8962_ALC2:
796 case WM8962_THERMAL_SHUTDOWN_STATUS: 797 case WM8962_THERMAL_SHUTDOWN_STATUS:
797 case WM8962_ADDITIONAL_CONTROL_4: 798 case WM8962_ADDITIONAL_CONTROL_4:
798 case WM8962_CLASS_D_CONTROL_1:
799 case WM8962_DC_SERVO_6: 799 case WM8962_DC_SERVO_6:
800 case WM8962_INTERRUPT_STATUS_1: 800 case WM8962_INTERRUPT_STATUS_1:
801 case WM8962_INTERRUPT_STATUS_2: 801 case WM8962_INTERRUPT_STATUS_2:
@@ -2929,13 +2929,22 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
2929static int wm8962_mute(struct snd_soc_dai *dai, int mute) 2929static int wm8962_mute(struct snd_soc_dai *dai, int mute)
2930{ 2930{
2931 struct snd_soc_codec *codec = dai->codec; 2931 struct snd_soc_codec *codec = dai->codec;
2932 int val; 2932 int val, ret;
2933 2933
2934 if (mute) 2934 if (mute)
2935 val = WM8962_DAC_MUTE; 2935 val = WM8962_DAC_MUTE | WM8962_DAC_MUTE_ALT;
2936 else 2936 else
2937 val = 0; 2937 val = 0;
2938 2938
2939 /**
2940 * The DAC mute bit is mirrored in two registers, update both to keep
2941 * the register cache consistent.
2942 */
2943 ret = snd_soc_update_bits(codec, WM8962_CLASS_D_CONTROL_1,
2944 WM8962_DAC_MUTE_ALT, val);
2945 if (ret < 0)
2946 return ret;
2947
2939 return snd_soc_update_bits(codec, WM8962_ADC_DAC_CONTROL_1, 2948 return snd_soc_update_bits(codec, WM8962_ADC_DAC_CONTROL_1,
2940 WM8962_DAC_MUTE, val); 2949 WM8962_DAC_MUTE, val);
2941} 2950}
diff --git a/sound/soc/codecs/wm8962.h b/sound/soc/codecs/wm8962.h
index a1a5d5294c19..910aafd09d21 100644
--- a/sound/soc/codecs/wm8962.h
+++ b/sound/soc/codecs/wm8962.h
@@ -1954,6 +1954,10 @@
1954#define WM8962_SPKOUTL_ENA_MASK 0x0040 /* SPKOUTL_ENA */ 1954#define WM8962_SPKOUTL_ENA_MASK 0x0040 /* SPKOUTL_ENA */
1955#define WM8962_SPKOUTL_ENA_SHIFT 6 /* SPKOUTL_ENA */ 1955#define WM8962_SPKOUTL_ENA_SHIFT 6 /* SPKOUTL_ENA */
1956#define WM8962_SPKOUTL_ENA_WIDTH 1 /* SPKOUTL_ENA */ 1956#define WM8962_SPKOUTL_ENA_WIDTH 1 /* SPKOUTL_ENA */
1957#define WM8962_DAC_MUTE_ALT 0x0010 /* DAC_MUTE */
1958#define WM8962_DAC_MUTE_ALT_MASK 0x0010 /* DAC_MUTE */
1959#define WM8962_DAC_MUTE_ALT_SHIFT 4 /* DAC_MUTE */
1960#define WM8962_DAC_MUTE_ALT_WIDTH 1 /* DAC_MUTE */
1957#define WM8962_SPKOUTL_PGA_MUTE 0x0002 /* SPKOUTL_PGA_MUTE */ 1961#define WM8962_SPKOUTL_PGA_MUTE 0x0002 /* SPKOUTL_PGA_MUTE */
1958#define WM8962_SPKOUTL_PGA_MUTE_MASK 0x0002 /* SPKOUTL_PGA_MUTE */ 1962#define WM8962_SPKOUTL_PGA_MUTE_MASK 0x0002 /* SPKOUTL_PGA_MUTE */
1959#define WM8962_SPKOUTL_PGA_MUTE_SHIFT 1 /* SPKOUTL_PGA_MUTE */ 1963#define WM8962_SPKOUTL_PGA_MUTE_SHIFT 1 /* SPKOUTL_PGA_MUTE */
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index c8e5db1414d7..496ce2eb2f1f 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -258,10 +258,16 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
258 return -EINVAL; 258 return -EINVAL;
259 } 259 }
260 260
261 if (ratio == 1) { 261 /* Only EXTAL source can be output directly without using PSR and PM */
262 if (ratio == 1 && clksrc == esai_priv->extalclk) {
262 /* Bypass all the dividers if not being needed */ 263 /* Bypass all the dividers if not being needed */
263 ecr |= tx ? ESAI_ECR_ETO : ESAI_ECR_ERO; 264 ecr |= tx ? ESAI_ECR_ETO : ESAI_ECR_ERO;
264 goto out; 265 goto out;
266 } else if (ratio < 2) {
267 /* The ratio should be no less than 2 if using other sources */
268 dev_err(dai->dev, "failed to derive required HCK%c rate\n",
269 tx ? 'T' : 'R');
270 return -EINVAL;
265 } 271 }
266 272
267 ret = fsl_esai_divisor_cal(dai, tx, ratio, false, 0); 273 ret = fsl_esai_divisor_cal(dai, tx, ratio, false, 0);
@@ -307,7 +313,8 @@ static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
307 return -EINVAL; 313 return -EINVAL;
308 } 314 }
309 315
310 if (esai_priv->sck_div[tx] && (ratio > 16 || ratio == 0)) { 316 /* The ratio should be contented by FP alone if bypassing PM and PSR */
317 if (!esai_priv->sck_div[tx] && (ratio > 16 || ratio == 0)) {
311 dev_err(dai->dev, "the ratio is out of range (1 ~ 16)\n"); 318 dev_err(dai->dev, "the ratio is out of range (1 ~ 16)\n");
312 return -EINVAL; 319 return -EINVAL;
313 } 320 }
@@ -454,12 +461,6 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream,
454 } 461 }
455 462
456 if (!dai->active) { 463 if (!dai->active) {
457 /* Reset Port C */
458 regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC,
459 ESAI_PRRC_PDC_MASK, ESAI_PRRC_PDC(ESAI_GPIO));
460 regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC,
461 ESAI_PCRC_PC_MASK, ESAI_PCRC_PC(ESAI_GPIO));
462
463 /* Set synchronous mode */ 464 /* Set synchronous mode */
464 regmap_update_bits(esai_priv->regmap, REG_ESAI_SAICR, 465 regmap_update_bits(esai_priv->regmap, REG_ESAI_SAICR,
465 ESAI_SAICR_SYNC, esai_priv->synchronous ? 466 ESAI_SAICR_SYNC, esai_priv->synchronous ?
@@ -519,6 +520,11 @@ static int fsl_esai_hw_params(struct snd_pcm_substream *substream,
519 520
520 regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx), mask, val); 521 regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx), mask, val);
521 522
523 /* Remove ESAI personal reset by configuring ESAI_PCRC and ESAI_PRRC */
524 regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC,
525 ESAI_PRRC_PDC_MASK, ESAI_PRRC_PDC(ESAI_GPIO));
526 regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC,
527 ESAI_PCRC_PC_MASK, ESAI_PCRC_PC(ESAI_GPIO));
522 return 0; 528 return 0;
523} 529}
524 530
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index ac869931d7f1..267717aa96c1 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -145,7 +145,7 @@ static const struct file_operations audmux_debugfs_fops = {
145 .llseek = default_llseek, 145 .llseek = default_llseek,
146}; 146};
147 147
148static void __init audmux_debugfs_init(void) 148static void audmux_debugfs_init(void)
149{ 149{
150 int i; 150 int i;
151 char buf[20]; 151 char buf[20];
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 215b668166be..89424470a1f3 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -197,13 +197,12 @@ static void rsnd_dma_complete(void *data)
197 * rsnd_dai_pointer_update() will be called twice, 197 * rsnd_dai_pointer_update() will be called twice,
198 * ant it will breaks io->byte_pos 198 * ant it will breaks io->byte_pos
199 */ 199 */
200
201 rsnd_dai_pointer_update(io, io->byte_per_period);
202
203 if (dma->submit_loop) 200 if (dma->submit_loop)
204 rsnd_dma_continue(dma); 201 rsnd_dma_continue(dma);
205 202
206 rsnd_unlock(priv, flags); 203 rsnd_unlock(priv, flags);
204
205 rsnd_dai_pointer_update(io, io->byte_per_period);
207} 206}
208 207
209static void __rsnd_dma_start(struct rsnd_dma *dma) 208static void __rsnd_dma_start(struct rsnd_dma *dma)