From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Cc: Shengjiu Wang <shengjiu.wang@freescale.com>,
Lars-Peter Clausen <lars@metafoo.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Markus Pargmann <mpa@pengutronix.de>,
Michael Trimarchi <michael@amarulasolutions.com>,
Fabio Estevam <festevam@gmail.com>,
Shawn Guo <shawn.guo@freescale.com>
Subject: Re: No sound captured with SGTL5000 on i.MX6 in I²S master mode
Date: Thu, 18 Sep 2014 10:05:24 -0700 [thread overview]
Message-ID: <20140918170524.GA6080@Asurada> (raw)
In-Reply-To: <CAL8zT=igU9F=MZ0dQSgqgkq-T=PV-jbXAZeYAaMDs1ot_1MjCg@mail.gmail.com>
On Thu, Sep 18, 2014 at 06:09:50PM +0200, Jean-Michel Hautbois wrote:
> Well, audmux is not getting clock, this is normal I think, the clock I
> was mentionning is the MCLK of SGTL5000 and this one is linked to
> FPGA, but found after all.
> I now had a further look into sound/soc/fsl/fsl_ssi.c and I see this :
>
> sprop = of_get_property(np, "fsl,mode", NULL);
> if (sprop) {
> if (!strcmp(sprop, "ac97-slave"))
> ssi_private->dai_fmt = SND_SOC_DAIFMT_AC97;
> else if (!strcmp(sprop, "i2s-slave"))
> ssi_private->dai_fmt = SND_SOC_DAIFMT_I2S |
> SND_SOC_DAIFMT_CBM_CFM;
> }
>
> I may have missed something, but it seems that i2s-master is not
> parsed, and does not set dai_fmt ?
Actually this is kind of obsolete property because initially the SSI
driver only supported i2s-slave. We've put an i2s-slave check here is
to limit the driver by excluding other modes.
But now, the driver has the capability to derive clock from CCM and
output it for external CODEC. So this one could be dropped in fact
rather than adding a new i2s-master case IMO.
> arecord -v -V stereo -f cd -D hw:0,0 somefile.wav
> Recording WAVE 'somefile.wav' : Signed 16 bit Little Endian, Rate
> 44100 Hz, Stereo
> arecord: pcm_read:2031: read error: Input/output error
The problem here should be the AUDMUX configuration issue. The imx-
sgtl5000.c driver only supports CODEC in master mode. So if you try
to switch the CODEC slave mode, you shall also change not only the
CBM_CFM to CBS_CFS but also swap the ext_port and int_port of AUDMUX
(a little confusing approach here as the configuration of AUDMUX is
routing the data and clocks from a source port to a destination port
while each of side, external or internal, might be a source port --
When using CBM_CFM, the source port should be external port; while
using CBS_CFS, the source port should be the internal port.)
There may be another topic, however, actually the fsl-asoc-card
driver does handle the master/slave mode supports. So if you are
trying to add the CODEC slave mode support into imx-sgtl5000. I
suggest you to try the fsl-asoc-card instead. Its DT binding's
totally compatible with imx-sgtl5000's. What you need to do is
just enable it (and disable imx-sgtl500) in the menuconfig or
add these enable/disable into imx_v6_v7_defconfig.
Nicolin
next prev parent reply other threads:[~2014-09-18 17:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 12:56 No sound captured with SGTL5000 on i.MX6 in I²S master mode Jean-Michel Hautbois
2014-09-18 13:30 ` Fabio Estevam
2014-09-18 13:35 ` Michael Trimarchi
2014-09-18 13:45 ` Jean-Michel Hautbois
2014-09-18 13:55 ` Michael Trimarchi
2014-09-18 14:09 ` Jean-Michel Hautbois
2014-09-18 16:09 ` Jean-Michel Hautbois
2014-09-18 17:05 ` Nicolin Chen [this message]
2014-09-18 17:26 ` Michael Trimarchi
2014-09-18 17:45 ` Nicolin Chen
2014-09-18 18:03 ` Michael Trimarchi
2014-09-18 18:13 ` Nicolin Chen
2014-09-18 18:18 ` Michael Trimarchi
2014-09-18 17:28 ` Fabio Estevam
2014-09-18 17:49 ` Nicolin Chen
2014-09-18 17:58 ` Fabio Estevam
2014-09-18 18:07 ` Nicolin Chen
2014-09-18 18:14 ` Fabio Estevam
2014-09-18 18:39 ` Nicolin Chen
2014-09-18 23:35 ` Fabio Estevam
2014-09-18 23:50 ` Nicolin Chen
2014-09-19 7:42 ` Jean-Michel Hautbois
2014-09-19 7:52 ` Nicolin Chen
2014-09-19 9:18 ` Jean-Michel Hautbois
2014-09-19 12:53 ` Jean-Michel Hautbois
2014-10-09 14:02 ` Jean-Michel Hautbois
2014-10-09 14:18 ` Fabio Estevam
2014-10-09 14:26 ` Jean-Michel Hautbois
2014-10-09 15:06 ` Fabio Estevam
2014-10-09 15:14 ` Jean-Michel Hautbois
2014-10-09 15:19 ` Fabio Estevam
2014-10-10 15:49 ` Jean-Michel Hautbois
2014-10-10 15:54 ` Fabio Estevam
2014-09-22 3:26 ` Fabio Estevam
2014-09-22 3:41 ` Nicolin Chen
2014-09-18 17:19 ` Nicolin Chen
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=20140918170524.GA6080@Asurada \
--to=nicoleotsuka@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=festevam@gmail.com \
--cc=jean-michel.hautbois@vodalys.com \
--cc=lars@metafoo.de \
--cc=michael@amarulasolutions.com \
--cc=mpa@pengutronix.de \
--cc=shawn.guo@freescale.com \
--cc=shengjiu.wang@freescale.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).