devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC-PATCH 0/2] ASoC: simple_card: support for hw-params rules
@ 2016-05-20 12:30 kernel-TqfNSX0MhmxHKSADF0wUEw
       [not found] ` <1463747445-14167-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: kernel-TqfNSX0MhmxHKSADF0wUEw @ 2016-05-20 12:30 UTC (permalink / raw)
  To: Rob Herring, Pawel Moll, Mark Rutland, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, devicetree-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw
  Cc: Martin Sperl

From: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>

Simple_card does require under some circumstances the ability
to configure certain hw_parameters based on clocks, bits, channels.

This patchset adds a generic way to configure these kind of things
via the device tree easily. This patchset implements this
for simple_card, but other drivers can just as easily make use of
this.

For now we have the following matchers and actions:
* matchers:
  * match_sample_bits
  * match_rate
  * match_channels
* actions:
  * set_fixed_bclk_size

As a note: the available matching rules and action rules right now
are hard-coded, but this could in principle get extended to be more
dynamic via kallsyms_lookup_name that would lookup the requested
symbol and assume it is a struct asoc_generic_hw_params_method,
on which it could apply several sanity-checks before using
the pointers for real.

This would allow other kinds of action methods to get exposed in
codec-drivers, that can then get used to handle some settings
specific to the codec.

I leave this is an exercise for later...

Martin Sperl (2):
  ASoC: hw-params-rules: add generic hw_params-rules
  ASoC: simple_card: add support for hw_params_rules

 .../devicetree/bindings/sound/hw-params-rules.txt  |  86 +++++
 .../devicetree/bindings/sound/simple-card.txt      |   1 +
 sound/soc/generic/Kconfig                          |   6 +
 sound/soc/generic/Makefile                         |   2 +
 sound/soc/generic/hw-params-rules.c                | 402 +++++++++++++++++++++
 sound/soc/generic/hw-params-rules.h                |  49 +++
 sound/soc/generic/simple-card.c                    |  11 +-
 7 files changed, 554 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/hw-params-rules.txt
 create mode 100644 sound/soc/generic/hw-params-rules.c
 create mode 100644 sound/soc/generic/hw-params-rules.h

--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-05-25 15:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 12:30 [RFC-PATCH 0/2] ASoC: simple_card: support for hw-params rules kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found] ` <1463747445-14167-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-05-20 12:30   ` [PATCH 1/2] ASoC: hw-params-rules: add generic hw_params-rules kernel-TqfNSX0MhmxHKSADF0wUEw
2016-05-20 12:30   ` [PATCH 2/2] ASoC: simple_card: add support for hw_params_rules kernel-TqfNSX0MhmxHKSADF0wUEw
2016-05-20 19:16   ` [alsa-devel] [RFC-PATCH 0/2] ASoC: simple_card: support for hw-params rules Lars-Peter Clausen
     [not found]     ` <573F6279.8040008-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2016-05-23 16:59       ` Mark Brown
     [not found]         ` <20160523165931.GY8206-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-05-23 17:15           ` Mark Rutland
2016-05-23 18:26             ` Lars-Peter Clausen
     [not found]               ` <57434B61.2080705-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2016-05-23 19:02                 ` Mark Brown
2016-05-23 21:29             ` Rob Herring
2016-05-23 17:59           ` Takashi Iwai
2016-05-23 17:18   ` Mark Rutland
2016-05-25 15:44     ` kernel-TqfNSX0MhmxHKSADF0wUEw

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).