devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: rockchip: add rockchip machine driver
@ 2015-05-12  9:26 Xing Zheng
  2015-05-12  9:26 ` [PATCH 4/4] ASoC: rockchip-audio-machine: add rockchip machine driver bindings Xing Zheng
  0 siblings, 1 reply; 2+ messages in thread
From: Xing Zheng @ 2015-05-12  9:26 UTC (permalink / raw)
  To: dgreid, dianders, heiko, sonnyrao
  Cc: linux-rockchip, zhengxing, Jaroslav Kysela, devicetree,
	alsa-devel, Mark Brown, Takashi Iwai, linux-kernel, Kumar Gala,
	Ian Campbell, Liam Girdwood, Pawel Moll, Rob Herring,
	Mark Rutland, linux-arm-kernel

From: zhengxing <zhengxing@rock-chips.com>


Hi,

These patches to add machine driver for rockchip platform.

We intended to use simple-card on the project, but it seem like that have
some issues(jack detection). We need the following features on the project,
but simple-card is temporarily unable to provide them:
1. We need dynamically recognize and select one codec from supported codecs
   in dts.
2. Simple-card don't provide to call the codec jack detection callback via dts
   description (ts3a227e_enable_jack_detect for max98090, rt5645_set_jack_detect
   for rt5645/rt5650).
3. Simple-card support simple-widght only, but codec may use cunstom the name of
   widget (rk_dapm_widgets: "Headset Mic", "Int Mic" in max98090).

Simple-card is good generic machine driver, but if we want to replace simple-card
in the exsiting work, it may bring other problems. Therefore, we want to upload
these functions that we need.



zhengxing (4):
  ASoC: rockchip: add rockchip machine driver
  ASoC: rockchip: add rockchip machine driver for max98090
  ASoC: rockchip: add rockchip machine driver for rt5650/rt5645
  ASoC: rockchip-audio-machine: add rockchip machine driver bindings

 .../sound/rockchip,rockchip-audio-machine.txt      |   38 ++++
 sound/soc/rockchip/Kconfig                         |   26 +++
 sound/soc/rockchip/Makefile                        |    9 +
 sound/soc/rockchip/rockchip_machine_driver.c       |  222 ++++++++++++++++++++
 sound/soc/rockchip/rockchip_machine_driver.h       |   41 ++++
 sound/soc/rockchip/rockchip_max98090.c             |  185 ++++++++++++++++
 sound/soc/rockchip/rockchip_rt5645.c               |  220 +++++++++++++++++++
 7 files changed, 741 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-machine.txt
 create mode 100644 sound/soc/rockchip/rockchip_machine_driver.c
 create mode 100644 sound/soc/rockchip/rockchip_machine_driver.h
 create mode 100644 sound/soc/rockchip/rockchip_max98090.c
 create mode 100644 sound/soc/rockchip/rockchip_rt5645.c

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 4/4] ASoC: rockchip-audio-machine: add rockchip machine driver bindings
  2015-05-12  9:26 [PATCH 0/4] ASoC: rockchip: add rockchip machine driver Xing Zheng
@ 2015-05-12  9:26 ` Xing Zheng
  0 siblings, 0 replies; 2+ messages in thread
From: Xing Zheng @ 2015-05-12  9:26 UTC (permalink / raw)
  To: dgreid, dianders, heiko, sonnyrao
  Cc: linux-rockchip, zhengxing, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, devicetree, linux-arm-kernel,
	linux-kernel

From: zhengxing <zhengxing@rock-chips.com>

Add documentation to the machine driver of the device-tree
bindings for the soundcard of the Rockchip board.

Signed-off-by: zhengxing <zhengxing@rock-chips.com>

---

 .../sound/rockchip,rockchip-audio-machine.txt      |   38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-machine.txt

diff --git a/Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-machine.txt b/Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-machine.txt
new file mode 100644
index 0000000..36864fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip,rockchip-audio-machine.txt
@@ -0,0 +1,38 @@
+ROCKCHIP rk3288 audio complex, with AUDIO CODEC
+
+Required properties:
+- (machine) compatible : "rockchip,rockchip-audio-machine"
+- (codec) compatible : The child node name of compatible.
+- rockchip,model : The user-visible name of this sound complex.
+
+- rockchip,i2s-controller : The phandle of the Rockchip I2S controller that's
+  connected to the CODEC.
+- rockchip,audio-codec : The phandle of the audio codec.
+- rockchip,headset-codec : The phandle of the jack detection ic.
+
+Optional properties:
+- rockchip,hp-det-gpios : The GPIO that detect headphones are plugged in
+- rockchip,mic-det-gpios : The GPIO that detect microphones are plugged in
+
+Example:
+
+sound {
+	compatible = "rockchip,rockchip-audio-machine";
+
+	/* child node */
+	sound_rtl {
+		compatible = "rockchip,rockchip-audio-rt5645";
+		rockchip,model = "I2S-RT5650";
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,audio-codec = <&rt5645>;
+	};
+
+	/* child node */
+	sound_maxim {
+		compatible = "rockchip,rockchip-audio-max98090";
+		rockchip,model = "ROCKCHIP-I2S";
+		rockchip,i2s-controller = <&i2s>;
+		rockchip,audio-codec = <&max98090>;
+		rockchip,headset-codec = <&headsetcodec>;
+	};
+};
\ No newline at end of file
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-12  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12  9:26 [PATCH 0/4] ASoC: rockchip: add rockchip machine driver Xing Zheng
2015-05-12  9:26 ` [PATCH 4/4] ASoC: rockchip-audio-machine: add rockchip machine driver bindings Xing Zheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).