From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Roderick Colenbrander <thunderbird2k@gmail.com>,
Roderick Colenbrander <roderick.colenbrander@sony.com>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Henrik Rydberg <rydberg@bitmath.org>,
kernel@collabora.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 00/11] HID: playstation: Add support for audio jack handling on DualSense
Date: Thu, 10 Jul 2025 08:24:15 +0300 [thread overview]
Message-ID: <74d4675d-d6f5-41ed-b715-f62fb569df5d@collabora.com> (raw)
In-Reply-To: <s4596421-sr43-893r-o90r-86nr588sp32q@xreary.bet>
Hi Roderick,
On 7/3/25 10:48 AM, Jiri Kosina wrote:
> On Wed, 25 Jun 2025, Cristian Ciocaltea wrote:
>
>> The Sony DualSense wireless controller (PS5) provides an internal mono
>> speaker, in addition to the 3.5mm jack socket for headphone output and
>> headset microphone input. However, the default audio output path is set
>> to headphones, regardless of whether they are actually inserted or not.
>>
>> This patch series aims to improve the audio support when operating in
>> USB mode, by implementing the following changes:
>>
>> * Detect when the plugged state of the audio jack changes and toggle
>> audio output between headphones and internal speaker, as required.
>> The latter is achieved by essentially routing the right channel of the
>> audio source to the mono speaker.
>>
>> * Adjust the speaker volume since its default level is too low and,
>> therefore, cannot generate any audible sound.
>>
>> * Register a dedicated input device for the audio jack and use it to
>> report all headphone and headset mic insert events.
>>
>> It's worth noting the latter is necessary since the controller complies
>> with v1.0 of the USB Audio Class spec (UAC1) and, therefore, cannot
>> advertise any jack detection capability.
>>
>> However, this feature can be implemented in the generic USB audio driver
>> via quirks, i.e. by configuring an input handler to receive hotplug
>> events from the HID driver. That's exactly what has been accomplished
>> via the "ALSA: usb-audio: Support jack detection on Sony DualSense"
>> patchset [1], which has been already merged and should be available in
>> v6.17.
>>
>> Unrelated to the above, also provide a few driver cleanup patches, e.g.
>> make use of bitfields macros, simplify locking, fix coding style.
>>
>> [1] https://lore.kernel.org/all/20250526-dualsense-alsa-jack-v1-0-1a821463b632@collabora.com/
>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
>> ---
>> Changes in v2:
>> - Updated cover letter including a reference to the usb-audio patch series
>> - Updated 'HID: playstation: Make use of bitfield macros' patch to drop
>> DS_STATUS_CHARGING_SHIFT and use FIELD_GET() for battery status ops
>> - Replaced 'HID: playstation: Rename DualSense input report status
>> field' with 'HID: playstation: Redefine DualSense input report status
>> field' changing data type to a 3-byte array instead of renaming the
>> struct member (Roderick)
>> - Updated 'HID: playstation: Support DualSense audio jack hotplug
>> detection' according to Roderick's feedback:
>> * Used DS_STATUS1_ prefixes for the plugged status register and rename
>> its bits to match the datasheet
>> * Defined MIC_VOLUME_ENABLE bit of DS_OUTPUT_VALID_FLAG0 register
>> * Renamed the newly introduced audio controls members in struct
>> dualsense_output_report_common: headphone_volume, speaker_volume,
>> mic_volume, audio_control, audio_control2
>> - Restricted audio jack hotplug detection and event reporting to USB
>> operation mode only, since Bluetooth audio is currently not supported
>> and it might have a negative impact on the battery life (Roderick)
>> - Rebased series onto next-20250624
>> - Link to v1: https://lore.kernel.org/r/20250526-dualsense-hid-jack-v1-0-a65fee4a60cc@collabora.com
>
> Just for the record -- I like the v2, and am inclined to merge it, but
> would prefer doing that with Roderick's Ack, so I am waiting for a bit
> here.
Could you please confirm you are fine with the latest changes so that Jiri
is able to merge the series?
If you cannot find the time to look into every detail right now, we can
still take care of any non-essential matters afterwards.
Thanks,
Cristian
next prev parent reply other threads:[~2025-07-10 5:24 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 21:56 Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 01/11] HID: playstation: Make use of bitfield macros Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 02/11] HID: playstation: Add spaces around arithmetic operators Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 03/11] HID: playstation: Simplify locking with guard() and scoped_guard() Cristian Ciocaltea
2025-09-17 13:50 ` Benjamin Tissoires
2025-09-17 14:21 ` Benjamin Tissoires
2025-09-22 21:04 ` Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 04/11] HID: playstation: Replace uint{32,16,8}_t with u{32,16,8} Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 05/11] HID: playstation: Correct spelling in comment sections Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 06/11] HID: playstation: Fix all alignment and line length issues Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 07/11] HID: playstation: Document spinlock_t usage Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 08/11] HID: playstation: Prefer kzalloc(sizeof(*buf)...) Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 09/11] HID: playstation: Redefine DualSense input report status field Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 10/11] HID: playstation: Support DualSense audio jack hotplug detection Cristian Ciocaltea
2025-06-24 21:56 ` [PATCH v2 11/11] HID: playstation: Support DualSense audio jack event reporting Cristian Ciocaltea
2025-07-03 7:48 ` [PATCH v2 00/11] HID: playstation: Add support for audio jack handling on DualSense Jiri Kosina
2025-07-10 5:24 ` Cristian Ciocaltea [this message]
2025-07-10 21:31 ` Roderick Colenbrander
2025-07-22 5:47 ` Roderick Colenbrander
2025-07-22 6:18 ` Roderick Colenbrander
2025-07-22 8:03 ` Cristian Ciocaltea
2025-07-23 4:04 ` Roderick Colenbrander
2025-07-23 4:20 ` Roderick Colenbrander
2025-07-23 7:17 ` Cristian Ciocaltea
2025-08-27 6:36 ` Cristian Ciocaltea
2025-09-12 15:38 ` Jiri Kosina
2025-09-12 16:14 ` Benjamin Tissoires
2025-09-12 17:04 ` Benjamin Tissoires
2025-07-22 7:24 ` Cristian Ciocaltea
2025-09-17 9:34 ` Jiri Kosina
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=74d4675d-d6f5-41ed-b715-f62fb569df5d@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=kernel@collabora.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roderick.colenbrander@sony.com \
--cc=rydberg@bitmath.org \
--cc=thunderbird2k@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®