ALSA: usb-audio: fix playback/capture concurrent usage
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest15 patches 16 repliesIn review
- v311 patches 3 repliesSuperseded
- v210 patches 7 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 9 patches | 2 replies | Superseded |
Changes in v4 from the cover letter
* Added substream "used" flag, to prevent failure in some combinations of ops. (#13)
* Moved start_endpoints for capture to prepare (#14)
* Added more constraints to the endpoint_may_set_params function (#10)
* Cleanups (#12, #15)
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | ALSA: usb-audio: remove unused parameter from sync_ep_set_paramssound/ | +2 | 0 replies | |
| 2/15 | ALSA: usb-audio: remove deactivate_endpoints()sound/ | +2 | 0 replies | |
| 3/15 | ALSA: usb-audio: prevent NULL dereference on stop triggersound/ | +8 | 1 reply | |
| 4/15 | ALSA: usb-audio: don't deactivate URBs on in-use EPsound/ | +3 | 0 replies | |
| 5/15 | ALSA: usb-audio: void return type of snd_usb_endpoint_deactivate()sound/ sound/ | +6 | 0 replies | |
| 6/15 | ALSA: usb-audio: clear SUBSTREAM_FLAG_SYNC_EP_STARTED on errorsound/ | +1 | 0 replies | |
| 7/15 | ALSA: usb-audio: correct ep use_count semantics (add set_param flag)sound/ sound/ | +6 | 3 replies | |
| 8/15 | ALSA: usb-audio: rename alt_idx to altsettingsound/ sound/ sound/ | +7 | 0 replies | |
| 9/15 | ALSA: usb-audio: conditional interface altsettingsound/ | +60 | 4 replies | |
| 10/15 | ALSA: usb-audio: conditional concurrent usage of endpointsound/ sound/ sound/ | +114 | 0 replies | |
| 11/15 | ALSA: usb-audio: remove altset_idx from snd_usb_substreamsound/ sound/ sound/ +1 more | +7 | 0 replies | |
| 12/15 | ALSA: usb-audio: remove unused endpoint flag EP_FLAG_ACTIVATEDsound/ | +0 | 0 replies | |
| 13/15 | ALSA: usb-audio: clear sync subs hw_paramssound/ sound/ | +25 | 0 replies | |
| 14/15 | ALSA: usb-audio: always wait in start_endpointssound/ sound/ sound/ | +16 | 4 replies | |
| 15/15 | ALSA: usb-audio: improve logging messagessound/ sound/ | +9 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 00/15] ALSA: usb-audio: fix playback/capture concurrent usage
Hi,
This patch series attempts to fix a long standing problem with the concurrent usage of playback and capture on implicit feedback devices.
Now the following work properly on my system:
* Full-duplex with jack :)
* All tests I ran with my tool. Will post it in case anyone want to try it, it takes about 15 minutes to run all the tests.
* Starting a capture-only jackd instance, e.g.:
jackd -n 1 -d alsa -d hw:2,0 -C
and then playback-only:
jackd -n 2 -d alsa -d hw:2,0 -P and then stop and start the playback.
The same with playback running and restarting capture.
* Trying to start a second substream with parameter mismatch (rate or period bytes is all I can test with my device) will fail, without ill effects.
With this series applied there are now 3 usage tracking variables:
- substream usage flag
- endpoint param_set (to protect the parameters until the endpoint is started)
- the existing endpoint use_count
Changes from v3:
* Added substream "used" flag, to prevent failure in some combinations of ops. (#13)
* Moved start_endpoints for capture to prepare (#14)
* Added more constraints to the endpoint_may_set_params function (#10)
* Cleanups (#12, #15)
v3:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-August/065744.html
Applies against for-next, tested on upstream 3.12-rc3 (needs Alan Stern's recent patch "improve buffer size computations for USB PCM audio" to apply cleanly on current mainline).
Daniel and Nikolay: if you can test again with this series I'd appreciate it.
Cheers,
Eldad
Eldad Zack (15):
ALSA: usb-audio: remove unused parameter from sync_ep_set_params
ALSA: usb-audio: remove deactivate_endpoints()
ALSA: usb-audio: prevent NULL dereference on stop trigger
ALSA: usb-audio: don't deactivate URBs on in-use EP
ALSA: usb-audio: void return type of snd_usb_endpoint_deactivate()
ALSA: usb-audio: clear SUBSTREAM_FLAG_SYNC_EP_STARTED on error
ALSA: usb-audio: correct ep use_count semantics (add set_param flag)
ALSA: usb-audio: rename alt_idx to altsetting
ALSA: usb-audio: conditional interface altsetting
ALSA: usb-audio: conditional concurrent usage of endpoint
ALSA: usb-audio: remove altset_idx from snd_usb_substream
ALSA: usb-audio: remove unused endpoint flag EP_FLAG_ACTIVATED
ALSA: usb-audio: clear sync subs hw_params
ALSA: usb-audio: always wait in start_endpoints
ALSA: usb-audio: improve logging messages
sound/usb/card.h | 9 ++- sound/usb/endpoint.c | 122 ++++++++++++++++++++--------- sound/usb/endpoint.h | 13 +++- sound/usb/pcm.c | 214 ++++++++++++++++++++++++++++++++++++--------------- sound/usb/pcm.h | 2 + sound/usb/proc.c | 4 +- 6 files changed, 258 insertions(+), 106 deletions(-)
Signature · 1 line
1.8.1.5