All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Dan Murphy <dmurphy@ti.com>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Volume control across multiple registers
Date: Thu, 20 Feb 2020 11:59:41 +0000	[thread overview]
Message-ID: <20200220115941.GB3926@sirena.org.uk> (raw)
In-Reply-To: <2f74b971-4a6a-016f-8121-4da941eeccef@ti.com>

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On Wed, Feb 19, 2020 at 03:11:47PM -0600, Dan Murphy wrote:

> I was looking at using the DAPM calls and use PGA_E and define an event but
> there really is no good way to get the current volume setting.

Store it in a variable in the driver's private data (there's a number of
examples of doing that for various controls, the process doesn't change
just because it's a volume), or if you've got a register cache it could
be just as easy to do the register reads and combine the values.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Dan Murphy <dmurphy@ti.com>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	tiwai@suse.com, lgirdwood@gmail.com
Subject: Re: [RFC] Volume control across multiple registers
Date: Thu, 20 Feb 2020 11:59:41 +0000	[thread overview]
Message-ID: <20200220115941.GB3926@sirena.org.uk> (raw)
In-Reply-To: <2f74b971-4a6a-016f-8121-4da941eeccef@ti.com>

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On Wed, Feb 19, 2020 at 03:11:47PM -0600, Dan Murphy wrote:

> I was looking at using the DAPM calls and use PGA_E and define an event but
> there really is no good way to get the current volume setting.

Store it in a variable in the driver's private data (there's a number of
examples of doing that for various controls, the process doesn't change
just because it's a volume), or if you've got a register cache it could
be just as easy to do the register reads and combine the values.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-02-20 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 13:46 [PATCH] ASoC: tas2562: Add support for ISENSE and VSENSE Dan Murphy
2020-02-19 13:46 ` Dan Murphy
2020-02-19 20:57 ` Applied "ASoC: tas2562: Add support for ISENSE and VSENSE" to the asoc tree Mark Brown
2020-02-19 20:57   ` Mark Brown
2020-02-19 21:11 ` [RFC] Volume control across multiple registers Dan Murphy
2020-02-19 21:11   ` Dan Murphy
2020-02-20 11:59   ` Mark Brown [this message]
2020-02-20 11:59     ` 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=20200220115941.GB3926@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=dmurphy@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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.