Skip to contentSkip to conversation

ALSA: usb-audio: Pass JOINT_DUPLEX info flag for implicit fb streams

PATCH New Takashi Iwai 1 participant 1 message Oct 7, 2021 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb-audio: Pass JOINT_DUPLEX info flag for implicit fb streams

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.

---
 sound/usb/pcm.c | 7 +++++++
 1 file changed, 7 insertions(+)
sound/usb/pcm.c +7 -0
index f09c7380a923..3bb095a3c9b6 100644
@@ -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;
 }
 
Signature · 1 line
2.31.1