mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: Sriman Achanta <srimanachanta@gmail.com>,
	Jiri Kosina <jikos@kernel.org>,
	 Benjamin Tissoires	 <bentiss@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Simon Wood <simon@mungewell.org>,
	Christian Mayer <git@mayer-bgk.de>
Subject: Re: [PATCH v3 10/18] HID: steelseries: Add settings poll infrastructure
Date: Tue, 03 Mar 2026 11:58:46 +0100	[thread overview]
Message-ID: <f4f0879cda48b9721ec03a51eb7cda98f3761c68.camel@hadess.net> (raw)
In-Reply-To: <20260227235042.410062-11-srimanachanta@gmail.com>

On Fri, 2026-02-27 at 18:50 -0500, Sriman Achanta wrote:
> Some headset settings (sidetone level, mic volume, etc.) are not
> reported spontaneously but must be explicitly requested from the
> device.
> Introduce a separate delayed work item (settings_work) for fetching
> these persistent settings, independent of the existing status work.
> 
> Settings are requested once at probe time and again whenever the
> headset
> reconnects after being disconnected. Device info structs gain
> request_settings and parse_settings hooks for model-specific
> implementations. The SS_CAP_EXTERNAL_CONFIG capability flag marks
> devices whose writable controls can also be changed from the headset
> hardware directly; writable ALSA controls on such devices will be
> marked
> volatile.

The settings polling work and the addition of SS_CAP_EXTERNAL_CONFIG
for some headsets should probably be made in separate commits.

