diff options
Diffstat (limited to 'sound/soc/codecs/tlv320aic23.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 35606ae60868..a9dc5fb54774 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -265,8 +265,8 @@ static const int bosr_usb_divisor_table[] = { | |||
265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) | 265 | #define UPPER_GROUP ((1<<8) | (1<<9) | (1<<10) | (1<<11) | (1<<15)) |
266 | static const unsigned short sr_valid_mask[] = { | 266 | static const unsigned short sr_valid_mask[] = { |
267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ | 267 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 0*/ |
268 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
269 | LOWER_GROUP, /* Usb, bosr - 0*/ | 268 | LOWER_GROUP, /* Usb, bosr - 0*/ |
269 | LOWER_GROUP|UPPER_GROUP, /* Normal, bosr - 1*/ | ||
270 | UPPER_GROUP, /* Usb, bosr - 1*/ | 270 | UPPER_GROUP, /* Usb, bosr - 1*/ |
271 | }; | 271 | }; |
272 | /* | 272 | /* |
@@ -395,7 +395,6 @@ static int tlv320aic23_add_widgets(struct snd_soc_codec *codec) | |||
395 | /* set up audio path interconnects */ | 395 | /* set up audio path interconnects */ |
396 | snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); | 396 | snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); |
397 | 397 | ||
398 | snd_soc_dapm_new_widgets(codec); | ||
399 | return 0; | 398 | return 0; |
400 | } | 399 | } |
401 | 400 | ||
@@ -625,11 +624,10 @@ static int tlv320aic23_resume(struct platform_device *pdev) | |||
625 | { | 624 | { |
626 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 625 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
627 | struct snd_soc_codec *codec = socdev->card->codec; | 626 | struct snd_soc_codec *codec = socdev->card->codec; |
628 | int i; | ||
629 | u16 reg; | 627 | u16 reg; |
630 | 628 | ||
631 | /* Sync reg_cache with the hardware */ | 629 | /* Sync reg_cache with the hardware */ |
632 | for (reg = 0; reg < ARRAY_SIZE(tlv320aic23_reg); i++) { | 630 | for (reg = 0; reg < TLV320AIC23_RESET; reg++) { |
633 | u16 val = tlv320aic23_read_reg_cache(codec, reg); | 631 | u16 val = tlv320aic23_read_reg_cache(codec, reg); |
634 | tlv320aic23_write(codec, reg, val); | 632 | tlv320aic23_write(codec, reg, val); |
635 | } | 633 | } |
@@ -707,17 +705,9 @@ static int tlv320aic23_init(struct snd_soc_device *socdev) | |||
707 | snd_soc_add_controls(codec, tlv320aic23_snd_controls, | 705 | snd_soc_add_controls(codec, tlv320aic23_snd_controls, |
708 | ARRAY_SIZE(tlv320aic23_snd_controls)); | 706 | ARRAY_SIZE(tlv320aic23_snd_controls)); |
709 | tlv320aic23_add_widgets(codec); | 707 | tlv320aic23_add_widgets(codec); |
710 | ret = snd_soc_init_card(socdev); | ||
711 | if (ret < 0) { | ||
712 | printk(KERN_ERR "tlv320aic23: failed to register card\n"); | ||
713 | goto card_err; | ||
714 | } | ||
715 | 708 | ||
716 | return ret; | 709 | return ret; |
717 | 710 | ||
718 | card_err: | ||
719 | snd_soc_free_pcms(socdev); | ||
720 | snd_soc_dapm_free(socdev); | ||
721 | pcm_err: | 711 | pcm_err: |
722 | kfree(codec->reg_cache); | 712 | kfree(codec->reg_cache); |
723 | return ret; | 713 | return ret; |