From: Silvio Unkovic via B4 Relay <devnull+silvio.unkovic.pm.me@kernel.org>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Silvio Unkovic <silvio.unkovic@pm.me>
Subject: [PATCH] ALSA: usb-audio: Add quirks for Sony PlayStation Eye
Date: Sat, 28 Nov 2026 02:22:30 +0100 [thread overview]
Message-ID: <20261128-pseye-audio-v1-1-b751d7911847@pm.me> (raw)
From: Silvio Unkovic <silvio.unkovic@pm.me>
The Sony PlayStation Eye camera (1415:2000) has a UAC1 four-microphone
array capture interface with a single 16 kHz rate.
Reading back the sampling frequency from its endpoint returns garbage
(e.g. 33186, 17004 or 2199316 instead of 16000), producing a "current
rate ... is different from the runtime rate" warning on every stream
start. This was already reported in 2012 [1]. Set
QUIRK_FLAG_GET_SAMPLE_RATE to skip the read.
Its feature unit 3 advertises a per-channel volume control, but the
device answers GET_MIN, GET_MAX, GET_RES and GET_CUR with a single zero
byte instead of two bytes, so the driver logs "cannot get min/max
values" and creates a "Mic Capture Volume" control with a fallback 0..1
range that returns -EINVAL on read. SET_CUR is accepted for any value,
but the capture level does not change: with a fixed range forced in the
driver, recordings stayed at the same level for every setting from
-80 dB to +60 dB. Skip the control via a mixer map.
[1] "Usb audio - unsuported sampling rates", alsa-devel, 2012-07-10
Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Silvio Unkovic <silvio.unkovic@pm.me>
---
Tested on a PlayStation Eye (1415:2000, bcdDevice 2.00, product string
"USB Camera-B4.09.24.1") on 7.3.4 with snd-usb-audio rebuilt with this
patch: no "current rate" or "cannot get min/max values" messages on
plug-in or stream start, the control is gone, and 4-channel 16 kHz
capture works as before.
The volume findings come from sending the FU 3 requests through usbfs
with the control interface unbound, and from a test build that gave the
control a fixed -80..+60 dB range and stepped it with amixer while
recording, in a quiet room and with music playing.
Tool use: an AI coding assistant (Claude Code) did the investigation of
the driver code, wrote the patch and the test scripts, and drafted this
changelog, working on my machine with the camera attached. I ran the
tests on the hardware and reviewed the change and the results.
---
sound/usb/mixer_maps.c | 16 ++++++++++++++++
sound/usb/quirks.c | 2 ++
2 files changed, 18 insertions(+)
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index 9218ca631..26319ed0a 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -562,6 +562,17 @@ static const struct usbmix_name_map avermedia_gc553pro_map[] = {
{}
};
+/*
+ * Sony PlayStation Eye: FU 3 advertises per-channel volume for the four
+ * microphones, but the device answers GET_MIN, GET_MAX and GET_CUR with a
+ * single zero byte, and SET_CUR is accepted without changing the capture
+ * level. Skip the control.
+ */
+static const struct usbmix_name_map sony_ps_eye_map[] = {
+ { 3, NULL, UAC_FU_VOLUME },
+ {}
+};
+
/*
* Control map entries
*/
@@ -640,6 +651,11 @@ static const struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x13e5, 0x0001),
.map = scratch_live_map,
},
+ {
+ /* Sony PlayStation Eye */
+ .id = USB_ID(0x1415, 0x2000),
+ .map = sony_ps_eye_map,
+ },
{
.id = USB_ID(0x200c, 0x1018),
.map = ebox44_map,
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index bd00db820..ff2bfe850 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -2713,6 +2713,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = {
QUIRK_FLAG_PLAYBACK_FIRST | QUIRK_FLAG_GENERIC_IMPLICIT_FB),
DEVICE_FLG(0x13e5, 0x0001, /* Serato Phono */
QUIRK_FLAG_IGNORE_CTL_ERROR),
+ DEVICE_FLG(0x1415, 0x2000, /* Sony PlayStation Eye */
+ QUIRK_FLAG_GET_SAMPLE_RATE),
DEVICE_FLG(0x152a, 0x85dd, /* SMSL USB DAC */
QUIRK_FLAG_DSD_RAW | QUIRK_FLAG_DISABLE_AUTOSUSPEND |
QUIRK_FLAG_SKIP_IFACE_SETUP),
---
base-commit: e1aff4d4241057636394751508e633a92f1cbbab
change-id: 20261128-pseye-audio-88246e011f3d
Best regards,
--
Silvio Unkovic <silvio.unkovic@pm.me>
reply other threads:[~2026-11-28 1:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261128-pseye-audio-v1-1-b751d7911847@pm.me \
--to=devnull+silvio.unkovic.pm.me@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=silvio.unkovic@pm.me \
--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 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®