From: Takashi Iwai <tiwai@suse.de>
To: Erwin Burema <e.burema@freedom.nl>
Cc: alsa-devel@alsa-project.org, Alexander Tsoy <alexander@tsoy.me>
Subject: Re: [PATCH] Add duplex sound support for USB devices using implicit feedback
Date: Sun, 24 May 2020 10:37:34 +0200 [thread overview]
Message-ID: <s5ha71xwwxd.wl-tiwai@suse.de> (raw)
In-Reply-To: <1674042.U9NR2fmVFg@alpha-wolf>
On Sat, 23 May 2020 20:09:31 +0200,
Erwin Burema wrote:
>
> On zaterdag 23 mei 2020 19:53:49 CEST Alexander Tsoy wrote:
> > В Вс, 10/05/2020 в 20:29 +0200, Erwin Burema пишет:
> > > For USB sound devices using implicit feedback the endpoint used for
> > > this feedback should be able to be opened twice, once for required
> > > feedback and second time for audio data. This way these devices can
> > > be put in duplex audio mode. Since this only works if the settings of
> > > the endpoint don't change a check is included for this.
> > >
> > > This fixes bug 207023 ("MOTU M2 regression on duplex audio") and
> > > should also fix bug 103751 ("M-Audio Fast Track Ultra usb audio
> > > device will not operate full-duplex")
> > >
> > > Signed-off-by: Erwin Burema <e.burema@gmail.com>
> > > ---
> >
> > This patch seems to cause kernel panic on my system. This happens
> > during boot when gdm (with pulseaudio) is starting up.
> >
>
> That's interesting, not running gnome (and thus also not running gdm,
> currently KDE with SDDM) here so would need to take some time troubleshooting.
> Suspect I missed something in the check if both input and output are similarly
> configured.
>
> Will see if I can reproduce it and where exactly it goes wrong, in the
> meantime would it be possible to test if 5.6 or later show the same issue
> since I intially developed the patch against that release?
Judging from the point triggering the bug (memset()), this can be a
leftover URB handling that is performed even after the capture stream
is closed. If so, the procedure would be:
- start capture
- start playback
- stop capture while keeping playback running
If my guess is correct, can the patch below work around the issue?
thanks,
Takashi
---
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1782,6 +1782,7 @@ static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream
return 0;
case SNDRV_PCM_TRIGGER_STOP:
stop_endpoints(subs);
+ subs->data_endpoint->retire_data_urb = NULL;
subs->running = 0;
return 0;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
next prev parent reply other threads:[~2020-05-24 8:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-10 18:29 [PATCH] Add duplex sound support for USB devices using implicit feedback Erwin Burema
2020-05-15 17:13 ` Takashi Iwai
2020-05-23 17:53 ` Alexander Tsoy
2020-05-23 18:09 ` Erwin Burema
2020-05-24 8:37 ` Takashi Iwai [this message]
2020-05-26 21:04 ` Erwin Burema
2020-05-27 7:06 ` Takashi Iwai
2020-05-28 13:11 ` Alexander Tsoy
2020-06-01 16:37 ` Alexander Tsoy
2020-06-02 15:15 ` Takashi Iwai
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=s5ha71xwwxd.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alexander@tsoy.me \
--cc=alsa-devel@alsa-project.org \
--cc=e.burema@freedom.nl \
/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