2013-11-20 14:25:02 +08:00
|
|
|
Simple-Card:
|
|
|
|
|
2014-03-24 18:15:25 +08:00
|
|
|
Simple-Card specifies audio DAI connections of SoC <-> codec.
|
2013-11-20 14:25:02 +08:00
|
|
|
|
|
|
|
Required properties:
|
|
|
|
|
|
|
|
- compatible : "simple-audio-card"
|
|
|
|
|
|
|
|
Optional properties:
|
|
|
|
|
2014-02-08 15:59:55 +08:00
|
|
|
- simple-audio-card,name : User specified audio sound card name, one string
|
|
|
|
property.
|
|
|
|
- simple-audio-card,widgets : Please refer to widgets.txt.
|
2014-01-07 09:15:16 +08:00
|
|
|
- simple-audio-card,routing : A list of the connections between audio components.
|
2013-12-23 12:57:01 +08:00
|
|
|
Each entry is a pair of strings, the first being the
|
|
|
|
connection's sink, the second being the connection's
|
|
|
|
source.
|
2014-05-22 23:31:49 +08:00
|
|
|
- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
|
2015-06-05 16:19:05 +08:00
|
|
|
mclk. When defined, mclk-fs property defined in
|
|
|
|
dai-link sub nodes are ignored.
|
2014-10-04 01:06:08 +08:00
|
|
|
- simple-audio-card,hp-det-gpio : Reference to GPIO that signals when
|
2014-10-02 05:25:20 +08:00
|
|
|
headphones are attached.
|
2014-10-04 01:06:08 +08:00
|
|
|
- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
|
2014-10-02 05:25:20 +08:00
|
|
|
a microphone is attached.
|
2016-09-26 17:56:51 +08:00
|
|
|
- simple-audio-card,aux-devs : List of phandles pointing to auxiliary devices, such
|
|
|
|
as amplifiers, to be added to the sound card.
|
2014-05-22 23:31:49 +08:00
|
|
|
|
2014-03-24 18:15:25 +08:00
|
|
|
Optional subnodes:
|
|
|
|
|
|
|
|
- simple-audio-card,dai-link : Container for dai-link level
|
|
|
|
properties and the CPU and CODEC
|
|
|
|
sub-nodes. This container may be
|
|
|
|
omitted when the card has only one
|
|
|
|
DAI link. See the examples and the
|
2016-07-14 02:08:07 +08:00
|
|
|
section below.
|
2014-03-24 18:15:25 +08:00
|
|
|
|
|
|
|
Dai-link subnode properties and subnodes:
|
|
|
|
|
|
|
|
If dai-link subnode is omitted and the subnode properties are directly
|
|
|
|
under "sound"-node the subnode property and subnode names have to be
|
|
|
|
prefixed with "simple-audio-card,"-prefix.
|
2013-12-23 12:57:01 +08:00
|
|
|
|
2014-03-24 18:15:25 +08:00
|
|
|
Required dai-link subnodes:
|
2013-11-20 14:25:02 +08:00
|
|
|
|
2014-03-24 18:15:25 +08:00
|
|
|
- cpu : CPU sub-node
|
|
|
|
- codec : CODEC sub-node
|
2014-03-20 18:04:16 +08:00
|
|
|
|
2014-03-24 18:15:25 +08:00
|
|
|
Optional dai-link subnode properties:
|
|
|
|
|
|
|
|
- format : CPU/CODEC common audio format.
|
|
|
|
"i2s", "right_j", "left_j" , "dsp_a"
|
|
|
|
"dsp_b", "ac97", "pdm", "msb", "lsb"
|
|
|
|
- frame-master : Indicates dai-link frame master.
|
|
|
|
phandle to a cpu or codec subnode.
|
|
|
|
- bitclock-master : Indicates dai-link bit clock master.
|
|
|
|
phandle to a cpu or codec subnode.
|
|
|
|
- bitclock-inversion : bool property. Add this if the
|
|
|
|
dai-link uses bit clock inversion.
|
|
|
|
- frame-inversion : bool property. Add this if the
|
|
|
|
dai-link uses frame clock inversion.
|
2015-06-05 16:19:05 +08:00
|
|
|
- mclk-fs : Multiplication factor between stream
|
|
|
|
rate and codec mclk, applied only for
|
|
|
|
the dai-link.
|
2014-03-24 18:15:25 +08:00
|
|
|
|
|
|
|
For backward compatibility the frame-master and bitclock-master
|
|
|
|
properties can be used as booleans in codec subnode to indicate if the
|
|
|
|
codec is the dai-link frame or bit clock master. In this case there
|
|
|
|
should be no dai-link node, the same properties should not be present
|
|
|
|
at sound-node level, and the bitclock-inversion and frame-inversion
|
|
|
|
properties should also be placed in the codec node if needed.
|
2013-11-20 14:25:02 +08:00
|
|
|
|
|
|
|
Required CPU/CODEC subnodes properties:
|
|
|
|
|
|
|
|
- sound-dai : phandle and port of CPU/CODEC
|
|
|
|
|
|
|
|
Optional CPU/CODEC subnodes properties:
|
|
|
|
|
2014-03-24 18:15:25 +08:00
|
|
|
- dai-tdm-slot-num : Please refer to tdm-slot.txt.
|
|
|
|
- dai-tdm-slot-width : Please refer to tdm-slot.txt.
|
2013-11-20 14:25:02 +08:00
|
|
|
- clocks / system-clock-frequency : specify subnode's clock if needed.
|
|
|
|
it can be specified via "clocks" if system has
|
|
|
|
clock node (= common clock), or "system-clock-frequency"
|
|
|
|
(if system doens't support common clock)
|
2015-01-14 03:16:34 +08:00
|
|
|
If a clock is specified, it is
|
|
|
|
enabled with clk_prepare_enable()
|
|
|
|
in dai startup() and disabled with
|
|
|
|
clk_disable_unprepare() in dai
|
|
|
|
shutdown().
|
2017-08-17 19:42:36 +08:00
|
|
|
- system-clock-direction-out : specifies clock direction as 'out' on
|
|
|
|
initialization. It is useful for some aCPUs with
|
|
|
|
fixed clocks.
|
2013-11-20 14:25:02 +08:00
|
|
|
|
2014-03-20 18:04:16 +08:00
|
|
|
Example 1 - single DAI link:
|
2013-11-20 14:25:02 +08:00
|
|
|
|
|
|
|
sound {
|
|
|
|
compatible = "simple-audio-card";
|
2014-02-08 15:59:55 +08:00
|
|
|
simple-audio-card,name = "VF610-Tower-Sound-Card";
|
2013-11-20 14:25:02 +08:00
|
|
|
simple-audio-card,format = "left_j";
|
2014-03-24 18:15:25 +08:00
|
|
|
simple-audio-card,bitclock-master = <&dailink0_master>;
|
|
|
|
simple-audio-card,frame-master = <&dailink0_master>;
|
2014-02-08 15:59:55 +08:00
|
|
|
simple-audio-card,widgets =
|
|
|
|
"Microphone", "Microphone Jack",
|
|
|
|
"Headphone", "Headphone Jack",
|
|
|
|
"Speaker", "External Speaker";
|
2014-01-10 13:17:27 +08:00
|
|
|
simple-audio-card,routing =
|
2014-02-08 15:59:55 +08:00
|
|
|
"MIC_IN", "Microphone Jack",
|
2013-12-23 12:57:01 +08:00
|
|
|
"Headphone Jack", "HP_OUT",
|
2014-02-08 15:59:55 +08:00
|
|
|
"External Speaker", "LINE_OUT";
|
2013-11-20 14:25:02 +08:00
|
|
|
|
|
|
|
simple-audio-card,cpu {
|
|
|
|
sound-dai = <&sh_fsi2 0>;
|
|
|
|
};
|
|
|
|
|
2014-03-24 18:15:25 +08:00
|
|
|
dailink0_master: simple-audio-card,codec {
|
2013-11-20 14:25:02 +08:00
|
|
|
sound-dai = <&ak4648>;
|
|
|
|
clocks = <&osc>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
&i2c0 {
|
|
|
|
ak4648: ak4648@12 {
|
|
|
|
#sound-dai-cells = <0>;
|
|
|
|
compatible = "asahi-kasei,ak4648";
|
|
|
|
reg = <0x12>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
sh_fsi2: sh_fsi2@ec230000 {
|
|
|
|
#sound-dai-cells = <1>;
|
|
|
|
compatible = "renesas,sh_fsi2";
|
|
|
|
reg = <0xec230000 0x400>;
|
|
|
|
interrupt-parent = <&gic>;
|
|
|
|
interrupts = <0 146 0x4>;
|
|
|
|
};
|
2014-03-20 18:04:16 +08:00
|
|
|
|
|
|
|
Example 2 - many DAI links:
|
|
|
|
|
|
|
|
sound {
|
|
|
|
compatible = "simple-audio-card";
|
|
|
|
simple-audio-card,name = "Cubox Audio";
|
|
|
|
|
|
|
|
simple-audio-card,dai-link@0 { /* I2S - HDMI */
|
2014-03-24 18:15:25 +08:00
|
|
|
format = "i2s";
|
|
|
|
cpu {
|
2014-03-20 18:04:16 +08:00
|
|
|
sound-dai = <&audio1 0>;
|
|
|
|
};
|
2014-03-24 18:15:25 +08:00
|
|
|
codec {
|
2014-03-20 18:04:16 +08:00
|
|
|
sound-dai = <&tda998x 0>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
|
2014-03-24 18:15:25 +08:00
|
|
|
cpu {
|
2014-03-20 18:04:16 +08:00
|
|
|
sound-dai = <&audio1 1>;
|
|
|
|
};
|
2014-03-24 18:15:25 +08:00
|
|
|
codec {
|
2014-03-20 18:04:16 +08:00
|
|
|
sound-dai = <&tda998x 1>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
|
2014-03-24 18:15:25 +08:00
|
|
|
cpu {
|
2014-03-20 18:04:16 +08:00
|
|
|
sound-dai = <&audio1 1>;
|
|
|
|
};
|
2014-03-24 18:15:25 +08:00
|
|
|
codec {
|
2014-03-20 18:04:16 +08:00
|
|
|
sound-dai = <&spdif_codec>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2016-09-26 17:56:51 +08:00
|
|
|
|
|
|
|
Example 3 - route audio from IMX6 SSI2 through TLV320DAC3100 codec
|
|
|
|
through TPA6130A2 amplifier to headphones:
|
|
|
|
|
|
|
|
&i2c0 {
|
|
|
|
codec: tlv320dac3100@18 {
|
|
|
|
compatible = "ti,tlv320dac3100";
|
|
|
|
...
|
|
|
|
}
|
|
|
|
|
|
|
|
amp: tpa6130a2@60 {
|
|
|
|
compatible = "ti,tpa6130a2";
|
|
|
|
...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sound {
|
|
|
|
compatible = "simple-audio-card";
|
|
|
|
...
|
|
|
|
simple-audio-card,widgets =
|
|
|
|
"Headphone", "Headphone Jack";
|
|
|
|
simple-audio-card,routing =
|
|
|
|
"Headphone Jack", "HPLEFT",
|
|
|
|
"Headphone Jack", "HPRIGHT",
|
|
|
|
"LEFTIN", "HPL",
|
|
|
|
"RIGHTIN", "HPR";
|
|
|
|
simple-audio-card,aux-devs = <&>;
|
|
|
|
simple-audio-card,cpu {
|
|
|
|
sound-dai = <&ssi2>;
|
|
|
|
};
|
|
|
|
simple-audio-card,codec {
|
|
|
|
sound-dai = <&codec>;
|
|
|
|
clocks = ...
|
|
|
|
};
|
|
|
|
};
|