From: "Emmanuel Fusté" <emmanuel.fuste@laposte.net>
To: alsa-devel@alsa-project.org
Cc: peter.ujfalusi@ti.com
Subject: simple-audio-card and external dynamic clock
Date: Mon, 4 Apr 2016 23:56:16 +0200 [thread overview]
Message-ID: <5702E300.8060101@laposte.net> (raw)
In-Reply-To: <56F46168.7040201@laposte.net>
Le 24/03/2016 22:51, Emmanuel Fusté a écrit :
> Hello,
>
> I m very new to ASoC (and not native english speaker) so be indulgent ;-)
> The context : am335x-boneblack.
> I want to drive simple I2S targets. With the ongoing developments, and
> recent patches posted here, this is a very simple job for the
> simple-audio-card machine driver even with fixed external master clock.
> I want to go further using a programmable external clock (si570) which
> is not very complicated thanks to the CCF.
> But now I want to use the dynamic nature of this external master clock
> (through CCF) to be able to generate 44.1khz AND 48 multiples of fs
> which is not natively possible on the BBB because of integer fs
> scaling only and/or no dedicated audio PLL.
> I know that the same could be achieved on the BBB with switching
> between internal clock (24mhz) and external one (24.576mhz) gated by
> GPIO1_27, but this is another story.
>
> Which direction is the right one ?
> - dedicated machine driver ?
> - or something more generic / reusable implemented in the
> simple-audio-card drivers through helpers routines ?
> - or something else ?
>
Ok,
I did a little bit of homework and mailing list digging.
If I understand the "problem" correctly, here we are:
- ASoc is now completely CCF aware
- McASP driver is not, but it is not a real problem in most use cases
when we omit the possibilities offered by AHCLKX or if we use a static
AHCLKX configuration.
My use case needs two different level of ccf work on the McASP driver:
First, a "basic" conversion to CCF to be able to use simple-audio-card,
choosing the used clock (AHCLKX or AUXCLK) with the
assigned-clocks/assigned-clock-parents standard DT properties as it
seems to be the way to go (February discussion about selecting system
clocks by ID ).
Next, a more advanced support for the external AHCLKX case, which could
be driven by a programmable clock (clk_set_rate available). Most use
cases would be covered by a 24mhz and 24.576mhz AHCLKX and the correct
divisors sets as need by the McASP driver.
With more complexity, arbitrary I2S rate (with arbitrary AHCLKX) or
better accuracy ( dynamic switching between internal AUXCLK @24mhz and
external fixed AHCLKX @24.576mhz) could be achieved.
And no need for a machine driver, simple-audio-card would be sufficient.
Right ?
Emmanuel.
next prev parent reply other threads:[~2016-04-04 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 21:51 simple-audio-card and external dynamic clock Emmanuel Fusté
2016-04-04 21:56 ` Emmanuel Fusté [this message]
2016-04-05 10:49 ` Peter Ujfalusi
2016-04-05 19:10 ` Emmanuel Fusté
2016-04-06 6:54 ` Peter Ujfalusi
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=5702E300.8060101@laposte.net \
--to=emmanuel.fuste@laposte.net \
--cc=alsa-devel@alsa-project.org \
--cc=peter.ujfalusi@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.