All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gabriel M. Beddingfield" <gabrbedd@gmail.com>
To: "Gellner, Christoph (ADITG/SW1)" <cgellner@de.adit-jv.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: ASOC snd_soc_dai_ops for clock mux control
Date: Wed, 03 Apr 2013 22:55:05 -0700	[thread overview]
Message-ID: <515D15B9.8080608@gmail.com> (raw)
In-Reply-To: <8F928A9825EEF0458AC402C3ABF8BEB1053E0DEF@HI2EXCH01.adit-jv.com>

On 04/03/2013 09:22 AM, Gellner, Christoph (ADITG/SW1) wrote:
> Hi all,
>
> I'm working on the driver of an audio CPU DAI IP providing
> -       Internal clocks which can be used for master clock generation by TX as well as RX section
> -       One oversampling clock available to RX section
> -       One oversampling clock available to TX section.
>
> Kernel version is 3.5.7
>
> I want to add support to the CPU DAI driver to
> -       Specify the rate of the input clocks
> -       Select which of the clock inputs shall be used by RX and which shall be used by TX section
>
> I'm currently wondering how to map this to existing snd_soc_dai_ops functions.
> Currently I see only set_sysclk, set_pll, set_clkdiv for clock control.
>
> I plan to use set_sysclk to specify the rate as well as the direction of each clock.
>
> What is currently missing for me is a way to specify the clock to be used by RX or TX section.
>
> Do you have any recommendation how to implement ?


Let's say your CPU DAI IP has 3 clocks which we'll call MCLK (master 
clock), FLL1, and FLL2 (the two oversampling clocks).

Are you wanting a way to say: "RX should use FLL1 and TX should use FLL2" ??

If so, there's a couple options I can think of.  (A) You could call a 
codec-specific API in your machine driver that expresses this intent. 
(B) you could create "virtual" clock ID's that express the mapping (e.g. 
FLL1_TX, FLL1_RX, FLL2_TX, FLL2_RX).  I think (A) is a cleaner solution 
that clearly communicates what is happening.

-gabriel

  reply	other threads:[~2013-04-04  5:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 16:22 ASOC snd_soc_dai_ops for clock mux control Gellner, Christoph (ADITG/SW1)
2013-04-04  5:55 ` Gabriel M. Beddingfield [this message]
2013-04-10 13:16   ` Mark Brown
2013-04-10 13:55   ` Gellner, Christoph (ADITG/SW1)

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=515D15B9.8080608@gmail.com \
    --to=gabrbedd@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=cgellner@de.adit-jv.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.