diff options
| -rw-r--r-- | Documentation/devicetree/bindings/sound/tlv320aic31xx.txt | 6 | ||||
| -rw-r--r-- | sound/soc/codecs/tlv320aic31xx.c | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8962.c | 15 | ||||
| -rw-r--r-- | sound/soc/codecs/wm8962.h | 4 | ||||
| -rw-r--r-- | sound/soc/fsl/fsl_esai.c | 22 | ||||
| -rw-r--r-- | sound/soc/fsl/fsl_spdif.h | 4 | ||||
| -rw-r--r-- | sound/soc/fsl/imx-audmux.c | 2 | ||||
| -rw-r--r-- | sound/soc/sh/rcar/core.c | 5 | ||||
| -rw-r--r-- | sound/soc/sh/rcar/src.c | 4 | ||||
| -rw-r--r-- | sound/soc/sh/rcar/ssi.c | 4 |
10 files changed, 43 insertions, 25 deletions
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt index 74c66dee3e14..eff12be5e789 100644 --- a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt +++ b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt | |||
| @@ -13,6 +13,9 @@ Required properties: | |||
| 13 | "ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) | 13 | "ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) |
| 14 | 14 | ||
| 15 | - reg - <int> - I2C slave address | 15 | - reg - <int> - I2C slave address |
| 16 | - HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | ||
| 17 | DVDD-supply : power supplies for the device as covered in | ||
| 18 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
| 16 | 19 | ||
| 17 | 20 | ||
| 18 | Optional properties: | 21 | Optional properties: |
| @@ -24,9 +27,6 @@ Optional properties: | |||
| 24 | 3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD | 27 | 3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD |
| 25 | If this node is not mentioned or if the value is unknown, then | 28 | If this node is not mentioned or if the value is unknown, then |
| 26 | micbias is set to 2.0V. | 29 | micbias is set to 2.0V. |
| 27 | - HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | ||
| 28 | DVDD-supply : power supplies for the device as covered in | ||
| 29 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
| 30 | 30 | ||
| 31 | CODEC output pins: | 31 | CODEC output pins: |
| 32 | * HPL | 32 | * HPL |
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, | |||
| 2929 | static int wm8962_mute(struct snd_soc_dai *dai, int mute) | 2929 | static 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/fsl_spdif.h b/sound/soc/fsl/fsl_spdif.h index b1266790d117..605a10b2112b 100644 --- a/sound/soc/fsl/fsl_spdif.h +++ b/sound/soc/fsl/fsl_spdif.h | |||
| @@ -144,8 +144,8 @@ enum spdif_gainsel { | |||
| 144 | 144 | ||
| 145 | /* SPDIF Clock register */ | 145 | /* SPDIF Clock register */ |
| 146 | #define STC_SYSCLK_DIV_OFFSET 11 | 146 | #define STC_SYSCLK_DIV_OFFSET 11 |
| 147 | #define STC_SYSCLK_DIV_MASK (0x1ff << STC_TXCLK_SRC_OFFSET) | 147 | #define STC_SYSCLK_DIV_MASK (0x1ff << STC_SYSCLK_DIV_OFFSET) |
| 148 | #define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_TXCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK) | 148 | #define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_SYSCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK) |
| 149 | #define STC_TXCLK_SRC_OFFSET 8 | 149 | #define STC_TXCLK_SRC_OFFSET 8 |
| 150 | #define STC_TXCLK_SRC_MASK (0x7 << STC_TXCLK_SRC_OFFSET) | 150 | #define STC_TXCLK_SRC_MASK (0x7 << STC_TXCLK_SRC_OFFSET) |
| 151 | #define STC_TXCLK_SRC_SET(x) ((x << STC_TXCLK_SRC_OFFSET) & STC_TXCLK_SRC_MASK) | 151 | #define STC_TXCLK_SRC_SET(x) ((x << STC_TXCLK_SRC_OFFSET) & STC_TXCLK_SRC_MASK) |
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 | ||
| 148 | static void __init audmux_debugfs_init(void) | 148 | static 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 | ||
| 209 | static void __rsnd_dma_start(struct rsnd_dma *dma) | 208 | static void __rsnd_dma_start(struct rsnd_dma *dma) |
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 6232b7d307aa..4d0720ed5a90 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c | |||
| @@ -258,7 +258,7 @@ static int rsnd_src_init(struct rsnd_mod *mod, | |||
| 258 | { | 258 | { |
| 259 | struct rsnd_src *src = rsnd_mod_to_src(mod); | 259 | struct rsnd_src *src = rsnd_mod_to_src(mod); |
| 260 | 260 | ||
| 261 | clk_enable(src->clk); | 261 | clk_prepare_enable(src->clk); |
| 262 | 262 | ||
| 263 | return 0; | 263 | return 0; |
| 264 | } | 264 | } |
| @@ -269,7 +269,7 @@ static int rsnd_src_quit(struct rsnd_mod *mod, | |||
| 269 | { | 269 | { |
| 270 | struct rsnd_src *src = rsnd_mod_to_src(mod); | 270 | struct rsnd_src *src = rsnd_mod_to_src(mod); |
| 271 | 271 | ||
| 272 | clk_disable(src->clk); | 272 | clk_disable_unprepare(src->clk); |
| 273 | 273 | ||
| 274 | return 0; | 274 | return 0; |
| 275 | } | 275 | } |
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 4b7e20603dd7..1d8387c25bd8 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c | |||
| @@ -171,7 +171,7 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi, | |||
| 171 | u32 cr; | 171 | u32 cr; |
| 172 | 172 | ||
| 173 | if (0 == ssi->usrcnt) { | 173 | if (0 == ssi->usrcnt) { |
| 174 | clk_enable(ssi->clk); | 174 | clk_prepare_enable(ssi->clk); |
| 175 | 175 | ||
| 176 | if (rsnd_dai_is_clk_master(rdai)) { | 176 | if (rsnd_dai_is_clk_master(rdai)) { |
| 177 | if (rsnd_ssi_clk_from_parent(ssi)) | 177 | if (rsnd_ssi_clk_from_parent(ssi)) |
| @@ -230,7 +230,7 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi, | |||
| 230 | rsnd_ssi_master_clk_stop(ssi); | 230 | rsnd_ssi_master_clk_stop(ssi); |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | clk_disable(ssi->clk); | 233 | clk_disable_unprepare(ssi->clk); |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod)); | 236 | dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod)); |
