All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <broonie@kernel.org>, <tiwai@suse.com>, <perex@perex.cz>,
	<amade@asmblr.net>, <linux-sound@vger.kernel.org>
Subject: Re: [PATCH 7/7] ASoC: Intel: catpt: Cleanup components_kcontrols[]
Date: Tue, 2 Jun 2026 11:04:33 +0200	[thread overview]
Message-ID: <03c7be0e-4e55-49e4-826b-ff4db16271e3@intel.com> (raw)
In-Reply-To: <ah6a_OG6qSJ0lXJ4@ashevche-desk.local>

On 6/2/2026 10:57 AM, Andy Shevchenko wrote:
> On Mon, Jun 01, 2026 at 04:10:31PM +0200, Cezary Rojewski wrote:
>> Fix alignment and drop redundant comments.
> 
> ...
> 
>>   static const struct snd_kcontrol_new component_kcontrols[] = {
>> -/* Master volume (mixer stream) */
>> -CATPT_VOLUME_CTL("Master Playback Volume", MIXER),
>> -/* Individual volume controls for offload and capture */
>> -CATPT_VOLUME_CTL("Media0 Playback Volume", OFFLOAD1),
>> -CATPT_VOLUME_CTL("Media1 Playback Volume", OFFLOAD2),
>> -CATPT_VOLUME_CTL("Mic Capture Volume", CAPTURE1),
>> -SOC_SINGLE_BOOL_EXT("Loopback Mute", (unsigned long)&(bool[1]) {0},
>> -		    catpt_loopback_mute_get, catpt_loopback_mute_put),
>> +	CATPT_VOLUME_CTL("Master Playback Volume", MIXER),
>> +	CATPT_VOLUME_CTL("Media0 Playback Volume", OFFLOAD1),
>> +	CATPT_VOLUME_CTL("Media1 Playback Volume", OFFLOAD2),
>> +	CATPT_VOLUME_CTL("Mic Capture Volume", CAPTURE1),
>> +	SOC_SINGLE_BOOL_EXT("Loopback Mute", (unsigned long)&(bool[1]) {0},
> 
> While at it, can't we simply do outside of this initialiser something like
> 
> static bool loopback_mute;
> 
> and here
> 
> 	SOC_SINGLE_BOOL_EXT("Loopback Mute", (unsigned long)&loopback_mute,

Hmm.. not a bad idea though the loopback_mute static would never be 
referred to.  All the functions obtain the values with 
kctl->private_value and I'd like things to state that way.

>> +			    catpt_loopback_mute_get, catpt_loopback_mute_put),
>>   };
> 


  reply	other threads:[~2026-06-02  9:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 14:10 [PATCH 0/7] ASoC: Intel: catpt: Code cleanup Cezary Rojewski
2026-06-01 14:10 ` [PATCH 1/7] ASoC: Intel: catpt: Utilize lock-guard helper Cezary Rojewski
2026-06-02  8:51   ` Andy Shevchenko
2026-06-01 14:10 ` [PATCH 2/7] ASoC: Intel: catpt: Replace RAM-helpers with resource_xxx() Cezary Rojewski
2026-06-01 18:57   ` Mark Brown
2026-06-01 20:02     ` Cezary Rojewski
2026-06-01 14:10 ` [PATCH 3/7] ASoC: Intel: catpt: Simplify the RAM-navigation code Cezary Rojewski
2026-06-01 14:10 ` [PATCH 4/7] ASoC: Intel: catpt: Simplify catpt_stream_find() Cezary Rojewski
2026-06-02  8:53   ` Andy Shevchenko
2026-06-02  8:59     ` Cezary Rojewski
2026-06-01 14:10 ` [PATCH 5/7] ASoC: Intel: catpt: Remove unused WAVES controls Cezary Rojewski
2026-06-02  8:54   ` Andy Shevchenko
2026-06-02  9:01     ` Cezary Rojewski
2026-06-01 14:10 ` [PATCH 6/7] ASoC: Intel: catpt: Drop manipulation of the obsolete direction flag Cezary Rojewski
2026-06-01 14:10 ` [PATCH 7/7] ASoC: Intel: catpt: Cleanup components_kcontrols[] Cezary Rojewski
2026-06-02  8:57   ` Andy Shevchenko
2026-06-02  9:04     ` Cezary Rojewski [this message]
2026-06-02  8:58 ` [PATCH 0/7] ASoC: Intel: catpt: Code cleanup Andy Shevchenko

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=03c7be0e-4e55-49e4-826b-ff4db16271e3@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=amade@asmblr.net \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-sound@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.