Skip to content

Commit

Permalink
Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/broonie/sound into for-linus

The only particularly remarkable change here is the one for handling of
the Android suspend ignore code for idle_bias_off CODECs.  That one is
actually a regression fix as some of the new power savings that have
been introduced confused the suspend ignore code, making devices that
are active for non-audio reasons look like they are idle causing them to
be suspended instead of being kept active.
  • Loading branch information
tiwai committed Feb 7, 2012
2 parents eedec3d + 43b6cec commit cfd0d11
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion sound/soc/codecs/cs42l73.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ static int cs42l73_pcm_hw_params(struct snd_pcm_substream *substream,
priv->config[id].mmcc &= 0xC0;
priv->config[id].mmcc |= cs42l73_mclk_coeffs[mclk_coeff].mmcc;
priv->config[id].spc &= 0xFC;
priv->config[id].spc &= MCK_SCLK_64FS;
priv->config[id].spc |= MCK_SCLK_MCLK;
} else {
/* CS42L73 Slave */
priv->config[id].spc &= 0xFC;
Expand Down
6 changes: 3 additions & 3 deletions sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -3159,13 +3159,13 @@ static int wm8962_hw_params(struct snd_pcm_substream *substream,
case SNDRV_PCM_FORMAT_S16_LE:
break;
case SNDRV_PCM_FORMAT_S20_3LE:
aif0 |= 0x40;
aif0 |= 0x4;
break;
case SNDRV_PCM_FORMAT_S24_LE:
aif0 |= 0x80;
aif0 |= 0x8;
break;
case SNDRV_PCM_FORMAT_S32_LE:
aif0 |= 0xc0;
aif0 |= 0xc;
break;
default:
return -EINVAL;
Expand Down
5 changes: 0 additions & 5 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -2753,11 +2753,6 @@ static int wm8994_resume(struct snd_soc_codec *codec)
codec->cache_only = 0;
}

/* Restore the registers */
ret = snd_soc_cache_sync(codec);
if (ret != 0)
dev_err(codec->dev, "Failed to sync cache: %d\n", ret);

wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) {
Expand Down
8 changes: 4 additions & 4 deletions sound/soc/codecs/wm_hubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ SOC_DAPM_SINGLE("Left Output Switch", WM8993_LINE_MIXER1, 0, 1, 0),
};

static const struct snd_kcontrol_new line2_mix[] = {
SOC_DAPM_SINGLE("IN2R Switch", WM8993_LINE_MIXER2, 2, 1, 0),
SOC_DAPM_SINGLE("IN2L Switch", WM8993_LINE_MIXER2, 1, 1, 0),
SOC_DAPM_SINGLE("IN1L Switch", WM8993_LINE_MIXER2, 2, 1, 0),
SOC_DAPM_SINGLE("IN1R Switch", WM8993_LINE_MIXER2, 1, 1, 0),
SOC_DAPM_SINGLE("Output Switch", WM8993_LINE_MIXER2, 0, 1, 0),
};

Expand Down Expand Up @@ -848,8 +848,8 @@ static const struct snd_soc_dapm_route lineout1_se_routes[] = {
};

static const struct snd_soc_dapm_route lineout2_diff_routes[] = {
{ "LINEOUT2 Mixer", "IN2L Switch", "IN2L PGA" },
{ "LINEOUT2 Mixer", "IN2R Switch", "IN2R PGA" },
{ "LINEOUT2 Mixer", "IN1L Switch", "IN1L PGA" },
{ "LINEOUT2 Mixer", "IN1R Switch", "IN1R PGA" },
{ "LINEOUT2 Mixer", "Output Switch", "Right Output PGA" },

{ "LINEOUT2N Driver", NULL, "LINEOUT2 Mixer" },
Expand Down
11 changes: 11 additions & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,17 @@ int snd_soc_suspend(struct device *dev)
if (!codec->suspended && codec->driver->suspend) {
switch (codec->dapm.bias_level) {
case SND_SOC_BIAS_STANDBY:
/*
* If the CODEC is capable of idle
* bias off then being in STANDBY
* means it's doing something,
* otherwise fall through.
*/
if (codec->dapm.idle_bias_off) {
dev_dbg(codec->dev,
"idle_bias_off CODEC on over suspend\n");
break;
}
case SND_SOC_BIAS_OFF:
codec->driver->suspend(codec);
codec->suspended = 1;
Expand Down

0 comments on commit cfd0d11

Please sign in to comment.