All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	patches@opensource.wolfsonmicro.com,
	"Philippe Rétornaz" <philippe.retornaz@epfl.ch>,
	"Charles Keepax" <ckeepax@opensource.wolfsonmicro.com>,
	"Steffen Trumtrar" <s.trumtrar@pengutronix.de>,
	"Jerry Wong" <jerry.wong@maximintegrated.com>
Subject: [PATCH 00/11] ASoC: Consolidate enum controls and DAPM MUXs
Date: Sun, 23 Feb 2014 16:10:10 +0100	[thread overview]
Message-ID: <1393168221-23018-1-git-send-email-lars@metafoo.de> (raw)

We currently have 5 nearly identical implementations of enum controls. Two for
normal controls and three for DAPM controls. The only difference between them is
how and if the selected enum item is mapped to a register value.
For normal enums there is a direct mapping of the selected item to the register
value, for value enums there is an additional look-up table that maps the
selected item to a register value. DAPM also as a virtual enum which is not
backed by any hardware register and the enum is solely used to influence DAPM
routing decisions. The different implementations can easily be consolidating by
making a few small changes. The series first introduces two helper functions to
translate between the selected item and the register value. These functions will
do the right thing depending on whether the enum has a direct mapping or is a
value enum. These functions will be used to consolidate enums and value enums as
well as MUXs and value MUXs. The next step is consolidate MUXs and virtual MUXs.
This requires enums that are only used as virtual enums to be marked as such.
This is done the same way as for virtual mixer controls by setting reg to
SND_SOC_NOPM. All users of virtual MUXs are updated accordingly and then virtual
MUXs and MUXs are updated to share the same implementation. The last patch in
the series does cleanup of dapm_set_path_status() on top of all this.

Once this has been merged I'll send a second patch-set replacing and removing
the now deprecated ENUM and MUX macros.

The series depends on topic/dapm, topic/enum, topic/sign, topic/adau1373,
topic/max98090, topic/mc13783, fix/wm8994, topic/wm8995

- Lars

Lars-Peter Clausen (11):
  ASoC: Remove unused 'reg2' field from soc_enum struct
  ASoC: Consolidate enum and value enum controls
  ASoC: dapm: Consolidate MUXs and value MUXs
  ASoC: Add macros for defining virtual enums
  ASoC: adau1373: Use SOC_ENUM_SINGLE_VIRT_DECL()
  ASoC: max98090: Use SOC_ENUM_SINGLE_VIRT_DECL()
  ASoC: mc13783: Use SOC_ENUM_SINGLE_VIRT_DECL()
  ASoC: wm8994: Use SOC_ENUM_SINGLE_VIRT_DECL()
  ASoC: wm8995: Use SOC_ENUM_SINGLE_VIRT_DECL()
  ASoC: dapm: Consolidate MUXs and virtual MUXs
  ASoC: dapm: Break dapm_set_path_status() appart

 include/sound/soc-dapm.h    |  38 +----
 include/sound/soc.h         |  41 +++--
 sound/soc/codecs/adau1373.c |   4 +-
 sound/soc/codecs/max98090.c |   2 +-
 sound/soc/codecs/mc13783.c  |   6 +-
 sound/soc/codecs/wm8994.c   |   3 +-
 sound/soc/codecs/wm8995.c   |   2 +-
 sound/soc/soc-core.c        | 101 ++----------
 sound/soc/soc-dapm.c        | 369 +++++++++-----------------------------------
 9 files changed, 136 insertions(+), 430 deletions(-)

-- 
1.8.0

             reply	other threads:[~2014-02-23 15:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-23 15:10 Lars-Peter Clausen [this message]
2014-02-23 15:10 ` [PATCH 01/11] ASoC: Remove unused 'reg2' field from soc_enum struct Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 02/11] ASoC: Consolidate enum and value enum controls Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 03/11] ASoC: dapm: Consolidate MUXs and value MUXs Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 04/11] ASoC: Add macros for defining virtual enums Lars-Peter Clausen
2014-02-24  9:29   ` Takashi Iwai
2014-02-24 11:50     ` Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 05/11] ASoC: adau1373: Use SOC_ENUM_SINGLE_VIRT_DECL() Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 06/11] ASoC: max98090: " Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 07/11] ASoC: mc13783: " Lars-Peter Clausen
2014-02-24 14:28   ` Philippe Rétornaz
2014-02-28  7:19     ` Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 08/11] ASoC: wm8994: " Lars-Peter Clausen
2014-02-25  9:47   ` Charles Keepax
2014-02-23 15:10 ` [PATCH 09/11] ASoC: wm8995: " Lars-Peter Clausen
2014-02-25  9:47   ` Charles Keepax
2014-02-23 15:10 ` [PATCH 10/11] ASoC: dapm: Consolidate MUXs and virtual MUXs Lars-Peter Clausen
2014-02-23 15:10 ` [PATCH 11/11] ASoC: dapm: Break dapm_set_path_status() appart Lars-Peter Clausen
2014-02-25  1:57 ` [PATCH 00/11] ASoC: Consolidate enum controls and DAPM MUXs 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=1393168221-23018-1-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=jerry.wong@maximintegrated.com \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=philippe.retornaz@epfl.ch \
    --cc=s.trumtrar@pengutronix.de \
    /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.