From: Randy Dunlap <rdunlap@infradead.org>
To: cryolitia@uniontech.com, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Jonathan Corbet <corbet@lwn.net>,
Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>
Cc: linux-sound@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Mingcong Bai <jeffbai@aosc.io>,
Kexy Biscuit <kexybiscuit@aosc.io>,
Nie Cheng <niecheng1@uniontech.com>,
Zhan Jun <zhanjun@uniontech.com>,
Feng Yuan <fengyuan@uniontech.com>,
qaqland <anguoli@uniontech.com>,
kernel@uniontech.com, linux-modules@vger.kernel.org
Subject: Re: [PATCH v4 5/5] ALSA: doc: add docs about improved quirk_flags in snd-usb-audio
Date: Thu, 18 Sep 2025 13:21:49 -0700 [thread overview]
Message-ID: <dcbd2c62-5db8-4eb5-aa3a-532b33baaa61@infradead.org> (raw)
In-Reply-To: <20250918-sound-v4-5-82cf8123d61c@uniontech.com>
Hi--
On 9/18/25 2:24 AM, Cryolitia PukNgae via B4 Relay wrote:
> From: Cryolitia PukNgae <cryolitia@uniontech.com>
>
> Just briefly described about the option.
>
> Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com>
> ---
> Documentation/sound/alsa-configuration.rst | 108 ++++++++++++++++++++---------
> 1 file changed, 75 insertions(+), 33 deletions(-)
>
> diff --git a/Documentation/sound/alsa-configuration.rst b/Documentation/sound/alsa-configuration.rst
> index a2fb8ed251dd0294e7a62209ca15d5c32c6adfae..efffe3d534beeddcb6a47ac27a24defb6879f534 100644
> --- a/Documentation/sound/alsa-configuration.rst
> +++ b/Documentation/sound/alsa-configuration.rst
> @@ -2297,39 +2297,81 @@ skip_validation
> of the unit descriptor instead of a driver probe error, so that we
> can check its details.
> quirk_flags
> - Contains the bit flags for various device specific workarounds.
> - Applied to the corresponding card index.
> -
> - * bit 0: Skip reading sample rate for devices
> - * bit 1: Create Media Controller API entries
> - * bit 2: Allow alignment on audio sub-slot at transfer
> - * bit 3: Add length specifier to transfers
> - * bit 4: Start playback stream at first in implement feedback mode
> - * bit 5: Skip clock selector setup
> - * bit 6: Ignore errors from clock source search
> - * bit 7: Indicates ITF-USB DSD based DACs
> - * bit 8: Add a delay of 20ms at each control message handling
> - * bit 9: Add a delay of 1-2ms at each control message handling
> - * bit 10: Add a delay of 5-6ms at each control message handling
> - * bit 11: Add a delay of 50ms at each interface setup
> - * bit 12: Perform sample rate validations at probe
> - * bit 13: Disable runtime PM autosuspend
> - * bit 14: Ignore errors for mixer access
> - * bit 15: Support generic DSD raw U32_BE format
> - * bit 16: Set up the interface at first like UAC1
> - * bit 17: Apply the generic implicit feedback sync mode
> - * bit 18: Don't apply implicit feedback sync mode
> - * bit 19: Don't closed interface during setting sample rate
> - * bit 20: Force an interface reset whenever stopping & restarting
> - a stream
> - * bit 21: Do not set PCM rate (frequency) when only one rate is
> - available for the given endpoint.
> - * bit 22: Set the fixed resolution 16 for Mic Capture Volume
> - * bit 23: Set the fixed resolution 384 for Mic Capture Volume
> - * bit 24: Set minimum volume control value as mute for devices
> - where the lowest playback value represents muted state instead
> - of minimum audible volume
> - * bit 25: Be similar to bit 24 but for capture streams
> + The option provides a refined and flexible control for applying quirk
> + flags. It allows to specify the quirk flags for each device, and could
and may
or: and can
> + be modified dynamically via sysfs.
> + The old usage accepts an array of integers, each of which apply quirk
applies
> + flags on the device in the order of probing.
> + e.g. ``quirk_flags=0x01,0x02`` applies get_sample_rate to the first
E.g.,
> + device, and share_media_device to the second device.
> + The new usage accepts a string in the format of
> + ``VID1:PID1:FLAGS1;VID2:PID2:FLAGS2;...``, where ``VIDx`` and ``PIDx``
> + specify the device, and ``FLAGSx`` specify the flags to be applied.
> + ``VIDx`` and ``PIDx`` are 4-digit hexadecimal numbers, and could be
s/could/may/
> + specified as ``*`` to match any value. ``FLAGSx`` could be a set of
s/could/may/
> + flags given by name, separated by ``|``, or a hexadecimal number
> + representing the bit flags. The available flag names are listed above.
s/above/below/ ?
> + An exclamation mark could be prefixed to a flag name to negate the flag.
s/could/may/
> + For example, ``1234:abcd:mixer_playback_min_mute|!ignore_ctl_error;*:*:0x01;``
What happens if the trailing (ending) ';' is omitted?
> + applies the ``mixer_playback_min_mute`` flag and clears the
> + ``ignore_ctl_error`` flag for the device 1234:abcd, and applies the
> + ``skip_sample_rate`` flag for all devices.
> +
> + * bit 0: ``get_sample_rate``
> + Skip reading sample rate for devices
get vs Skip is a little confusing.
> + * bit 1: ``share_media_device``
> + Create Media Controller API entries
> + * bit 2: ``align_transfer``
> + Allow alignment on audio sub-slot at transfer
> + * bit 3: ``tx_length``
> + Add length specifier to transfers
> + * bit 4: ``playback_first``
> + Start playback stream at first in implement feedback mode
> + * bit 5: ``skip_clock_selector``
> + Skip clock selector setup
> + * bit 6: ``ignore_clock_source``
> + Ignore errors from clock source search
> + * bit 7: ``itf_usb_dsd_dac``
> + Indicates ITF-USB DSD based DACs
DSD-based
> + * bit 8: ``ctl_msg_delay``
> + Add a delay of 20ms at each control message handling
> + * bit 9: ``ctl_msg_delay_1m``
> + Add a delay of 1-2ms at each control message handling
> + * bit 10: ``ctl_msg_delay_5m``
> + Add a delay of 5-6ms at each control message handling
> + * bit 11: ``iface_delay``
> + Add a delay of 50ms at each interface setup
> + * bit 12: ``validate_rates``
> + Perform sample rate validations at probe
> + * bit 13: ``disable_autosuspend``
> + Disable runtime PM autosuspend
> + * bit 14: ``ignore_ctl_error``
> + Ignore errors for mixer access
> + * bit 15: ``dsd_raw``
> + Support generic DSD raw U32_BE format
> + * bit 16: ``set_iface_first``
> + Set up the interface at first like UAC1
> + * bit 17: ``generic_implicit_fb``
> + Apply the generic implicit feedback sync mode
> + * bit 18: ``skip_implicit_fb``
> + Don't apply implicit feedback sync mode
> + * bit 19: ``iface_skip_close``
> + Don't closed interface during setting sample rate
close
> + * bit 20: ``force_iface_reset``
> + Force an interface reset whenever stopping & restarting a stream
> + * bit 21: ``fixed_rate``
> + Do not set PCM rate (frequency) when only one rate is available
> + for the given endpoint
> + * bit 22: ``mic_res_16``
> + Set the fixed resolution 16 for Mic Capture Volume
> + * bit 23: ``mic_res_384``
> + Set the fixed resolution 384 for Mic Capture Volume
> + * bit 24: ``mixer_playback_min_mute``
> + Set minimum volume control value as mute for devices where the
> + lowest playback value represents muted state instead of minimum
> + audible volume
> + * bit 25: ``mixer_capture_min_mute``
> + Be similar to bit 24 but for capture streams
Similar to
>
> This module supports multiple devices, autoprobe and hotplugging.
>
> Are all of these quirks used on various devices or are some of these
just implemented just in case they are needed in the future?thanks.
--
~Randy
next prev parent reply other threads:[~2025-09-18 20:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 9:24 [PATCH v4 0/5] ALSA: usb-audio: add module param device_quirk_flags Cryolitia PukNgae via B4 Relay
2025-09-18 9:24 ` [PATCH v4 1/5] ALSA: usb-audio: add two-way convert between name and bit for QUIRK_FLAG_* Cryolitia PukNgae via B4 Relay
2025-09-19 12:32 ` Takashi Iwai
2025-09-18 9:24 ` [PATCH v4 2/5] param: export param_array related functions Cryolitia PukNgae via B4 Relay
2025-09-19 12:37 ` Takashi Iwai
2025-09-18 9:24 ` [PATCH v4 3/5] ALSA: usb-audio: improve module param quirk_flags Cryolitia PukNgae via B4 Relay
2025-09-19 12:47 ` Takashi Iwai
2025-09-18 9:24 ` [PATCH v4 4/5] ALSA: usb-audio: make param quirk_flags change-able in runtime Cryolitia PukNgae via B4 Relay
2025-09-18 9:24 ` [PATCH v4 5/5] ALSA: doc: add docs about improved quirk_flags in snd-usb-audio Cryolitia PukNgae via B4 Relay
2025-09-18 20:21 ` Randy Dunlap [this message]
2025-09-19 1:43 ` Cryolitia PukNgae
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=dcbd2c62-5db8-4eb5-aa3a-532b33baaa61@infradead.org \
--to=rdunlap@infradead.org \
--cc=anguoli@uniontech.com \
--cc=corbet@lwn.net \
--cc=cryolitia@uniontech.com \
--cc=da.gomez@kernel.org \
--cc=fengyuan@uniontech.com \
--cc=jeffbai@aosc.io \
--cc=kernel@uniontech.com \
--cc=kexybiscuit@aosc.io \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=niecheng1@uniontech.com \
--cc=perex@perex.cz \
--cc=petr.pavlu@suse.com \
--cc=samitolvanen@google.com \
--cc=tiwai@suse.com \
--cc=zhanjun@uniontech.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