All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: ALSA development <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Generic clock divider indices
Date: Thu, 06 Jun 2013 15:44:04 +0200	[thread overview]
Message-ID: <51B09224.9050409@gmail.com> (raw)

Hi Mark, Liam,

we're using generic ASoC platform code for some audio devices, which is
agnostic of the actual Codecs that it deals with, as the information is
provided by DT nodes only.

That works very well so far, but I'm now facing a case where I need to
pass a special clock divider information down to the codec driver. The
fact that the IDs of the dividers can be arbitrarily defined by the
drivers leads to the unfortunate situation that I now have to make the
platform code aware of the codec drivers again.

Would it be an idea to define some commonly used dividers in the core?
If they start at 0x80000000, they won't collide with existing ones, and
we could simply add them as alternative case statements to existing drivers.

Some commonly used ones I can think of are

	MCLK / BCLK
	MCLK / LRCLK
	BCLK / LRCLK

That way, platform code could just pass the values dows to the codec
drivers, whether or not they know what to do with it.

What do you think?


Daniel

             reply	other threads:[~2013-06-06 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 13:44 Daniel Mack [this message]
2013-06-06 13:56 ` Generic clock divider indices Mark Brown
2013-06-06 14:09   ` Daniel Mack
2013-06-06 14:24     ` Mark Brown
2013-06-06 14:31       ` Daniel Mack
2013-06-06 14:53         ` Mark Brown

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=51B09224.9050409@gmail.com \
    --to=zonque@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.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.