diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-10-07 10:35:28 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-10-07 12:25:21 +0200 |
commit | 59d7f5f6ddbc23f6ca4a0523c85dc18f027c80d9 (patch) | |
tree | 576d2bd73c1d2d04add23b70a59756627145032e /sound/usb/pcm.c | |
parent | ALSA: pcm: Add more disconnection checks at file ops (diff) | |
download | linux-59d7f5f6ddbc23f6ca4a0523c85dc18f027c80d9.tar.xz linux-59d7f5f6ddbc23f6ca4a0523c85dc18f027c80d9.zip |
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.
Link: https://lore.kernel.org/r/20211007083528.4184-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/pcm.c')
-rw-r--r-- | sound/usb/pcm.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |