ASoC: omap-abe-twl6040: Add device tree support
Subsystems (3)
PATCH RESEND 1/1 ASoC: omap-abe-twl6040: Add device tree support
When the board boots with device tree the driver will receive the name of the card, DAPM routing map, phandle for the audio components described in the dts file, mclk speed, and the possibility of detecting the jack detection.
The card will be set up based on this information.
Since the routing is provided via DT we can mark the card fully routed so core can take care of disconnecting the unused pins.
---
Hello,
This is the v3 of the DT support patch rebased on latest ASoC: needed to be fixed because of this commit (cpu_dai_of_node renamed to cpu_of_node):
bc92657 ASoC: make snd_soc_dai_link more symmetrical
Could you queue this for 3.6?
Thank you,
Peter
.../devicetree/bindings/sound/omap-abe-twl6040.txt | 91 ++++++++++++ sound/soc/omap/omap-abe-twl6040.c | 145 ++++++++++++++++---- 2 files changed, 206 insertions(+), 30 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt
Documentation/devicetree/bindings/sound/omap-abe-twl6040.txt new file +91 -0
@@ -0,0 +1,91 @@ +* Texas Instruments OMAP4+ and twl6040 based audio setups + +Required properties: +- compatible: "ti,abe-twl6040" +- ti,model: Name of the sound card ( for example "SDP4430") +- ti,mclk-freq: MCLK frequency for HPPLL operation +- ti,mcpdm: phandle for the McPDM node +- ti,twl6040: phandle for the twl6040 core node +- ti,audio-routing: List of connections between audio components. + Each entry is a pair of strings, the first being the connection's sink, + the second being the connection's source. + +Optional properties: +- ti,dmic: phandle for the OMAP dmic node if the machine have it connected +- ti,jack_detection: Need to be set to <1> if the board capable to detect jack + insertion, removal. + +Available audio endpoints for the audio-routing table: + +Board connectors: + * Headset Stereophone + * Earphone Spk + * Ext Spk + * Line Out + * Vibrator + * Headset Mic + * Main Handset Mic + * Sub Handset Mic + * Line In + * Digital Mic + +twl6040 pins: + * HSOL + * HSOR + * EP + * HFL + * HFR + * AUXL + * AUXR + * VIBRAL + * VIBRAR + * HSMIC + * MAINMIC + * SUBMIC + * AFML + * AFMR + + * Headset Mic Bias + * Main Mic Bias + * Digital Mic1 Bias + * Digital Mic2 Bias + +Digital mic pins: + * DMic + +Example: + +sound { + compatible = "ti,abe-twl6040"; + ti,model = "SDP4430"; + + ti,jack-detection = <1>; + ti,mclk-freq = <38400000>; + + ti,mcpdm = <&mcpdm>; + ti,dmic = <&dmic>; + + ti,twl6040 = <&twl6040>; + + /* Audio routing */ + ti,audio-routing = + "Headset Stereophone", "HSOL", + "Headset Stereophone", "HSOR", + "Earphone Spk", "EP", + "Ext Spk", "HFL", + "Ext Spk", "HFR", + "Line Out", "AUXL", + "Line Out", "AUXR", + "Vibrator", "VIBRAL", + "Vibrator", "VIBRAR", + "HSMIC", "Headset Mic", + "Headset Mic", "Headset Mic Bias", + "MAINMIC", "Main Handset Mic", + "Main Handset Mic", "Main Mic Bias", + "SUBMIC", "Sub Handset Mic", + "Sub Handset Mic", "Main Mic Bias", + "AFML", "Line In", + "AFMR", "Line In", + "DMic", "Digital Mic", + "Digital Mic", "Digital Mic1 Bias"; +};
sound/soc/omap/omap-abe-twl6040.c +115 -30
219 lines not on this page · raw message
Signature · 1 line
1.7.8.6
Quoted 1 line · Peter Ujfalusi
Could you queue this for 3.6?
We're already in the merge window...
Quoted 5 lines · Mark Brown
Quoted 1 line · Peter Ujfalusi
Could you queue this for 3.6?
We're already in the merge window...
Yes, I'm aware of that.
I have sent the v3 on 6.6.2012 to the list [1].
I just noticed that on my working branch after I have rebased it on mainline the omap-abe-twl6040 was not compiling (due to the cpu_dai_of_node rename to cpu_of_node). I wanted to send a quick fix for this when I realized that the DT support for the machine driver is not taken.
[1]
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-June/052495.html
Signature · 1 line
Péter
Quoted 10 lines · Peter Ujfalusi
Quoted 1 line · Mark Brown
We're already in the merge window...
Yes, I'm aware of that.
I have sent the v3 on 6.6.2012 to the list [1].
I just noticed that on my working branch after I have rebased it on mainline the omap-abe-twl6040 was not compiling (due to thecpu_dai_of_noderename tocpu_of_node). I wanted to send a quick fix for this when I realized that the DT support for the machine driver is not taken.
Please just send the build fix with a followup adding the DT bindings and then we can get the DT bindings in for 3.7. It's unfortunate that Liam's been so busy and things like this got dropped on the floor but I'm not enthusiastic adding something like this after the pull request went to Linus.
Though obviously it's not even been compiled in mainline :/
In general you need to really start paying attention to this stuff and start chasing around -rc5 or so.
Quoted 2 lines · Mark Brown
Please just send the build fix with a followup adding the DT bindings and then we can get the DT bindings in for 3.7.
We do not have build breakage as of now since the DT bindings are not in. The build breakage happened on my local tree when I have rebased it on mainline yesterday. Stephen can not update the DT part of the omap-abe-twl6040 when he did the snd_soc_dai_link cleanup, obviously.
The patch has been updated to compile cleanly on top of current mainline. I could have prefixed it as v4 but the change compared to the previous was small.
Quoted 4 lines
It's unfortunate that
Liam's been so busy and things like this got dropped on the floor but I'm not enthusiastic adding something like this after the pull request went to Linus.
Yes, I understand your hesitation. On the other hand the patches to enable audio via DT for the dts files has been merged and present in mainline already (omap4-sdp/panda/pandaES).
Quoted 1 line
Though obviously it's not even been compiled in mainline :/
Sure it has not been compiled in mainline. It was/is compiled on top of mainline during my daily work.
Quoted 2 lines
In general you need to really start paying attention to this stuff and start chasing around -rc5 or so.
I know, I should have...
Signature · 1 line
Péter
Quoted 9 lines · Peter Ujfalusi
Quoted 2 lines · Mark Brown
Please just send the build fix with a followup adding the DT bindings and then we can get the DT bindings in for 3.7.
We do not have build breakage as of now since the DT bindings are not in. The build breakage happened on my local tree when I have rebased it on mainline yesterday. Stephen can not update the DT part of the omap-abe-twl6040 when he did the
snd_soc_dai_linkcleanup, obviously.
Ah, sorry - I misread what you were saying and thought that there was a build break in the current code.
Quoted 4 lines
Quoted 1 line
Though obviously it's not even been compiled in mainline :/
Sure it has not been compiled in mainline. It was/is compiled on top of mainline during my daily work.
Right, that was me thinking there was a build break with the currently merged code.
Mark Brown
AppliedQuoted 3 lines · Peter Ujfalusi
When the board boots with device tree the driver will receive the name of the card, DAPM routing map, phandle for the audio components described in the dts file, mclk speed, and the possibility of detecting the jack detection.
Applied, thanks (for 3.7).