diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-06-06 14:09:17 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-06-06 15:09:45 +0200 |
commit | 6b10998d74398ec8745d54dfdcbcc1eb445a2f9f (patch) | |
tree | dd5c7294e60a377f43f60b771143282281845801 /sound/soc/codecs/sigmadsp.h | |
parent | ASoC: free jack GPIOs before the sound card is freed (diff) | |
download | linux-6b10998d74398ec8745d54dfdcbcc1eb445a2f9f.tar.xz linux-6b10998d74398ec8745d54dfdcbcc1eb445a2f9f.zip |
ASoC: sigmadsp: Split regmap and I2C support into separate modules
When the SigmaDSP module is built-in, but the I2C core is build as a module
we'll get a undefined reference:
sound/built-in.o: In function `sigma_action_write_i2c':
:(.text+0x5d8d4): undefined reference to `i2c_master_send'
This can happen if a audio driver that is using the regmap SigmaDSP interface is
built into the kernel, but core I2C support is build as a module. To fix this
split the SigmaDSP module into three modules, one module providing the core
infrastructure and two small modules implementing the regmap and I2C interfaces.
This allows e.g. the core infrastructure and regmap support to be built into the
kernel while I2C support can still be build as a module.
Fixes: dab464b60 ("ASoC: Add ADAU1361/ADAU1761 audio CODEC support")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/sigmadsp.h')
-rw-r--r-- | sound/soc/codecs/sigmadsp.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/codecs/sigmadsp.h b/sound/soc/codecs/sigmadsp.h index e439cbd7af7d..c47cd23e9827 100644 --- a/sound/soc/codecs/sigmadsp.h +++ b/sound/soc/codecs/sigmadsp.h @@ -12,6 +12,26 @@ #include <linux/device.h> #include <linux/regmap.h> +struct sigma_action { + u8 instr; + u8 len_hi; + __le16 len; + __be16 addr; + unsigned char payload[]; +} __packed; + +struct sigma_firmware { + const struct firmware *fw; + size_t pos; + + void *control_data; + int (*write)(void *control_data, const struct sigma_action *sa, + size_t len); +}; + +int _process_sigma_firmware(struct device *dev, + struct sigma_firmware *ssfw, const char *name); + struct i2c_client; extern int process_sigma_firmware(struct i2c_client *client, const char *name); |