diff options
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
| -rw-r--r-- | sound/soc/codecs/wm_adsp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index fbd0515c49d7..1c12c78dbcce 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
| @@ -2650,7 +2650,10 @@ int wm_adsp2_preloader_get(struct snd_kcontrol *kcontrol, | |||
| 2650 | struct snd_ctl_elem_value *ucontrol) | 2650 | struct snd_ctl_elem_value *ucontrol) |
| 2651 | { | 2651 | { |
| 2652 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); | 2652 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); |
| 2653 | struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); | 2653 | struct wm_adsp *dsps = snd_soc_component_get_drvdata(component); |
| 2654 | struct soc_mixer_control *mc = | ||
| 2655 | (struct soc_mixer_control *)kcontrol->private_value; | ||
| 2656 | struct wm_adsp *dsp = &dsps[mc->shift - 1]; | ||
| 2654 | 2657 | ||
| 2655 | ucontrol->value.integer.value[0] = dsp->preloaded; | 2658 | ucontrol->value.integer.value[0] = dsp->preloaded; |
| 2656 | 2659 | ||
| @@ -2662,10 +2665,11 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, | |||
| 2662 | struct snd_ctl_elem_value *ucontrol) | 2665 | struct snd_ctl_elem_value *ucontrol) |
| 2663 | { | 2666 | { |
| 2664 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); | 2667 | struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); |
| 2665 | struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); | 2668 | struct wm_adsp *dsps = snd_soc_component_get_drvdata(component); |
| 2666 | struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); | 2669 | struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); |
| 2667 | struct soc_mixer_control *mc = | 2670 | struct soc_mixer_control *mc = |
| 2668 | (struct soc_mixer_control *)kcontrol->private_value; | 2671 | (struct soc_mixer_control *)kcontrol->private_value; |
| 2672 | struct wm_adsp *dsp = &dsps[mc->shift - 1]; | ||
| 2669 | char preload[32]; | 2673 | char preload[32]; |
| 2670 | 2674 | ||
| 2671 | snprintf(preload, ARRAY_SIZE(preload), "DSP%u Preload", mc->shift); | 2675 | snprintf(preload, ARRAY_SIZE(preload), "DSP%u Preload", mc->shift); |
| @@ -2679,6 +2683,8 @@ int wm_adsp2_preloader_put(struct snd_kcontrol *kcontrol, | |||
| 2679 | 2683 | ||
| 2680 | snd_soc_dapm_sync(dapm); | 2684 | snd_soc_dapm_sync(dapm); |
| 2681 | 2685 | ||
| 2686 | flush_work(&dsp->boot_work); | ||
| 2687 | |||
| 2682 | return 0; | 2688 | return 0; |
| 2683 | } | 2689 | } |
| 2684 | EXPORT_SYMBOL_GPL(wm_adsp2_preloader_put); | 2690 | EXPORT_SYMBOL_GPL(wm_adsp2_preloader_put); |
