diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-19 20:29:06 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-20 12:55:34 +0300 |
commit | a35daac77a0397d4f23b642d3dc0684682e56cc5 (patch) | |
tree | 6d6bb121b1e7491b26987492a4e11ee4a67ac321 /sound/soc/codecs/sigmadsp-regmap.c | |
parent | d48b088e3ec45eeccf0fce0b75378e41428f47e9 (diff) | |
download | linux-a35daac77a0397d4f23b642d3dc0684682e56cc5.tar.xz |
ASoC: sigmadsp: Add support for fw v2
This patch adds support for the v2 version of the SigmaDSP firmware file
format. The new format has support for having different program and
parameter settings for different samplerates. In addition it stores metadata
describing the firmware. This metadata includes the set of supported
samplerates which will be used to restrict the samplerates that can be
selected by userspace. Also included is information about the modifiable
parameters. Those will be exposed as ALSA controls so they can be changed at
runtime.
The new format is based on a binary type-length-value structure that makes
it both forward and backwards compatible.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/sigmadsp-regmap.c')
-rw-r--r-- | sound/soc/codecs/sigmadsp-regmap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/sigmadsp-regmap.c b/sound/soc/codecs/sigmadsp-regmap.c index cdc5dda47b88..912861be5b87 100644 --- a/sound/soc/codecs/sigmadsp-regmap.c +++ b/sound/soc/codecs/sigmadsp-regmap.c @@ -19,6 +19,13 @@ static int sigmadsp_write_regmap(void *control_data, data, len); } +static int sigmadsp_read_regmap(void *control_data, + unsigned int addr, uint8_t data[], size_t len) +{ + return regmap_raw_read(control_data, addr, + data, len); +} + /** * devm_sigmadsp_init_i2c() - Initialize SigmaDSP instance * @dev: The parent device @@ -42,6 +49,7 @@ struct sigmadsp *devm_sigmadsp_init_regmap(struct device *dev, sigmadsp->control_data = regmap; sigmadsp->write = sigmadsp_write_regmap; + sigmadsp->read = sigmadsp_read_regmap; return sigmadsp; } |