mirror of https://gitee.com/openkylin/linux.git
Merge branch 'for-2.6.38' into for-2.6.39
This commit is contained in:
commit
866fd9366a
|
@ -1664,6 +1664,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_add_routes);
|
||||||
int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
|
int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
|
||||||
{
|
{
|
||||||
struct snd_soc_dapm_widget *w;
|
struct snd_soc_dapm_widget *w;
|
||||||
|
unsigned int val;
|
||||||
|
|
||||||
list_for_each_entry(w, &dapm->card->widgets, list)
|
list_for_each_entry(w, &dapm->card->widgets, list)
|
||||||
{
|
{
|
||||||
|
@ -1712,6 +1713,18 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
|
||||||
case snd_soc_dapm_post:
|
case snd_soc_dapm_post:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Read the initial power state from the device */
|
||||||
|
if (w->reg >= 0) {
|
||||||
|
val = snd_soc_read(w->codec, w->reg);
|
||||||
|
val &= 1 << w->shift;
|
||||||
|
if (w->invert)
|
||||||
|
val = !val;
|
||||||
|
|
||||||
|
if (val)
|
||||||
|
w->power = 1;
|
||||||
|
}
|
||||||
|
|
||||||
w->new = 1;
|
w->new = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue