From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: Linux-ALSA <alsa-devel@alsa-project.org>
Cc: Mark Brown <broonie@kernel.org>, Mans Rullgard <mans@mansr.com>,
Takashi Iwai <tiwai@suse.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: ASoC: Using mxs-saif with simple-card
Date: Sat, 07 Jan 2017 20:30:20 +0100 [thread overview]
Message-ID: <1483817420.2227.6.camel@embedded.rocks> (raw)
Hi,
I am trying to use the simple-card framework on a custom i.MX28 board.
There are two SAIF modules (saif0 and saif1) instantiated on the cpu. A
reference for the platform driver is mxs-sgtl5000. The two cpu dais
saif0 and saif1 are connected to the audio codec sgtl5000. saif0 is
used to playback and saif1 is used to capture.
Unfortunately, I do not have a sgtl5000 codec, but a pcm5102a, a wm8524
and wm8731 to play with.
For all those codec I copied the mxs-sgtl5000 driver, e.g. mxs-
pcm5102a, mxs-wm8524, mxs-wm8731. I will refer to these drivers as mxs-
<codec> later. The only difference was in setting the mclk. That's why
I'm interested in using the simple-card driver for this platform.
With the help of Mans Rullgard I came up with these parts of the device
tree node when using the wm8731 codec:
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "hbm10-wm8731";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Microphone", "Microphone Jack",
"Line", "Line Jack";
simple-audio-card,routing =
"Headphone Jack", "RHPOUT",
"Headphone Jack", "LHPOUT",
"LLINEIN", "Line Jack",
"MICIN", "Mic Bias",
"Mic Bias", "Microphone Jack";
simple-audio-card,dai-link@0 {
format = "i2s";
bitclock-master = <&dai0_master>;
frame-master = <&dai0_master>;
mclk-fs = <256>;
dai0_master: cpu {
sound-dai = <&saif0>;
};
codec {
sound-dai = <&wm8731>;
clocks = <&saif0>;
};
};
simple-audio-card,dai-link@1 {
format = "i2s";
bitclock-master = <&dai1_master>;
frame-master = <&dai1_master>;
mclk-fs = <256>;
dai1_master: cpu {
sound-dai = <&saif1>;
};
codec {
sound-dai = <&wm8731>;
};
};
};
&saif0 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&saif0_pins_a>;
assigned-clocks = <&clks 53>;
assigned-clock-rates = <12288000>;
status = "okay";
};
&saif1 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&saif1_pins_a>;
fsl,saif-master = <&saif0>;
status = "okay";
};
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins_a>;
status = "okay";
wm8731: wm8731@1a {
#sound-dai-cells = <0>;
compatible = "wlf,wm8731";
reg = <0x1a>;
};
};
From my understanding of the simple-card framework this should connect
saif0 (cpu dai) <-> wm8731 (codec) and saif1 (cpu dai) <-> wm8731
(codec) as it is done in the probe function of the mxs-<codec> driver,
right?
However, this gives me a warning while bringing up the board:
sysfs: cannot create duplicate filename '/devices/soc0/sound/mxs-saif-
wm8731-hifi'.
Note, that the simple-card framework works fine for mxs-saif if using
only the dai0 link (playback) and leaving the dai1 link (capture).
Am I doing something wrong here?
Is it possible to map the two dai links using the current simple-card
framework?
Is anyone using the simple-card framework on mxs-saif using both
playback and capture?
Best regards,
Jörg Krause
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
reply other threads:[~2017-01-07 19:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1483817420.2227.6.camel@embedded.rocks \
--to=joerg.krause@embedded.rocks \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=mans@mansr.com \
--cc=tiwai@suse.com \
/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).