> 
> The initial implementation adds the Arctis Nova 7 Gen2 audio settings
> request (0x00, 0x20).
> 
> Signed-off-by: Sriman Achanta <srimanachanta@gmail.com>
> ---
>  drivers/hid/hid-steelseries.c | 37
> ++++++++++++++++++++++++++++++++++-
>  1 file changed, 36 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/hid-steelseries.c b/drivers/hid/hid-
> steelseries.c
> index 8c6116d02f19..f2423c350154 100644
> --- a/drivers/hid/hid-steelseries.c
> +++ b/drivers/hid/hid-steelseries.c
> @@ -26,6 +26,7 @@
>  #define SS_CAP_MIC_MUTE			BIT(2)
>  #define SS_CAP_BT_ENABLED		BIT(3)
>  #define SS_CAP_BT_DEVICE_CONNECTED	BIT(4)
> +#define SS_CAP_EXTERNAL_CONFIG		BIT(5)
>  
>  #define SS_QUIRK_STATUS_SYNC_POLL	BIT(0)
>  
> @@ -40,6 +41,9 @@ struct steelseries_device_info {
>  
>  	int (*request_status)(struct hid_device *hdev);
>  	void (*parse_status)(struct steelseries_device *sd, u8
> *data, int size);
> +
> +	int (*request_settings)(struct hid_device *hdev);
> +	void (*parse_settings)(struct steelseries_device *sd, u8
> *data, int size);
>  };
>  
>  struct steelseries_device {
> @@ -49,6 +53,7 @@ struct steelseries_device {
>  	bool use_async_protocol;
>  
>  	struct delayed_work status_work;
> +	struct delayed_work settings_work;
>  
>  	struct power_supply_desc battery_desc;
>  	struct power_supply *battery;
> @@ -690,6 +695,14 @@ static void
> steelseries_arctis_nova_7_gen2_parse_status(struct steelseries_devic
>  	}
>  }
>  
> +static int steelseries_arctis_nova_7_gen2_request_settings(struct
> hid_device *hdev)
> +{
> +	const u8 data[] = { 0x00, 0x20 };
> +
> +	return steelseries_send_output_report(hdev, data,
> sizeof(data));
> +}
> +
> +
>  static void steelseries_arctis_nova_pro_parse_status(struct
> steelseries_device *sd,
>  						     u8 *data, int
> size)
>  {
> @@ -791,9 +804,11 @@ static const struct steelseries_device_info
> arctis_nova_7_gen2_info = {
>  	.sync_interface = 3,
>  	.async_interface = 5,
>  	.capabilities = SS_CAP_BATTERY | SS_CAP_CHATMIX |
> SS_CAP_MIC_MUTE |
> -			SS_CAP_BT_ENABLED |
> SS_CAP_BT_DEVICE_CONNECTED,
> +			SS_CAP_BT_ENABLED |
> SS_CAP_BT_DEVICE_CONNECTED |
> +			SS_CAP_EXTERNAL_CONFIG,
>  	.request_status = steelseries_arctis_nova_request_status,
>  	.parse_status = steelseries_arctis_nova_7_gen2_parse_status,
> +	.request_settings =
> steelseries_arctis_nova_7_gen2_request_settings,
>  };
>  
>  static const struct steelseries_device_info arctis_nova_pro_info = {
> @@ -901,6 +916,15 @@ static void
> steelseries_status_timer_work_handler(struct work_struct *work)
>  	spin_unlock_irqrestore(&sd->lock, flags);
>  }
>  
> +static void steelseries_settings_work_handler(struct work_struct
> *work)
> +{
> +	struct steelseries_device *sd = container_of(
> +		work, struct steelseries_device,
> settings_work.work);
> +
> +	if (sd->info->request_settings)
> +		sd->info->request_settings(sd->hdev);
> +}
> +
>  static int steelseries_battery_register(struct steelseries_device
> *sd)
>  {
>  	static atomic_t battery_no = ATOMIC_INIT(0);
> @@ -1185,6 +1209,9 @@ static int steelseries_raw_event(struct
> hid_device *hdev,
>  
>  	sd->info->parse_status(sd, data, size);
>  
> +	if (sd->info->parse_settings)
> +		sd->info->parse_settings(sd, data, size);
> +
>  	if (sd->headset_connected != old_connected) {
>  		hid_dbg(hdev,
>  			"Connected status changed from %sconnected
> to %sconnected\n",
> @@ -1194,6 +1221,9 @@ static int steelseries_raw_event(struct
> hid_device *hdev,
>  		if (sd->headset_connected && !old_connected &&
>  		    sd->use_async_protocol && is_async_interface) {
>  			schedule_delayed_work(&sd->status_work, 0);
> +			if (sd->info->request_settings)
> +				schedule_delayed_work(&sd-
> >settings_work,
> +						     
> msecs_to_jiffies(10));
>  		}
>  
>  		if (sd->battery) {
> @@ -1329,7 +1359,11 @@ static int steelseries_probe(struct hid_device
> *hdev,
>  #endif
>  
>  		INIT_DELAYED_WORK(&sd->status_work,
> steelseries_status_timer_work_handler);
> +		INIT_DELAYED_WORK(&sd->settings_work,
> steelseries_settings_work_handler);
> +
>  		schedule_delayed_work(&sd->status_work,
> msecs_to_jiffies(100));
> +		if (info->request_settings)
> +			schedule_delayed_work(&sd->settings_work,
> msecs_to_jiffies(200));
>  
>  		return 0;
>  	}
> @@ -1415,6 +1449,7 @@ static void steelseries_remove(struct
> hid_device *hdev)
>  		spin_unlock_irqrestore(&sd->lock, flags);
>  
>  		cancel_delayed_work_sync(&sd->status_work);
> +		cancel_delayed_work_sync(&sd->settings_work);
>  	}
>  
>  	hid_hw_close(hdev);

  reply	other threads:[~2026-03-03 10:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 23:50 [PATCH v3 00/18] HID: steelseries: Add support for Arctis headset lineup Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 01/18] HID: steelseries: Fix ARCTIS_1_X device mislabeling Sriman Achanta
2026-03-03 10:58   ` Bastien Nocera
2026-02-27 23:50 ` [PATCH v3 02/18] HID: hid-ids: Add SteelSeries Arctis headset device IDs Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 03/18] HID: quirks: Add additional " Sriman Achanta
2026-03-03 10:58   ` Bastien Nocera
2026-02-27 23:50 ` [PATCH v3 04/18] HID: steelseries: Add async support and unify device definitions Sriman Achanta
2026-03-03 10:58   ` Bastien Nocera
2026-02-27 23:50 ` [PATCH v3 05/18] HID: steelseries: Update Kconfig help text for expanded headset support Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 06/18] HID: steelseries: Add ALSA sound card infrastructure Sriman Achanta
2026-03-03 10:58   ` Bastien Nocera
2026-02-27 23:50 ` [PATCH v3 07/18] HID: steelseries: Add ChatMix ALSA mixer controls Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 08/18] HID: steelseries: Add mic mute ALSA mixer control Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 09/18] HID: steelseries: Add Bluetooth state sysfs attributes Sriman Achanta
2026-03-03 10:58   ` Bastien Nocera
2026-02-27 23:50 ` [PATCH v3 10/18] HID: steelseries: Add settings poll infrastructure Sriman Achanta
2026-03-03 10:58   ` Bastien Nocera [this message]
2026-02-27 23:50 ` [PATCH v3 11/18] HID: steelseries: Add sidetone ALSA mixer control Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 12/18] HID: steelseries: Add mic volume " Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 13/18] HID: steelseries: Add volume limiter " Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 14/18] HID: steelseries: Add Bluetooth call audio ducking control Sriman Achanta
2026-03-03 10:59   ` Bastien Nocera
2026-02-27 23:50 ` [PATCH v3 15/18] HID: steelseries: Add inactive time sysfs attribute Sriman Achanta
2026-03-03 10:59   ` Bastien Nocera
2026-02-27 23:50 ` [PATCH v3 16/18] HID: steelseries: Add Bluetooth auto-enable " Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 17/18] HID: steelseries: Add mic mute LED brightness control Sriman Achanta
2026-02-27 23:50 ` [PATCH v3 18/18] HID: steelseries: Document sysfs ABI Sriman Achanta
2026-03-03 10:58   ` Bastien Nocera
2026-03-03 10:59 ` [PATCH v3 00/18] HID: steelseries: Add support for Arctis headset lineup Bastien Nocera

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=f4f0879cda48b9721ec03a51eb7cda98f3761c68.camel@hadess.net \
    --to=hadess@hadess.net \
    --cc=bentiss@kernel.org \
    --cc=git@mayer-bgk.de \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon@mungewell.org \
    --cc=srimanachanta@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®