projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'v4.4/topic/mm-kaslr-pax_usercopy' into linux-linaro-lsk-v4.4
[firefly-linux-kernel-4.4.55.git]
/
sound
/
soc
/
soc-dapm.c
diff --git
a/sound/soc/soc-dapm.c
b/sound/soc/soc-dapm.c
index 7d009428934acab676ca34a1d17dfa4e1af83f25..b8a256dfed7eb74c56791ee9e56b235590ae0f51 100644
(file)
--- a/
sound/soc/soc-dapm.c
+++ b/
sound/soc/soc-dapm.c
@@
-823,6
+823,7
@@
static int dapm_create_or_share_kcontrol(struct snd_soc_dapm_widget *w,
case snd_soc_dapm_switch:
case snd_soc_dapm_mixer:
case snd_soc_dapm_pga:
case snd_soc_dapm_switch:
case snd_soc_dapm_mixer:
case snd_soc_dapm_pga:
+ case snd_soc_dapm_out_drv:
wname_in_long_name = true;
kcname_in_long_name = true;
break;
wname_in_long_name = true;
kcname_in_long_name = true;
break;
@@
-2188,6
+2189,13
@@
static ssize_t dapm_widget_show_component(struct snd_soc_component *cmpnt,
int count = 0;
char *state = "not set";
int count = 0;
char *state = "not set";
+ /* card won't be set for the dummy component, as a spot fix
+ * we're checking for that case specifically here but in future
+ * we will ensure that the dummy component looks like others.
+ */
+ if (!cmpnt->card)
+ return 0;
+
list_for_each_entry(w, &cmpnt->card->widgets, list) {
if (w->dapm != dapm)
continue;
list_for_each_entry(w, &cmpnt->card->widgets, list) {
if (w->dapm != dapm)
continue;
@@
-3008,6
+3016,9
@@
int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol,
}
mutex_unlock(&card->dapm_mutex);
}
mutex_unlock(&card->dapm_mutex);
+ if (ret)
+ return ret;
+
if (invert)
ucontrol->value.integer.value[0] = max - val;
else
if (invert)
ucontrol->value.integer.value[0] = max - val;
else
@@
-3159,7
+3170,7
@@
int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
if (e->shift_l != e->shift_r) {
if (item[1] > e->items)
return -EINVAL;
if (e->shift_l != e->shift_r) {
if (item[1] > e->items)
return -EINVAL;
- val |= snd_soc_enum_item_to_val(e, item[1]) << e->shift_
l
;
+ val |= snd_soc_enum_item_to_val(e, item[1]) << e->shift_
r
;
mask |= e->mask << e->shift_r;
}
mask |= e->mask << e->shift_r;
}
@@
-3568,7
+3579,7
@@
static int snd_soc_dapm_dai_link_get(struct snd_kcontrol *kcontrol,
{
struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol);
{
struct snd_soc_dapm_widget *w = snd_kcontrol_chip(kcontrol);
- ucontrol->value.
integer.value
[0] = w->params_select;
+ ucontrol->value.
enumerated.item
[0] = w->params_select;
return 0;
}
return 0;
}
@@
-3582,13
+3593,13
@@
static int snd_soc_dapm_dai_link_put(struct snd_kcontrol *kcontrol,
if (w->power)
return -EBUSY;
if (w->power)
return -EBUSY;
- if (ucontrol->value.
integer.value
[0] == w->params_select)
+ if (ucontrol->value.
enumerated.item
[0] == w->params_select)
return 0;
return 0;
- if (ucontrol->value.
integer.value
[0] >= w->num_params)
+ if (ucontrol->value.
enumerated.item
[0] >= w->num_params)
return -EINVAL;
return -EINVAL;
- w->params_select = ucontrol->value.
integer.value
[0];
+ w->params_select = ucontrol->value.
enumerated.item
[0];
return 0;
}
return 0;
}