From: "Alexandre Schnegg" <aschnegg@digger.ch>
To: alsa-devel@alsa-project.org
Subject: speaker-test error using sgtl5000 and imx27
Date: Tue, 15 Sep 2015 11:49:34 +0200 [thread overview]
Message-ID: <039601d0ef9b$d40a0460$7c1e0d20$@digger.ch> (raw)
Hello,
I would like to use the Freescale SGTl5000 audio codec with the Freescale
imx27 processor.
Unfortunately, I get this error when I try to run < speaker-test >:
# 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
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
The codec is connected to SSI2 pins and I would like to use the SSI0
internal port in asynchronous mode (4 wires). The command interface is I2C1.
The codec seems to work because it generates both bit and frame clocks (the
codec is the master) but no data are coming from the processor. I'm using
kernel 4.1.7 but I have got the same error with versions 3.19.8, 4.0.5 and
4.0.9. I have also tried the < imx-sgtl5000 > driver and I get the same
error. I can use < alsamixer > with no issue.
Here are my device tree bindings:
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "sgtl5000-audio";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master =
<&dailink0_master>;
simple-audio-card,frame-master =
<&dailink0_master>;
simple-audio-card,widgets =
"Microphone", "Mic Jack",
"Headphone", "Headphone
Jack";
simple-audio-card,routing =
"MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
simple-audio-card,cpu {
sound-dai = <&ssi1 0>;
};
dailink0_master: simple-audio-card,codec {
sound-dai = <&sgtl5000>;
clocks = <&mclk>;
};
};
mclk: asvmpc {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <12288000>;
};
&ssi1 {
#sound-dai-cells = <1>;
status = "okay";
fsl,audmux-port = <MX27_AUDMUX_PPCR2_SSI_PINS_2>;
fsl,port-config = <
(IMX_AUDMUX_V1_PCR_SYN |
IMX_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0))
>;
};
&audmux {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ssi2>;
status = "okay";
fsl,audmux-port = <MX27_AUDMUX_HPCR1_SSI0>;
fsl,port-config = <
(IMX_AUDMUX_V1_PCR_SYN |
IMX_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_PPCR2_SSI_PINS_2) |
IMX_AUDMUX_V1_PCR_TFSDIR |
IMX_AUDMUX_V1_PCR_TCLKDIR |
IMX_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_PPCR2_SSI_PINS_2))
>;
};
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
sgtl5000: sgtl5000@0a {
#sound-dai-cells = <0>;
compatible = "fsl,sgtl5000";
reg = <0x0a>;
clocks = <&mclk>;
micbias-resistor-k-ohms = <2>;
micbias-voltage-m-volts = <2250>;
VDDA-supply = <®_2p8v>;
VDDIO-supply = <®_2p8v>;
};
};
pinctrl_ssi2: ssi2grp {
fsl,pins = <
MX27_PAD_SSI2_FS__SSI2_FS 0x0
MX27_PAD_SSI2_RXDAT__SSI2_RXDAT 0x0
MX27_PAD_SSI2_TXDAT__SSI2_TXDAT 0x0
MX27_PAD_SSI2_CLK__SSI2_CLK
0x0
>;
};
And the modules I have loaded before running < speaker test > :
# modprobe snd-soc-sgtl5000
[ 23.274351] sgtl5000 0-000a: sgtl5000 revision 0x11
# modprobe snd-soc-simple-card
# modprobe snd-soc-fsl-ssi
[ 79.752288] sgtl5000 0-000a: Using internal LDO instead of VDDD
# [ 79.853711] asoc-simple-card sound: sgtl5000 <-> 10010000.ssi mapping
ok
# modprobe snd-soc-imx-audmux
Does anybody know what is the mistake?
Thank you for your help.
Best regards.
Alexandre Schnegg
next reply other threads:[~2015-09-15 9:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 9:49 Alexandre Schnegg [this message]
2015-09-29 14:26 ` speaker-test error using sgtl5000 and imx27 Alexandre Schnegg
2015-09-29 16:11 ` Fabio Estevam
2015-09-29 18:22 ` gianluca
2015-09-30 6:28 ` Alexandre Schnegg
2015-09-30 6:48 ` Alexandre Schnegg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='039601d0ef9b$d40a0460$7c1e0d20$@digger.ch' \
--to=aschnegg@digger.ch \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).