Re: [EXT] Re: Simultaneous play/record on implicit feedback device causes 'endpoint in use' error

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

 



В Пт, 02/11/2018 в 16:57 +0100, Takashi Iwai пишет:
> On Wed, 31 Oct 2018 20:45:07 +0100,
> Robert Giaraffa wrote:
> > Thank you very much for your prompt response.
> > 
> > I tested the CP2615 and Fast Track Ultra by running aplay and
> > arecord
> > sequentially on my RPi2 v4.14.72 (with patched snd-usb-audio.ko
> > that includes
> > implicit feedback quirk for CP2615).  Although there were minor
> > differences in
> > the system logs for the two devices (e.g. ‘cannot submit urb’), but
> > otherwise
> > both devices behaved the same: whichever operation is started last
> > resulted in
> > the 'Endpoint already in use' error, regardless of
> > sequence.  Detailed info
> > below:
> 
> OK, so we obviously don't support the full duplex in this mode.
> 
> As a first step, could you try the simple patch below, and test in a
> sequence record -> playback?  At least it should skip the check, and
> proceed further.
> 
> 
> thanks,
> 
> Takashi
> 
> --- a/sound/usb/pcm.c
> +++ b/sound/usb/pcm.c
> @@ -639,6 +639,10 @@ static int configure_sync_endpoint(struct
> snd_usb_substream *subs)
>  						   subs->cur_audiofmt,
>  						   NULL);
>  
> +	if (subs->sync_endpoint->type == SND_USB_ENDPOINT_TYPE_DATA &&
> +	    subs->sync_endpoint->use_count)
> +		return 0;
> +
>  	/* Try to find the best matching audioformat. */
>  	list_for_each_entry(fp, &sync_subs->fmt_list, list) {
>  		int score = match_endpoint_audioformats(subs,

Well, this works... sort of:

[  107.368218] usb 5-1: setting usb interface 2:1
[  107.368225] usb 5-1: Creating new capture data endpoint #81
[  107.834139] usb 5-1: Setting params for ep #81 (type 0, 12 urbs),
ret=0
[  107.834272] usb 5-1: Starting data EP @00000000a802b8ef
[  110.296773] usb 5-1: setting usb interface 1:1
[  110.296779] usb 5-1: Creating new playback data endpoint #1
[  110.296811] usb 5-1: Re-using EP 81 in iface 2,1 @00000000a802b8ef
[  110.298381] usb 5-1: Setting params for ep #1 (type 0, 12 urbs),
ret=0
[  110.298385] usb 5-1: Starting data EP @00000000b2e4f53f
[  110.300585] usb 5-1: Starting sync EP @00000000a802b8ef


but aplay aborts after several seconds:

$ LANG=C aplay -c 4 -r 48000 -f S32_LE -D hw:M4,0 test48000.wav 
Playing WAVE 'test48000.wav' : Signed 32 bit Little Endian, Rate 48000
Hz, Channels 4
aplay: pcm_write:2053: write error: Input/output error



And an interesting note: jack is the only app that can use the card
with implicit feedback in full duplex mode even without that patch.


> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@xxxxxxxxxxxxxxxx
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux