summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/adau17x1.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-19 20:29:05 +0300
committerMark Brown <broonie@kernel.org>2014-11-20 12:55:34 +0300
commitd48b088e3ec45eeccf0fce0b75378e41428f47e9 (patch)
tree2a81e6d82c6aeeaf35620938f4079d290748b4bf /sound/soc/codecs/adau17x1.h
parent6b25730f68073ee95079d241ea6aa7be00805254 (diff)
downloadlinux-d48b088e3ec45eeccf0fce0b75378e41428f47e9.tar.xz
ASoC: sigmadsp: Restructure in preparation for fw v2 support
The v2 file format of the SigmaDSP takes a more declarative style compared to the imperative style of the v1 format. In addition some features that are supported with v2 require the driver to keep state around for the firmware. This requires a bit of restructuring of both the firmware loader itself and the drivers making use of the firmware loader. Instead of loading and executing the firmware in place when the DSP is configured the firmware is now loaded at driver probe time. This is required since the new firmware format will in addition to the firmware data itself contain meta information describing the firmware and its requirements and capabilities. Those will for example be used to restrict the supported samplerates advertised by the driver to userspace to the list of samplerates supported for the firmware. This only does the restructuring required by the v2 format, but does not yet add support for the new format itself. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/adau17x1.h')
-rw-r--r--sound/soc/codecs/adau17x1.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/codecs/adau17x1.h b/sound/soc/codecs/adau17x1.h
index e4a557fd7155..6861aa3aec02 100644
--- a/sound/soc/codecs/adau17x1.h
+++ b/sound/soc/codecs/adau17x1.h
@@ -4,6 +4,8 @@
#include <linux/regmap.h>
#include <linux/platform_data/adau17x1.h>
+#include "sigmadsp.h"
+
enum adau17x1_type {
ADAU1361,
ADAU1761,
@@ -42,12 +44,14 @@ struct adau {
bool dsp_bypass[2];
struct regmap *regmap;
+ struct sigmadsp *sigmadsp;
};
int adau17x1_add_widgets(struct snd_soc_codec *codec);
int adau17x1_add_routes(struct snd_soc_codec *codec);
int adau17x1_probe(struct device *dev, struct regmap *regmap,
- enum adau17x1_type type, void (*switch_mode)(struct device *dev));
+ enum adau17x1_type type, void (*switch_mode)(struct device *dev),
+ const char *firmware_name);
int adau17x1_set_micbias_voltage(struct snd_soc_codec *codec,
enum adau17x1_micbias_voltage micbias);
bool adau17x1_readable_register(struct device *dev, unsigned int reg);
@@ -56,8 +60,7 @@ int adau17x1_resume(struct snd_soc_codec *codec);
extern const struct snd_soc_dai_ops adau17x1_dai_ops;
-int adau17x1_load_firmware(struct adau *adau, struct device *dev,
- const char *firmware);
+int adau17x1_setup_firmware(struct adau *adau, unsigned int rate);
bool adau17x1_has_dsp(struct adau *adau);
#define ADAU17X1_CLOCK_CONTROL 0x4000