[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1067033: linux-image-amd64: I want to chose capture yes or not in alsa



Package: linux-image-amd64
Version: 5.10.209-2
Severity: wishlist
Tags: patch
X-Debbugs-Cc: corcodel.marian@gmail.com




-- System Information:
Debian Release: 11.9
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500,
'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.2.10+ (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages linux-image-amd64 depends on:
ii  linux-image-5.10.0-28-amd64  5.10.209-2

linux-image-amd64 recommends no packages.

linux-image-amd64 suggests no packages.

Hi i am DAC audio without capture part and follow patch ignore searching input
maps on snd_audio_usb.
This patch is only for personal use, and experimental and not follow any rules
,apply for your risk!
>From 8c59a45bfbbbef02b01526a70b81153f1f28ccbe Mon Sep 17 00:00:00 2001
From: Corcodel Marian <corcodel.marian@gmail.com>
Date: Mon, 11 Mar 2024 19:11:09 +0100
Subject: [PATCH] iuytrertyujok[poiuytr54

---
 sound/usb/Kconfig  | 5 +++++
 sound/usb/stream.c | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/sound/usb/Kconfig b/sound/usb/Kconfig
index 059242f15..d1b4476dd 100644
--- a/sound/usb/Kconfig
+++ b/sound/usb/Kconfig
@@ -26,6 +26,11 @@ config SND_USB_AUDIO
 
 config SND_USB_AUDIO_USE_MEDIA_CONTROLLER
 	bool
+	
+config SND_USB_AUDIO_SUPPRESS_CAPTURE
+	bool  "Without capture on DAC"
+	help
+	  Say Y here when not want capture on DAC.
 
 config SND_USB_UA101
 	tristate "Edirol UA-101/UA-1000 driver"
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index f10f4e6d3..f9334f3eb 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -1126,8 +1126,15 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip,
 		    USB_ENDPOINT_XFER_ISOC)
 			continue;
 		/* check direction */
+#ifdef CONFIG_SND_USB_AUDIO_SUPPRESS_CAPTURE
+		if (get_endpoint(alts, 0)->bEndpointAddress & USB_DIR_IN)
+			continue;
+		if (get_endpoint(alts, 0)->bEndpointAddress & USB_DIR_OUT)
+			stream = SNDRV_PCM_STREAM_PLAYBACK;
+#else
 		stream = (get_endpoint(alts, 0)->bEndpointAddress & USB_DIR_IN) ?
 			SNDRV_PCM_STREAM_CAPTURE : SNDRV_PCM_STREAM_PLAYBACK;
+#endif
 		altno = altsd->bAlternateSetting;
 
 		if (snd_usb_apply_interface_quirk(chip, iface_no, altno))
-- 
2.30.2


Reply to: