From: Nicolin Chen <b42378@freescale.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
lars@metafoo.de, timur@tabi.org, rob.herring@calxeda.com,
broonie@kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v3 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
Date: Mon, 5 Aug 2013 19:28:05 +0800 [thread overview]
Message-ID: <20130805112804.GA6770@MrMyself> (raw)
In-Reply-To: <1375697222.4000.59.camel@pizza.hi.pengutronix.de>
Hi Philipp,
Thanks for the comments! I'll revise it and send a v4.
Here is my reply to some parts of your question.
On Mon, Aug 05, 2013 at 12:07:02PM +0200, Philipp Zabel wrote:
> This looks to me like a case of configuration data in the device tree.
> Couldn't the tx/rx clock source be determined automatically or at least
> the SoC specific clock sources to the mux be known to the driver, so
> that we can use clock phandles here?
>
> What happens if a different tx-clk-source is needed for 48 kHz than for
> 44.1 kHz?
You are right about the case. I'll try to figure out a nicer way, including
for the different sample-rate.
> Do we already have anything for this in the kernel?
> It could also be done using:
>
> u8 tmp = input;
>
> tmp = ((tmp & 0b10101010) >> 1) | ((tmp << 1) & 0b10101010);
> tmp = ((tmp & 0b11001100) >> 2) | ((tmp << 2) & 0b11001100);
> tmp = ((tmp & 0b11110000) >> 4) | ((tmp << 4) & 0b11110000);
>
> return tmp;
I was also wondering this question but I couldn't find it.
And obviously your algorithm is better :)
> In principle, it should also be possible to let the SDMA engine only
> take the FIFOs' MSBs for S16_LE. Is this a limitation of the SDMA ROM
> script?
You are right about the idea and the inference.
next prev parent reply other threads:[~2013-08-05 11:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 7:29 [PATCH v3 0/2] Add freescale S/PDIF CPU DAI and machine drivers Nicolin Chen
2013-08-05 7:29 ` [PATCH v3 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver Nicolin Chen
2013-08-05 10:07 ` Philipp Zabel
2013-08-05 11:28 ` Nicolin Chen [this message]
2013-08-05 7:29 ` [PATCH v3 2/2] ASoC: fsl: Add S/PDIF machine driver 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=20130805112804.GA6770@MrMyself \
--to=b42378@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=p.zabel@pengutronix.de \
--cc=rob.herring@calxeda.com \
--cc=timur@tabi.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).