1
0
Fork 0
Commit Graph

4 Commits (redonkable)

Author SHA1 Message Date
Dragos Tarcatu 95a32c9805
ASoC: SOF: control: return true when kcontrol values change
All the kcontrol put() functions are currently returning 0 when
successful. This does not go well with alsamixer as it does
not seem to get notified on SND_CTL_EVENT_MASK_VALUE callbacks
when values change for (some of) the sof kcontrols.
This patch fixes that by returning true for volume, switch
and enum type kcontrols when values do change in put().

Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191018123806.18063-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-18 18:09:22 +01:00
Bard Liao 0c888baba8
ASoC: SOF: dont wake dsp up in kcontrol IO
Always get kcontrol value from cache, set kcontrol value to DSP
when DSP is active. Kcontrol values will be restored when DSP boot up.
We will set the default value of kcontrol in sof_complete to make sure
the value is align with firmware.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-13 19:56:07 +01:00
Keyon Jie 5661ad9490
ASoC: SOF: control: correct the copy size for bytes kcontrol put
The size for the bytes kcontrol should include the abi header, that is,
data->size + sizeof(*data), it is also aligned with get method after
this change.

Fixes: c3078f5397 ("ASoC: SOF: Add Sound Open Firmware KControl support")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-28 15:48:27 +01:00
Liam Girdwood c3078f5397
ASoC: SOF: Add Sound Open Firmware KControl support
SOF exposes regular ALSA Kcontrols that are defined by topology. This
patch converts the Kcontrol IO to DSP IPC.

The current implementation is aligned with previous Intel solutions,
but is not optimal and can be improved:
a) for every get/put the host wakes up the DSP and generates an
IPC. The kernel should cache the values and generate an IPC only when
strictly necessary.
b) the firmware can be implemented to only instantiate the pipelines
and related control-related parts that are needed at a given time, and
power-gate the relevant SRAM blocks.

The development tasks for these two improvements has started, once
validated they will be provided in an update.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-28 02:47:50 +09:00