Skip to content

ALSA: usb-audio: Refactor set_format()

Eldad Zack alsa-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 2 repliesIn review
  2. v1 RFC10 patches 2 repliesSuperseded

Changes from v2 from the cover letter

* Cleaned up the patchset, indentations and whitespace fixes.
* Patch #2: removed early returns when subs->sync_endpoint is already set. This change now follows original semantics.
* Patch #9: I first corrected it thanks to Clemens Ladisch's feedback, but then I wasn't sure if it improves anything, so I dropped it entirely.
* Dropped patch #10. Instead, added patch (now #9) to WARN_ON and return NULL in snd_usb_add_endpoint. Otherwise, the check should be done at each call site, and it "shouldn't happen" anyway.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9ALSA: usb-audio: remove disabled debug code in set_formatsound/usb/pcm.c+0 -90 replies
2/9ALSA: usb-audio: remove assignment from if conditionsound/usb/pcm.c+2 -10 replies
3/9ALSA: usb-audio: separate sync endpoint setting from set_formatsound/usb/pcm.c+73 -550 replies
4/9ALSA: usb-audio: move implicit fb quirks to separate functionsound/usb/pcm.c+45 -150 replies
5/9ALSA: usb-audio: reverse condition logic in set_sync_endpointsound/usb/pcm.c+42 -390 replies
6/9ALSA: usb-audio: do not initialize and check implicit_fbsound/usb/pcm.c+3 -50 replies
7/9ALSA: usb-audio: remove is_playback from implicit feedback quirkssound/usb/pcm.c+19 -210 replies
7/9ALSA: usb-audio: remove is_playback from implicit feedback quirkssound/usb/pcm.c+19 -211 reply
8/9ALSA: usb-audio: remove implicit_fb from quirksound/usb/pcm.c+1 -70 replies
9/9ALSA: usb-audio: WARN_ON when alts is passed as NULLsound/usb/endpoint.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/9] ALSA: usb-audio: Refactor set_format()

Hi Takashi,

This is a low-priority series (applies against current for-next). This series refactors set_format() and moves the sync endpoint initilization code into separate function. The quirks for implicit feedback are moved to a separate function as well.

The intended result is code that is easier to read without function changes.

Changes from v2:
* Cleaned up the patchset, indentations and whitespace fixes.
* Patch #2: removed early returns when subs->sync_endpoint is already set. This change now follows original semantics.
* Patch #9: I first corrected it thanks to Clemens Ladisch's feedback, but then I wasn't sure if it improves anything, so I dropped it entirely.
* Dropped patch #10. Instead, added patch (now #9) to WARN_ON and return NULL in snd_usb_add_endpoint. Otherwise, the check should be done at each call site, and it "shouldn't happen" anyway.

Cheers,
Eldad

v1:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-July/064268.html

Eldad Zack (9):
ALSA: usb-audio: remove disabled debug code in set_format
ALSA: usb-audio: remove assignment from if condition
ALSA: usb-audio: separate sync endpoint setting from set_format
ALSA: usb-audio: move implicit fb quirks to separate function
ALSA: usb-audio: reverse condition logic in set_sync_endpoint
ALSA: usb-audio: do not initialize and check implicit_fb
ALSA: usb-audio: remove is_playback from implicit feedback quirks
ALSA: usb-audio: remove implicit_fb from quirk
ALSA: usb-audio: WARN_ON when alts is passed as NULL

 sound/usb/endpoint.c |   3 +
 sound/usb/pcm.c      | 243 +++++++++++++++++++++++++++++----------------------
 2 files changed, 141 insertions(+), 105 deletions(-)
Signature · 1 line
1.8.1.5