aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/sgtl5000.c17
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c110
-rw-r--r--sound/soc/codecs/wm2000.c31
-rw-r--r--sound/soc/codecs/wm5100.c3
-rw-r--r--sound/soc/codecs/wm8958-dsp2.c2
-rw-r--r--sound/soc/codecs/wm8996.c7
-rw-r--r--sound/soc/codecs/wm8996.h4
7 files changed, 91 insertions, 83 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index f8863ebb430..7f4ba819a9f 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -987,12 +987,12 @@ static int sgtl5000_restore_regs(struct snd_soc_codec *codec)
987 /* restore regular registers */ 987 /* restore regular registers */
988 for (reg = 0; reg <= SGTL5000_CHIP_SHORT_CTRL; reg += 2) { 988 for (reg = 0; reg <= SGTL5000_CHIP_SHORT_CTRL; reg += 2) {
989 989
990 /* this regs depends on the others */ 990 /* These regs should restore in particular order */
991 if (reg == SGTL5000_CHIP_ANA_POWER || 991 if (reg == SGTL5000_CHIP_ANA_POWER ||
992 reg == SGTL5000_CHIP_CLK_CTRL || 992 reg == SGTL5000_CHIP_CLK_CTRL ||
993 reg == SGTL5000_CHIP_LINREG_CTRL || 993 reg == SGTL5000_CHIP_LINREG_CTRL ||
994 reg == SGTL5000_CHIP_LINE_OUT_CTRL || 994 reg == SGTL5000_CHIP_LINE_OUT_CTRL ||
995 reg == SGTL5000_CHIP_CLK_CTRL) 995 reg == SGTL5000_CHIP_REF_CTRL)
996 continue; 996 continue;
997 997
998 snd_soc_write(codec, reg, cache[reg]); 998 snd_soc_write(codec, reg, cache[reg]);
@@ -1003,8 +1003,17 @@ static int sgtl5000_restore_regs(struct snd_soc_codec *codec)
1003 snd_soc_write(codec, reg, cache[reg]); 1003 snd_soc_write(codec, reg, cache[reg]);
1004 1004
1005 /* 1005 /*
1006 * restore power and other regs according 1006 * restore these regs according to the power setting sequence in
1007 * to set_power() and set_clock() 1007 * sgtl5000_set_power_regs() and clock setting sequence in
1008 * sgtl5000_set_clock().
1009 *
1010 * The order of restore is:
1011 * 1. SGTL5000_CHIP_CLK_CTRL MCLK_FREQ bits (1:0) should be restore after
1012 * SGTL5000_CHIP_ANA_POWER PLL bits set
1013 * 2. SGTL5000_CHIP_LINREG_CTRL should be set before
1014 * SGTL5000_CHIP_ANA_POWER LINREG_D restored
1015 * 3. SGTL5000_CHIP_REF_CTRL controls Analog Ground Voltage,
1016 * prefer to resotre it after SGTL5000_CHIP_ANA_POWER restored
1008 */ 1017 */
1009 snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL, 1018 snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL,
1010 cache[SGTL5000_CHIP_LINREG_CTRL]); 1019 cache[SGTL5000_CHIP_LINREG_CTRL]);
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index eb401ef021f..372b0b83bd9 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -60,7 +60,6 @@ struct aic32x4_rate_divs {
60 60
61struct aic32x4_priv { 61struct aic32x4_priv {
62 u32 sysclk; 62 u32 sysclk;
63 s32 master;
64 u8 page_no; 63 u8 page_no;
65 void *control_data; 64 void *control_data;
66 u32 power_cfg; 65 u32 power_cfg;
@@ -369,7 +368,6 @@ static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai,
369static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) 368static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
370{ 369{
371 struct snd_soc_codec *codec = codec_dai->codec; 370 struct snd_soc_codec *codec = codec_dai->codec;
372 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec);
373 u8 iface_reg_1; 371 u8 iface_reg_1;
374 u8 iface_reg_2; 372 u8 iface_reg_2;
375 u8 iface_reg_3; 373 u8 iface_reg_3;
@@ -384,11 +382,9 @@ static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
384 /* set master/slave audio interface */ 382 /* set master/slave audio interface */
385 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 383 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
386 case SND_SOC_DAIFMT_CBM_CFM: 384 case SND_SOC_DAIFMT_CBM_CFM:
387 aic32x4->master = 1;
388 iface_reg_1 |= AIC32X4_BCLKMASTER | AIC32X4_WCLKMASTER; 385 iface_reg_1 |= AIC32X4_BCLKMASTER | AIC32X4_WCLKMASTER;
389 break; 386 break;
390 case SND_SOC_DAIFMT_CBS_CFS: 387 case SND_SOC_DAIFMT_CBS_CFS:
391 aic32x4->master = 0;
392 break; 388 break;
393 default: 389 default:
394 printk(KERN_ERR "aic32x4: invalid DAI master/slave interface\n"); 390 printk(KERN_ERR "aic32x4: invalid DAI master/slave interface\n");
@@ -526,64 +522,58 @@ static int aic32x4_mute(struct snd_soc_dai *dai, int mute)
526static int aic32x4_set_bias_level(struct snd_soc_codec *codec, 522static int aic32x4_set_bias_level(struct snd_soc_codec *codec,
527 enum snd_soc_bias_level level) 523 enum snd_soc_bias_level level)
528{ 524{
529 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec);
530
531 switch (level) { 525 switch (level) {
532 case SND_SOC_BIAS_ON: 526 case SND_SOC_BIAS_ON:
533 if (aic32x4->master) { 527 /* Switch on PLL */
534 /* Switch on PLL */ 528 snd_soc_update_bits(codec, AIC32X4_PLLPR,
535 snd_soc_update_bits(codec, AIC32X4_PLLPR, 529 AIC32X4_PLLEN, AIC32X4_PLLEN);
536 AIC32X4_PLLEN, AIC32X4_PLLEN); 530
537 531 /* Switch on NDAC Divider */
538 /* Switch on NDAC Divider */ 532 snd_soc_update_bits(codec, AIC32X4_NDAC,
539 snd_soc_update_bits(codec, AIC32X4_NDAC, 533 AIC32X4_NDACEN, AIC32X4_NDACEN);
540 AIC32X4_NDACEN, AIC32X4_NDACEN); 534
541 535 /* Switch on MDAC Divider */
542 /* Switch on MDAC Divider */ 536 snd_soc_update_bits(codec, AIC32X4_MDAC,
543 snd_soc_update_bits(codec, AIC32X4_MDAC, 537 AIC32X4_MDACEN, AIC32X4_MDACEN);
544 AIC32X4_MDACEN, AIC32X4_MDACEN); 538
545 539 /* Switch on NADC Divider */
546 /* Switch on NADC Divider */ 540 snd_soc_update_bits(codec, AIC32X4_NADC,
547 snd_soc_update_bits(codec, AIC32X4_NADC, 541 AIC32X4_NADCEN, AIC32X4_NADCEN);
548 AIC32X4_NADCEN, AIC32X4_NADCEN); 542
549 543 /* Switch on MADC Divider */
550 /* Switch on MADC Divider */ 544 snd_soc_update_bits(codec, AIC32X4_MADC,
551 snd_soc_update_bits(codec, AIC32X4_MADC, 545 AIC32X4_MADCEN, AIC32X4_MADCEN);
552 AIC32X4_MADCEN, AIC32X4_MADCEN); 546
553 547 /* Switch on BCLK_N Divider */
554 /* Switch on BCLK_N Divider */ 548 snd_soc_update_bits(codec, AIC32X4_BCLKN,
555 snd_soc_update_bits(codec, AIC32X4_BCLKN, 549 AIC32X4_BCLKEN, AIC32X4_BCLKEN);
556 AIC32X4_BCLKEN, AIC32X4_BCLKEN);
557 }
558 break; 550 break;
559 case SND_SOC_BIAS_PREPARE: 551 case SND_SOC_BIAS_PREPARE:
560 break; 552 break;
561 case SND_SOC_BIAS_STANDBY: 553 case SND_SOC_BIAS_STANDBY:
562 if (aic32x4->master) { 554 /* Switch off PLL */
563 /* Switch off PLL */ 555 snd_soc_update_bits(codec, AIC32X4_PLLPR,
564 snd_soc_update_bits(codec, AIC32X4_PLLPR, 556 AIC32X4_PLLEN, 0);
565 AIC32X4_PLLEN, 0); 557
566 558 /* Switch off NDAC Divider */
567 /* Switch off NDAC Divider */ 559 snd_soc_update_bits(codec, AIC32X4_NDAC,
568 snd_soc_update_bits(codec, AIC32X4_NDAC, 560 AIC32X4_NDACEN, 0);
569 AIC32X4_NDACEN, 0); 561
570 562 /* Switch off MDAC Divider */
571 /* Switch off MDAC Divider */ 563 snd_soc_update_bits(codec, AIC32X4_MDAC,
572 snd_soc_update_bits(codec, AIC32X4_MDAC, 564 AIC32X4_MDACEN, 0);
573 AIC32X4_MDACEN, 0); 565
574 566 /* Switch off NADC Divider */
575 /* Switch off NADC Divider */ 567 snd_soc_update_bits(codec, AIC32X4_NADC,
576 snd_soc_update_bits(codec, AIC32X4_NADC, 568 AIC32X4_NADCEN, 0);
577 AIC32X4_NADCEN, 0); 569
578 570 /* Switch off MADC Divider */
579 /* Switch off MADC Divider */ 571 snd_soc_update_bits(codec, AIC32X4_MADC,
580 snd_soc_update_bits(codec, AIC32X4_MADC, 572 AIC32X4_MADCEN, 0);
581 AIC32X4_MADCEN, 0); 573
582 574 /* Switch off BCLK_N Divider */
583 /* Switch off BCLK_N Divider */ 575 snd_soc_update_bits(codec, AIC32X4_BCLKN,
584 snd_soc_update_bits(codec, AIC32X4_BCLKN, 576 AIC32X4_BCLKEN, 0);
585 AIC32X4_BCLKEN, 0);
586 }
587 break; 577 break;
588 case SND_SOC_BIAS_OFF: 578 case SND_SOC_BIAS_OFF:
589 break; 579 break;
@@ -651,9 +641,11 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
651 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) { 641 if (aic32x4->power_cfg & AIC32X4_PWR_AVDD_DVDD_WEAK_DISABLE) {
652 snd_soc_write(codec, AIC32X4_PWRCFG, AIC32X4_AVDDWEAKDISABLE); 642 snd_soc_write(codec, AIC32X4_PWRCFG, AIC32X4_AVDDWEAKDISABLE);
653 } 643 }
654 if (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) { 644
655 snd_soc_write(codec, AIC32X4_LDOCTL, AIC32X4_LDOCTLEN); 645 tmp_reg = (aic32x4->power_cfg & AIC32X4_PWR_AIC32X4_LDO_ENABLE) ?
656 } 646 AIC32X4_LDOCTLEN : 0;
647 snd_soc_write(codec, AIC32X4_LDOCTL, tmp_reg);
648
657 tmp_reg = snd_soc_read(codec, AIC32X4_CMMODE); 649 tmp_reg = snd_soc_read(codec, AIC32X4_CMMODE);
658 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) { 650 if (aic32x4->power_cfg & AIC32X4_PWR_CMMODE_LDOIN_RANGE_18_36) {
659 tmp_reg |= AIC32X4_LDOIN_18_36; 651 tmp_reg |= AIC32X4_LDOIN_18_36;
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index c2880907fce..a75c3766aed 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -733,8 +733,9 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
733 struct wm2000_priv *wm2000; 733 struct wm2000_priv *wm2000;
734 struct wm2000_platform_data *pdata; 734 struct wm2000_platform_data *pdata;
735 const char *filename; 735 const char *filename;
736 const struct firmware *fw; 736 const struct firmware *fw = NULL;
737 int reg, ret; 737 int ret;
738 int reg;
738 u16 id; 739 u16 id;
739 740
740 wm2000 = devm_kzalloc(&i2c->dev, sizeof(struct wm2000_priv), 741 wm2000 = devm_kzalloc(&i2c->dev, sizeof(struct wm2000_priv),
@@ -751,7 +752,7 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
751 ret = PTR_ERR(wm2000->regmap); 752 ret = PTR_ERR(wm2000->regmap);
752 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", 753 dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
753 ret); 754 ret);
754 goto err; 755 goto out;
755 } 756 }
756 757
757 /* Verify that this is a WM2000 */ 758 /* Verify that this is a WM2000 */
@@ -763,7 +764,7 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
763 if (id != 0x2000) { 764 if (id != 0x2000) {
764 dev_err(&i2c->dev, "Device is not a WM2000 - ID %x\n", id); 765 dev_err(&i2c->dev, "Device is not a WM2000 - ID %x\n", id);
765 ret = -ENODEV; 766 ret = -ENODEV;
766 goto err_regmap; 767 goto out_regmap_exit;
767 } 768 }
768 769
769 reg = wm2000_read(i2c, WM2000_REG_REVISON); 770 reg = wm2000_read(i2c, WM2000_REG_REVISON);
@@ -782,7 +783,7 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
782 ret = request_firmware(&fw, filename, &i2c->dev); 783 ret = request_firmware(&fw, filename, &i2c->dev);
783 if (ret != 0) { 784 if (ret != 0) {
784 dev_err(&i2c->dev, "Failed to acquire ANC data: %d\n", ret); 785 dev_err(&i2c->dev, "Failed to acquire ANC data: %d\n", ret);
785 goto err_regmap; 786 goto out_regmap_exit;
786 } 787 }
787 788
788 /* Pre-cook the concatenation of the register address onto the image */ 789 /* Pre-cook the concatenation of the register address onto the image */
@@ -793,15 +794,13 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
793 if (wm2000->anc_download == NULL) { 794 if (wm2000->anc_download == NULL) {
794 dev_err(&i2c->dev, "Out of memory\n"); 795 dev_err(&i2c->dev, "Out of memory\n");
795 ret = -ENOMEM; 796 ret = -ENOMEM;
796 goto err_fw; 797 goto out_regmap_exit;
797 } 798 }
798 799
799 wm2000->anc_download[0] = 0x80; 800 wm2000->anc_download[0] = 0x80;
800 wm2000->anc_download[1] = 0x00; 801 wm2000->anc_download[1] = 0x00;
801 memcpy(wm2000->anc_download + 2, fw->data, fw->size); 802 memcpy(wm2000->anc_download + 2, fw->data, fw->size);
802 803
803 release_firmware(fw);
804
805 wm2000->anc_eng_ena = 1; 804 wm2000->anc_eng_ena = 1;
806 wm2000->anc_active = 1; 805 wm2000->anc_active = 1;
807 wm2000->spk_ena = 1; 806 wm2000->spk_ena = 1;
@@ -809,18 +808,14 @@ static int __devinit wm2000_i2c_probe(struct i2c_client *i2c,
809 808
810 wm2000_reset(wm2000); 809 wm2000_reset(wm2000);
811 810
812 ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm2000, 811 ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm2000, NULL, 0);
813 NULL, 0); 812 if (!ret)
814 if (ret != 0) 813 goto out;
815 goto err_fw;
816 814
817 return 0; 815out_regmap_exit:
818
819err_fw:
820 release_firmware(fw);
821err_regmap:
822 regmap_exit(wm2000->regmap); 816 regmap_exit(wm2000->regmap);
823err: 817out:
818 release_firmware(fw);
824 return ret; 819 return ret;
825} 820}
826 821
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 8b24323d6b2..66f0611e68b 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -1377,6 +1377,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
1377 1377
1378 switch (wm5100->rev) { 1378 switch (wm5100->rev) {
1379 case 0: 1379 case 0:
1380 regcache_cache_bypass(wm5100->regmap, true);
1380 snd_soc_write(codec, 0x11, 0x3); 1381 snd_soc_write(codec, 0x11, 0x3);
1381 snd_soc_write(codec, 0x203, 0xc); 1382 snd_soc_write(codec, 0x203, 0xc);
1382 snd_soc_write(codec, 0x206, 0); 1383 snd_soc_write(codec, 0x206, 0);
@@ -1392,6 +1393,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
1392 snd_soc_write(codec, 1393 snd_soc_write(codec,
1393 wm5100_reva_patches[i].reg, 1394 wm5100_reva_patches[i].reg,
1394 wm5100_reva_patches[i].val); 1395 wm5100_reva_patches[i].val);
1396 regcache_cache_bypass(wm5100->regmap, false);
1395 break; 1397 break;
1396 default: 1398 default:
1397 break; 1399 break;
@@ -1402,6 +1404,7 @@ static int wm5100_set_bias_level(struct snd_soc_codec *codec,
1402 break; 1404 break;
1403 1405
1404 case SND_SOC_BIAS_OFF: 1406 case SND_SOC_BIAS_OFF:
1407 regcache_cache_only(wm5100->regmap, true);
1405 if (wm5100->pdata.ldo_ena) 1408 if (wm5100->pdata.ldo_ena)
1406 gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0); 1409 gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
1407 regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies), 1410 regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index 8d4ea43d40a..40ac888faf3 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -55,7 +55,7 @@ static int wm8958_dsp2_fw(struct snd_soc_codec *codec, const char *name,
55 return 0; 55 return 0;
56 56
57 if (fw->size < 32) { 57 if (fw->size < 32) {
58 dev_err(codec->dev, "%s: firmware too short (%d bytes)\n", 58 dev_err(codec->dev, "%s: firmware too short (%zd bytes)\n",
59 name, fw->size); 59 name, fw->size);
60 goto err; 60 goto err;
61 } 61 }
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index d8da10fe5b5..13aa2bdaa7d 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -1120,7 +1120,8 @@ SND_SOC_DAPM_SUPPLY_S("SYSCLK", 1, WM8996_AIF_CLOCKING_1, 0, 0, NULL, 0),
1120SND_SOC_DAPM_SUPPLY_S("SYSDSPCLK", 2, WM8996_CLOCKING_1, 1, 0, NULL, 0), 1120SND_SOC_DAPM_SUPPLY_S("SYSDSPCLK", 2, WM8996_CLOCKING_1, 1, 0, NULL, 0),
1121SND_SOC_DAPM_SUPPLY_S("AIFCLK", 2, WM8996_CLOCKING_1, 2, 0, NULL, 0), 1121SND_SOC_DAPM_SUPPLY_S("AIFCLK", 2, WM8996_CLOCKING_1, 2, 0, NULL, 0),
1122SND_SOC_DAPM_SUPPLY_S("Charge Pump", 2, WM8996_CHARGE_PUMP_1, 15, 0, cp_event, 1122SND_SOC_DAPM_SUPPLY_S("Charge Pump", 2, WM8996_CHARGE_PUMP_1, 15, 0, cp_event,
1123 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 1123 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
1124 SND_SOC_DAPM_POST_PMD),
1124SND_SOC_DAPM_SUPPLY("Bandgap", SND_SOC_NOPM, 0, 0, bg_event, 1125SND_SOC_DAPM_SUPPLY("Bandgap", SND_SOC_NOPM, 0, 0, bg_event,
1125 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), 1126 SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),
1126SND_SOC_DAPM_SUPPLY("LDO2", WM8996_POWER_MANAGEMENT_2, 1, 0, NULL, 0), 1127SND_SOC_DAPM_SUPPLY("LDO2", WM8996_POWER_MANAGEMENT_2, 1, 0, NULL, 0),
@@ -2007,6 +2008,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai,
2007 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); 2008 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
2008 int lfclk = 0; 2009 int lfclk = 0;
2009 int ratediv = 0; 2010 int ratediv = 0;
2011 int sync = WM8996_REG_SYNC;
2010 int src; 2012 int src;
2011 int old; 2013 int old;
2012 2014
@@ -2051,6 +2053,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai,
2051 case 32000: 2053 case 32000:
2052 case 32768: 2054 case 32768:
2053 lfclk = WM8996_LFCLK_ENA; 2055 lfclk = WM8996_LFCLK_ENA;
2056 sync = 0;
2054 break; 2057 break;
2055 default: 2058 default:
2056 dev_warn(codec->dev, "Unsupported clock rate %dHz\n", 2059 dev_warn(codec->dev, "Unsupported clock rate %dHz\n",
@@ -2064,6 +2067,8 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai,
2064 WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK, 2067 WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK,
2065 src << WM8996_SYSCLK_SRC_SHIFT | ratediv); 2068 src << WM8996_SYSCLK_SRC_SHIFT | ratediv);
2066 snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk); 2069 snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk);
2070 snd_soc_update_bits(codec, WM8996_CONTROL_INTERFACE_1,
2071 WM8996_REG_SYNC, sync);
2067 snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1, 2072 snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1,
2068 WM8996_SYSCLK_ENA, old); 2073 WM8996_SYSCLK_ENA, old);
2069 2074
diff --git a/sound/soc/codecs/wm8996.h b/sound/soc/codecs/wm8996.h
index 0fde643194c..de9ac3e44ae 100644
--- a/sound/soc/codecs/wm8996.h
+++ b/sound/soc/codecs/wm8996.h
@@ -1567,6 +1567,10 @@ int wm8996_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
1567/* 1567/*
1568 * R257 (0x101) - Control Interface (1) 1568 * R257 (0x101) - Control Interface (1)
1569 */ 1569 */
1570#define WM8996_REG_SYNC 0x8000 /* REG_SYNC */
1571#define WM8996_REG_SYNC_MASK 0x8000 /* REG_SYNC */
1572#define WM8996_REG_SYNC_SHIFT 15 /* REG_SYNC */
1573#define WM8996_REG_SYNC_WIDTH 1 /* REG_SYNC */
1570#define WM8996_AUTO_INC 0x0004 /* AUTO_INC */ 1574#define WM8996_AUTO_INC 0x0004 /* AUTO_INC */
1571#define WM8996_AUTO_INC_MASK 0x0004 /* AUTO_INC */ 1575#define WM8996_AUTO_INC_MASK 0x0004 /* AUTO_INC */
1572#define WM8996_AUTO_INC_SHIFT 2 /* AUTO_INC */ 1576#define WM8996_AUTO_INC_SHIFT 2 /* AUTO_INC */