All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: usb-audio: Pass JOINT_DUPLEX info flag for implicit fb streams
@ 2021-10-07  8:35 Takashi Iwai
  0 siblings, 0 replies; only message in thread
From: Takashi Iwai @ 2021-10-07  8:35 UTC (permalink / raw)
  To: alsa-devel

When a stream is in the implicit feedback mode, it's more or less tied
with a capture stream.  Passing SNDRV_PCM_INFO_JOINT_DUPLEX may help
for user-space to understand the situation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/usb/pcm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index f09c7380a923..3bb095a3c9b6 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1080,6 +1080,13 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre
 	if (err < 0)
 		return err;
 
+	list_for_each_entry(fp, &subs->fmt_list, list) {
+		if (fp->implicit_fb) {
+			runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX;
+			break;
+		}
+	}
+
 	return 0;
 }
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-07  8:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07  8:35 [PATCH] ALSA: usb-audio: Pass JOINT_DUPLEX info flag for implicit fb streams Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.