stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Takashi Iwai <tiwai@suse.com>,
	Adrian Ratiu <adrian.ratiu@collabora.com>,
	Takashi Iwai <tiwai@suse.de>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.4 81/93] sound: usb: format: dont warn that raw DSD is unsupported
Date: Mon,  6 Jan 2025 16:17:57 +0100	[thread overview]
Message-ID: <20250106151131.763665445@linuxfoundation.org> (raw)
In-Reply-To: <20250106151128.686130933@linuxfoundation.org>

5.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Adrian Ratiu <adrian.ratiu@collabora.com>

[ Upstream commit b50a3e98442b8d72f061617c7f7a71f7dba19484 ]

UAC 2 & 3 DAC's set bit 31 of the format to signal support for a
RAW_DATA type, typically used for DSD playback.

This is correctly tested by (format & UAC*_FORMAT_TYPE_I_RAW_DATA),
fp->dsd_raw = true; and call snd_usb_interface_dsd_format_quirks(),
however a confusing and unnecessary message gets printed because
the bit is not properly tested in the last "unsupported" if test:
if (format & ~0x3F) { ... }

For example the output:

usb 7-1: new high-speed USB device number 5 using xhci_hcd
usb 7-1: New USB device found, idVendor=262a, idProduct=9302, bcdDevice=0.01
usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
usb 7-1: Product: TC44C
usb 7-1: Manufacturer: TC44C
usb 7-1: SerialNumber: 5000000001
hid-generic 0003:262A:9302.001E: No inputs registered, leaving
hid-generic 0003:262A:9302.001E: hidraw6: USB HID v1.00 Device [DDHIFI TC44C] on usb-0000:08:00.3-1/input0
usb 7-1: 2:4 : unsupported format bits 0x100000000

This last "unsupported format" is actually wrong: we know the
format is a RAW_DATA which we assume is DSD, so there is no need
to print the confusing message.

This we unset bit 31 of the format after recognizing it, to avoid
the message.

Suggested-by: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Link: https://patch.msgid.link/20241209090529.16134-2-adrian.ratiu@collabora.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/usb/format.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sound/usb/format.c b/sound/usb/format.c
index 11a4454c6f64..b29190042f30 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -61,6 +61,8 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
 			pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL;
 			/* flag potentially raw DSD capable altsettings */
 			fp->dsd_raw = true;
+			/* clear special format bit to avoid "unsupported format" msg below */
+			format &= ~UAC2_FORMAT_TYPE_I_RAW_DATA;
 		}
 
 		format <<= 1;
@@ -72,8 +74,11 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
 		sample_width = as->bBitResolution;
 		sample_bytes = as->bSubslotSize;
 
-		if (format & UAC3_FORMAT_TYPE_I_RAW_DATA)
+		if (format & UAC3_FORMAT_TYPE_I_RAW_DATA) {
 			pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL;
+			/* clear special format bit to avoid "unsupported format" msg below */
+			format &= ~UAC3_FORMAT_TYPE_I_RAW_DATA;
+		}
 
 		format <<= 1;
 		break;
-- 
2.39.5




  parent reply	other threads:[~2025-01-06 16:02 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 15:16 [PATCH 5.4 00/93] 5.4.289-rc1 review Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 01/93] net: sched: fix ordering of qlen adjustment Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 02/93] usb: dwc2: gadget: Dont write invalid mapped sg entries into dma_desc with iommu enabled Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 03/93] PCI/AER: Disable AER service on suspend Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 04/93] ALSA: usb: Fix UBSAN warning in parse_audio_unit() Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 05/93] PCI: Add ACS quirk for Broadcom BCM5760X NIC Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 06/93] i2c: pnx: Fix timeout in wait functions Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 07/93] drm/i915: Fix memory leak by correcting cache object name in error handler Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 08/93] erofs: fix order >= MAX_ORDER warning due to crafted negative i_size Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 09/93] erofs: fix incorrect symlink detection in fast symlink Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 10/93] net/smc: check sndbuf_space again after NOSPACE flag is set in smc_poll Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 11/93] ionic: use ee->offset when returning sprom data Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 12/93] net: hinic: Fix cleanup in create_rxqs/txqs() Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 13/93] net: ethernet: bgmac-platform: fix an OF node reference leak Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 14/93] netfilter: ipset: Fix for recursive locking warning Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 15/93] mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 16/93] chelsio/chtls: prevent potential integer overflow on 32bit Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 17/93] i2c: riic: Always round-up when calculating bus period Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 18/93] efivarfs: Fix error on non-existent file Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 19/93] USB: serial: option: add TCL IK512 MBIM & ECM Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 20/93] USB: serial: option: add MeiG Smart SLM770A Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 21/93] USB: serial: option: add Netprisma LCUK54 modules for WWAN Ready Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 22/93] USB: serial: option: add MediaTek T7XX compositions Greg Kroah-Hartman
2025-01-06 15:16 ` [PATCH 5.4 23/93] USB: serial: option: add Telit FE910C04 rmnet compositions Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 24/93] sh: clk: Fix clk_enable() to return 0 on NULL clk Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 25/93] zram: refuse to use zero sized block device as backing device Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 26/93] btrfs: tree-checker: reject inline extent items with 0 ref count Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 27/93] NFS/pnfs: Fix a live lock between recalled layouts and layoutget Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 28/93] of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 29/93] nilfs2: prevent use of deleted inode Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 30/93] udmabuf: also check for F_SEAL_FUTURE_WRITE Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 31/93] of: Fix error path in of_parse_phandle_with_args_map() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 32/93] of: Fix refcount leakage for OF node returned by __of_get_dma_parent() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 33/93] media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_reg Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 34/93] bpf: Check negative offsets in __bpf_skb_min_len() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 35/93] nfsd: restore callback functionality for NFSv4.0 Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 36/93] mtd: diskonchip: Cast an operand to prevent potential overflow Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 37/93] phy: core: Fix an OF node refcount leakage in _of_phy_get() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 38/93] phy: core: Fix an OF node refcount leakage in of_phy_provider_lookup() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 39/93] phy: core: Fix that API devm_phy_put() fails to release the phy Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 40/93] phy: core: Fix that API devm_phy_destroy() fails to destroy " Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 41/93] dmaengine: mv_xor: fix child node refcount handling in early exit Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 42/93] dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 43/93] mtd: rawnand: fix double free in atmel_pmecc_create_user() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 44/93] tracing/kprobe: Make trace_kprobes module callback called after jump_label update Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 45/93] scsi: qla1280: Fix hw revision numbering for ISP1020/1040 Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 46/93] scsi: megaraid_sas: Fix for a potential deadlock Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 47/93] regmap: Use correct format specifier for logging range errors Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 48/93] platform/x86: asus-nb-wmi: Ignore unknown event 0xCF Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 49/93] scsi: mpt3sas: Diag-Reset when Doorbell-In-Use bit is set during driver load time Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 50/93] virtio-blk: dont keep queue frozen during system suspend Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 51/93] epoll: Add synchronous wakeup support for ep_poll_callback Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 52/93] MIPS: Probe toolchain support of -msym32 Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 53/93] skbuff: introduce skb_expand_head() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 54/93] ipv6: use skb_expand_head in ip6_finish_output2 Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 55/93] ipv6: use skb_expand_head in ip6_xmit Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 56/93] ipv6: fix possible UAF in ip6_finish_output2() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 57/93] bpf: fix recursive lock when verdict program return SK_PASS Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 58/93] tracing: Constify string literal data member in struct trace_event_call Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 59/93] btrfs: avoid monopolizing a core when activating a swap file Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 60/93] skb_expand_head() adjust skb->truesize incorrectly Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 61/93] ipv6: prevent possible UAF in ip6_xmit() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 62/93] selinux: ignore unknown extended permissions Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 63/93] Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 64/93] IB/mlx5: Introduce and use mlx5_core_is_vf() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 65/93] net/mlx5: Make API mlx5_core_is_ecpf accept const pointer Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 66/93] RDMA/mlx5: Enforce same type port association for multiport RoCE Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 67/93] RDMA/bnxt_re: Add check for path mtu in modify_qp Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 68/93] RDMA/bnxt_re: Fix reporting hw_ver in query_device Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 69/93] RDMA/bnxt_re: Fix max_qp_wrs reported Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 70/93] drm: bridge: adv7511: Enable SPDIF DAI Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 71/93] drm/bridge: adv7511_audio: Update Audio InfoFrame properly Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 72/93] netrom: check buffer length before accessing it Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 73/93] netfilter: Replace zero-length array with flexible-array member Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 74/93] netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 75/93] net: llc: reset skb->transport_header Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 76/93] ALSA: usb-audio: US16x08: Initialize array before use Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 77/93] af_packet: fix vlan_get_tci() vs MSG_PEEK Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 78/93] af_packet: fix vlan_get_protocol_dgram() " Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 79/93] ila: serialize calls to nf_register_net_hooks() Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 80/93] wifi: mac80211: wake the queues in case of failure in resume Greg Kroah-Hartman
2025-01-06 15:17 ` Greg Kroah-Hartman [this message]
2025-01-06 15:17 ` [PATCH 5.4 82/93] bpf: fix potential error return Greg Kroah-Hartman
2025-01-06 15:17 ` [PATCH 5.4 83/93] net: usb: qmi_wwan: add Telit FE910C04 compositions Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 84/93] irqchip/gic: Correct declaration of *percpu_base pointer in union gic_base Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 85/93] ARC: build: Try to guess GCC variant of cross compiler Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 86/93] modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 87/93] modpost: fix the missed iteration for the max bit in do_input() Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 88/93] RDMA/uverbs: Prevent integer overflow issue Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 89/93] pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 90/93] sky2: Add device ID 11ab:4373 for Marvell 88E8075 Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 91/93] net/sctp: Prevent autoclose integer overflow in sctp_association_init() Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 92/93] drm: adv7511: Drop dsi single lane support Greg Kroah-Hartman
2025-01-06 15:18 ` [PATCH 5.4 93/93] mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim() Greg Kroah-Hartman
2025-01-06 18:58 ` [PATCH 5.4 00/93] 5.4.289-rc1 review Florian Fainelli
2025-01-07 12:43 ` Jon Hunter
2025-01-07 13:50 ` Naresh Kamboju
2025-01-07 23:16 ` Shuah Khan
2025-01-08 13:00 ` Muhammad Usama Anjum
2025-01-09 10:12   ` Greg Kroah-Hartman
2025-01-09 14:10     ` Muhammad Usama Anjum
2025-01-09 14:14       ` Mark Brown
2025-01-08 14:13 ` Harshit Mogalapalli

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=20250106151131.763665445@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=adrian.ratiu@collabora.com \
    --cc=patches@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).