diff options
-rw-r--r-- | sound/soc/codecs/tlv320dac33.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 082e9d51963f..90c361ef598f 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -587,6 +587,9 @@ static const struct snd_soc_dapm_widget dac33_dapm_widgets[] = { | |||
587 | SND_SOC_DAPM_SUPPLY("Right DAC Power", | 587 | SND_SOC_DAPM_SUPPLY("Right DAC Power", |
588 | DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0), | 588 | DAC33_RDAC_PWR_CTRL, 2, 0, NULL, 0), |
589 | 589 | ||
590 | SND_SOC_DAPM_SUPPLY("Codec Power", | ||
591 | DAC33_PWR_CTRL, 4, 0, NULL, 0), | ||
592 | |||
590 | SND_SOC_DAPM_PRE("Pre Playback", dac33_playback_event), | 593 | SND_SOC_DAPM_PRE("Pre Playback", dac33_playback_event), |
591 | SND_SOC_DAPM_POST("Post Playback", dac33_playback_event), | 594 | SND_SOC_DAPM_POST("Post Playback", dac33_playback_event), |
592 | }; | 595 | }; |
@@ -619,6 +622,9 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
619 | /* output */ | 622 | /* output */ |
620 | {"LEFT_LO", NULL, "Output Left Amplifier"}, | 623 | {"LEFT_LO", NULL, "Output Left Amplifier"}, |
621 | {"RIGHT_LO", NULL, "Output Right Amplifier"}, | 624 | {"RIGHT_LO", NULL, "Output Right Amplifier"}, |
625 | |||
626 | {"LEFT_LO", NULL, "Codec Power"}, | ||
627 | {"RIGHT_LO", NULL, "Codec Power"}, | ||
622 | }; | 628 | }; |
623 | 629 | ||
624 | static int dac33_add_widgets(struct snd_soc_codec *codec) | 630 | static int dac33_add_widgets(struct snd_soc_codec *codec) |
@@ -636,13 +642,10 @@ static int dac33_add_widgets(struct snd_soc_codec *codec) | |||
636 | static int dac33_set_bias_level(struct snd_soc_codec *codec, | 642 | static int dac33_set_bias_level(struct snd_soc_codec *codec, |
637 | enum snd_soc_bias_level level) | 643 | enum snd_soc_bias_level level) |
638 | { | 644 | { |
639 | struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); | ||
640 | int ret; | 645 | int ret; |
641 | 646 | ||
642 | switch (level) { | 647 | switch (level) { |
643 | case SND_SOC_BIAS_ON: | 648 | case SND_SOC_BIAS_ON: |
644 | if (!dac33->substream) | ||
645 | dac33_soft_power(codec, 1); | ||
646 | break; | 649 | break; |
647 | case SND_SOC_BIAS_PREPARE: | 650 | case SND_SOC_BIAS_PREPARE: |
648 | break; | 651 | break; |
@@ -943,8 +946,8 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) | |||
943 | /* Write registers 0x08 and 0x09 (MSB, LSB) */ | 946 | /* Write registers 0x08 and 0x09 (MSB, LSB) */ |
944 | dac33_write16(codec, DAC33_INT_OSC_FREQ_RAT_A, oscset); | 947 | dac33_write16(codec, DAC33_INT_OSC_FREQ_RAT_A, oscset); |
945 | 948 | ||
946 | /* calib time: 128 is a nice number ;) */ | 949 | /* OSC calibration time */ |
947 | dac33_write(codec, DAC33_CALIB_TIME, 128); | 950 | dac33_write(codec, DAC33_CALIB_TIME, 96); |
948 | 951 | ||
949 | /* adjustment treshold & step */ | 952 | /* adjustment treshold & step */ |
950 | dac33_write(codec, DAC33_INT_OSC_CTRL_B, DAC33_ADJTHRSHLD(2) | | 953 | dac33_write(codec, DAC33_INT_OSC_CTRL_B, DAC33_ADJTHRSHLD(2) | |