And a different dts that is closer to the example given:
sound {
compatible = "simple-audio-card";
simple-audio-card,model = "wm8731-audio";
mux-int-port = <2>;
mux-ext-port = <4>;
simple-audio-card,format = "i2s";
simple-audio-card,cpu {
sound-dai = <&ssi2>;
master-clkdir-out;
frame-master;
bitclock-master;
};
simple-audio-card,codec {
frame-master;
bitclock-master;
sound-dai = <&codec>;
};
};
/* i2c3 */
&i2c3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
***@50 {
compatible = "at24,24c02";
reg = <0x50>;
pagesize = <16>;
};
codec: ***@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8731";
reg = <0x1a>;
AVDD-supply = <®_3p3v>;
HPVDD-supply = <®_3p3v>;
DCVDD-supply = <®_3p3v>;
DBVDD-supply = <®_3p3v>;
clocks = <&clks IMX6QDL_CLK_SSI2>;
};
};
&ssi2 {
fsl,mode = "i2s-master";
status = "okay";
#sound-dai-cells = <0>;
};
Gives me this output:
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: imxspdif [imx-spdif], device 0: S/PDIF PCM snd-soc-dummy-dai-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: D202c000ssiwm87 [202c000.ssi-wm8731-hifi], device 0:
202c000.ssi-wm8731-hifi wm8731-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
[***@localhost ~]# speaker-test -D hw:1
speaker-test 1.0.28
Playback device is hw:1
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 32768
Period size range from 64 to 16384
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
0 - Front Left
Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error
Post by Jonathan BennettPost by Fabio EstevamHi Jonathan,
Post by Jonathan BennettHey, I'm working with a compulab utilite, trying to get everything
working
Post by Jonathan Bennettwith 3.17, with the eventual goal of getting better support for it
upstream. Currently fighting the sound. It's a imx6q talking to a wm8731
over i2c/i2s.
I am booting Fedora 21 arm Alpha, with my own dtb (
http://pastebin.com/4a4PBKwx) and driver (http://pastebin.com/1CsesuVV)
is wm8731 audio functional with the 3.10.17 kernel com compulab?
The audio works on their pre-canned ubuntu image, which runs 3.10.
Post by Jonathan BennettIt shows up in aplay -l, but trying to play anything to it gives me a
div
Post by Jonathan Bennettby 0 in a driver: [<c04f27e4>] (Ldiv0) from [<bf50512c>]
(fsl_ssi_hw_params+0x194/0x364 [snd_soc_fsl_ssi]) This div0 happens in
sound/soc/fsl/fsl_ssi.c, in the function fsl_ssi_set_bclk.
My driver file is an almost direct copy of what compulab shipped with a
3.10 kernel. This is my first attempt at kernel hacking, so any help
would
I would suggest as a first step to get the dts for compulab upstreamed.
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/204896.html
After the basic dts file is added then you can work on adding audio support.
There is already a small dts file upstreamed. It barely works. I've been
get usb and the second ethernet port working, which I would like to get
pushed upstream. I was hoping to have more of it working before then,
though.
Post by Fabio Estevam- The dts from 3.10.17 can not be applied 'as-is' into 3.17. Take a
sound {
compatible = "fsl,imx6q-cm-fx6-wm8731",
"fsl,imx-audio-wm8731";
model = "wm8731-audio";
ssi-controller = <&ssi2>;
src-port = <2>;
ext-port = <4>;
audio-codec = <&codec>;
audio-routing = "LOUT", "ROUT", "LLINEIN", "RLINEIN";
};
'src-port' and 'ext-port' are not valid properties.
mux-int-port = <2>;
mux-ext-port = <4>;
Take a look at arch/arm/boot/dts/imx6qdl-sabresd.dtsi for a reference.
Also the codec clocks that are passed into the dts are not correct.
The wm8731 does not acquire any clocks in the mainline driver.
You should also try to use the 'simple-audio-card' binding instead of
creating the imx-wm8731 machine file.
Here is a reference of the arch/arm/boot/dts/vf610-twr.dts where you
can see simple-audio-card in use.
I am trying to use simple-audio-card, without any success. I've been
hammering at this for a couple days now. My current dts looks like
sound {
compatible = "simple-audio-card";
simple-audio-card,model = "wm8731-audio";
mux-int-port = <2>;
mux-ext-port = <4>;
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,cpu {
sound-dai = <&ssi2>;
};
simple-audio-card,codec {
sound-dai = <&codec>;
};
};
....
/* i2c3 */
&i2c3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
compatible = "at24,24c02";
reg = <0x50>;
pagesize = <16>;
};
#sound-dai-cells = <0>;
compatible = "wlf,wm8731";
reg = <0x1a>;
AVDD-supply = <®_3p3v>;
HPVDD-supply = <®_3p3v>;
DCVDD-supply = <®_3p3v>;
DBVDD-supply = <®_3p3v>;
};
};
...
&ssi2 {
fsl,mode = "i2s-master";
status = "okay";
#sound-dai-cells = <0>;
};
# aplay -l
**** List of PLAYBACK Hardware Devices ****
202c000.ssi-wm8731-hifi wm8731-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
# speaker-test
speaker-test 1.0.28
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ASoC: machine hw_params failed: -22
000Hz)
Buffer size range from 128 to 32768
Period size range from 64 to 16384
Using max buffer size 32768
Periods = 4
Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument
It's a wm8731 hanging off an i2c bus from an i.mx6q chip. Seems like
exactly what simple-audio-card is designed for. I imagine that there is
something simple that I am overlooking, but I'm at a loss to find it.
Post by Fabio EstevamGood luck!
Regards,
Fabio Estevam
Thanks for the help!
~Jonathan Bennett