Skip to contentSkip to conversation

ASoC: rt5670: Add dsp support

PATCH Superseded [email protected] 1 participant 2 messages Sep 18, 2014 – Sep 23, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt5670: Add dsp support

From: Bard Liao <[email protected]>

Add dsp part of rt5670 codec driver

---
 sound/soc/codecs/Makefile     |   2 +-
 sound/soc/codecs/rt5670-dsp.c | 383 ++++++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/rt5670-dsp.h |  10 +-
 sound/soc/codecs/rt5670.c     |  43 +++++
 sound/soc/codecs/rt5670.h     |   3 +
 5 files changed, 434 insertions(+), 7 deletions(-)
 create mode 100644 sound/soc/codecs/rt5670-dsp.c
sound/soc/codecs/Makefile +1 -1
index afba944..3e5bc33 100644
@@ -78,7 +78,7 @@ snd-soc-rt5631-objs := rt5631.o
 snd-soc-rt5640-objs := rt5640.o
 snd-soc-rt5645-objs := rt5645.o
 snd-soc-rt5651-objs := rt5651.o
-snd-soc-rt5670-objs := rt5670.o
+snd-soc-rt5670-objs := rt5670.o rt5670-dsp.o
 snd-soc-rt5677-objs := rt5677.o
 snd-soc-sgtl5000-objs := sgtl5000.o
 snd-soc-alc5623-objs := alc5623.o
sound/soc/codecs/rt5670-dsp.c new file +383 -0

383 lines not on this page · raw message

sound/soc/codecs/rt5670-dsp.h +4 -6
index a34d0cd..cd13f61 100644
@@ -43,12 +43,10 @@
 #define RT5670_DSP_I2C_AL_16		(0x1 << 1)
 #define RT5670_DSP_CMD_EN		(0x1)
 
-struct rt5670_dsp_param {
-	u16 cmd_fmt;
-	u16 addr;
-	u16 data;
-	u8 cmd;
-};
+int rt5670_dsp_write(struct snd_soc_codec *codec,
+		unsigned int addr, unsigned int data);
+unsigned int rt5670_dsp_read(
+	struct snd_soc_codec *codec, unsigned int reg);
 
 #endif /* __RT5670_DSP_H__ */
 
sound/soc/codecs/rt5670.c +43 -0

67 lines not on this page · raw message

sound/soc/codecs/rt5670.h +3 -0
index a0b5c85..5d2dea5 100644
@@ -1997,4 +1997,7 @@ struct rt5670_priv {
 	int jack_type;
 };
 
+int rt5671_write_fw(struct snd_soc_codec *codec, const struct firmware *fw,
+		    unsigned int pos, unsigned int num);
+
 #endif /* __RT5670_H__ */
Signature · 1 line
1.8.1.1.439.g50a6b54