1. 31 5月, 2016 2 次提交
  2. 04 3月, 2016 1 次提交
  3. 14 10月, 2015 1 次提交
  4. 27 9月, 2015 1 次提交
  5. 05 8月, 2015 1 次提交
    • F
      usb: gadget: f_uac2: fix build warning · 0f4315a8
      Felipe Balbi 提交于
      commit 913e4a90 ("usb: gadget: f_uac2:
      finalize wMaxPacketSize according to bandwidth")
      added a possible build warning when calling
      min(). In order to fix the warning, we just
      make sure to call min_t() and tell that its
      arguments should be u16.
      
      Cc: Peter Chen <peter.chen@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      0f4315a8
  6. 31 7月, 2015 1 次提交
  7. 27 7月, 2015 1 次提交
  8. 23 2月, 2015 1 次提交
    • L
      usb: gadget: function: f_uac2: fix sparse warnings · ef16e7c8
      Lad, Prabhakar 提交于
      this patch fixes following sparse warnings:
      f_uac2.c:57:12: warning: symbol 'uac2_name' was not declared. Should it be static?
      f_uac2.c:637:36: warning: symbol 'in_clk_src_desc' was not declared. Should it be static?
      f_uac2.c:649:36: warning: symbol 'out_clk_src_desc' was not declared. Should it be static?
      f_uac2.c:661:39: warning: symbol 'usb_out_it_desc' was not declared. Should it be static?
      f_uac2.c:675:39: warning: symbol 'io_in_it_desc' was not declared. Should it be static?
      f_uac2.c:689:40: warning: symbol 'usb_in_ot_desc' was not declared. Should it be static?
      f_uac2.c:703:40: warning: symbol 'io_out_ot_desc' was not declared. Should it be static?
      f_uac2.c:716:34: warning: symbol 'ac_hdr_desc' was not declared. Should it be static?
      f_uac2.c:754:34: warning: symbol 'as_out_hdr_desc' was not declared. Should it be static?
      f_uac2.c:767:38: warning: symbol 'as_out_fmt1_desc' was not declared. Should it be static?
      f_uac2.c:775:32: warning: symbol 'fs_epout_desc' was not declared. Should it be static?
      f_uac2.c:785:32: warning: symbol 'hs_epout_desc' was not declared. Should it be static?
      f_uac2.c:831:34: warning: symbol 'as_in_hdr_desc' was not declared. Should it be static?
      f_uac2.c:844:38: warning: symbol 'as_in_fmt1_desc' was not declared. Should it be static?
      f_uac2.c:852:32: warning: symbol 'fs_epin_desc' was not declared. Should it be static?
      f_uac2.c:862:32: warning: symbol 'hs_epin_desc' was not declared. Should it be static?
      f_uac2.c:1566:21: warning: symbol 'afunc_alloc' was not declared. Should it be static?
      Signed-off-by: NLad, Prabhakar <prabhakar.csengg@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ef16e7c8
  9. 24 10月, 2014 1 次提交
  10. 21 10月, 2014 3 次提交
    • F
      usb: gadget: function: uac2: add a release method · de1e6e79
      Felipe Balbi 提交于
      devices are required to provide a release method. This
      patch fixes the following WARN():
      
      [   42.611159] ------------[ cut here ]------------
      [   42.616025] WARNING: CPU: 0 PID: 1453 at drivers/base/core.c:250 device_release+0x94/0xa0()
      [   42.624820] Device 'snd_uac2.0' does not have a release() function, it is broken and must be fixed.
      [   42.634328] Modules linked in: usb_f_uac2 g_audio(-) libcomposite configfs xhci_hcd snd_soc_davinci_mcasp snd_soc_edma snd_soc_tlv320aic3x snd_soc_omap snd_soc_evm snd_soc_core dwc3 snd_compress omapdrm snd_pcm_dmaengine snd_pcm snd_timer snd fb_sys_fops lis3lv02d_i2c matrix_keypad dwc3_omap lis3lv02d panel_dpi input_polldev soundcore
      [   42.665687] CPU: 0 PID: 1453 Comm: modprobe Tainted: G      D        3.17.0-rc6-00448-g9f3d0ec-dirty #188
      [   42.675756] [<c0017338>] (unwind_backtrace) from [<c0012fdc>] (show_stack+0x20/0x24)
      [   42.683911] [<c0012fdc>] (show_stack) from [<c0647fbc>] (dump_stack+0x8c/0xa4)
      [   42.691526] [<c0647fbc>] (dump_stack) from [<c0049950>] (warn_slowpath_common+0x7c/0xa0)
      [   42.700004] [<c0049950>] (warn_slowpath_common) from [<c00499b4>] (warn_slowpath_fmt+0x40/0x48)
      [   42.709194] [<c00499b4>] (warn_slowpath_fmt) from [<c0405f7c>] (device_release+0x94/0xa0)
      [   42.717794] [<c0405f7c>] (device_release) from [<c032e8e8>] (kobject_cleanup+0x4c/0x7c)
      [   42.726189] [<c032e8e8>] (kobject_cleanup) from [<c032e7c8>] (kobject_put+0x60/0x90)
      [   42.734316] [<c032e7c8>] (kobject_put) from [<c0406320>] (put_device+0x24/0x28)
      [   42.741995] [<c0406320>] (put_device) from [<c040c008>] (platform_device_unregister+0x2c/0x30)
      [   42.751061] [<c040c008>] (platform_device_unregister) from [<bf2b6b70>] (afunc_unbind+0x2c/0x68 [usb_f_uac2])
      [   42.761523] [<bf2b6b70>] (afunc_unbind [usb_f_uac2]) from [<bf29dbec>] (remove_config.isra.8+0xe8/0x100 [libcomposite])
      [   42.772868] [<bf29dbec>] (remove_config.isra.8 [libcomposite]) from [<bf29f9a4>] (__composite_unbind+0x48/0xb0 [libcomposite])
      [   42.784855] [<bf29f9a4>] (__composite_unbind [libcomposite]) from [<bf29fa28>] (composite_unbind+0x1c/0x20 [libcomposite])
      [   42.796446] [<bf29fa28>] (composite_unbind [libcomposite]) from [<c04d229c>] (usb_gadget_remove_driver+0x78/0xb0)
      [   42.807224] [<c04d229c>] (usb_gadget_remove_driver) from [<c04d2348>] (usb_gadget_unregister_driver+0x74/0xb8)
      [   42.817742] [<c04d2348>] (usb_gadget_unregister_driver) from [<bf29db00>] (usb_composite_unregister+0x1c/0x20 [libcomposite])
      [   42.829632] [<bf29db00>] (usb_composite_unregister [libcomposite]) from [<bf2b1084>] (audio_driver_exit+0x14/0x1c [g_audio])
      [   42.841430] [<bf2b1084>] (audio_driver_exit [g_audio]) from [<c00c0fe0>] (SyS_delete_module+0x120/0x1b0)
      [   42.851415] [<c00c0fe0>] (SyS_delete_module) from [<c000ed40>] (ret_fast_syscall+0x0/0x48)
      [   42.860075] ---[ end trace bb22e678d8d6db7b ]---
      root@saruman:~#
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      de1e6e79
    • F
      usb: gadget: function: uac2: prevent double ep disable · f3bb7b29
      Felipe Balbi 提交于
      without this check, f_uac2 would try to disable
      the same endpoint twice. Fix that.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      f3bb7b29
    • F
      usb: gadget: function: uac2: add wMaxPacketSize to ep desc · 703a303c
      Felipe Balbi 提交于
      Endpoint descriptors should pass wMaxPacketSize. Note
      that this also fixes USB20CV Other Speed Endpoint
      Descriptor Tests.
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      703a303c
  11. 02 9月, 2014 5 次提交
    • D
      usb: gadget: f_uac2: send reasonably sized packets · 9bb87f16
      Daniel Mack 提交于
      The UAC2 function driver currently responds to all packets at all times
      with wMaxPacketSize packets. That results in way too fast audio
      playback as the function driver (which is in fact supposed to define
      the audio stream pace) delivers as fast as it can.
      
      Fix this by sizing each packet correctly with the following steps:
      
       a) Set the packet's size by dividing the nominal data rate by the
          playback endpoint's interval.
      
       b) If there is a residual value from the calculation in a), add
          it to a accumulator to keep track of it across packets.
      
       c) If the accumulator has gathered at least the number of bytes
          that are needed for one sample frame, increase the packet size.
      
      This way, the packet size calculation will get rid of any kind of
      imprecision that would otherwise occur with a simple division over
      time.
      
      Some of the variables that are needed while processing each packet
      are pre-computed for performance reasons.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9bb87f16
    • D
      usb: gadget: f_uac2: handle partial dma area wrap · ec9e4313
      Daniel Mack 提交于
      With packet sizes other than 512, payloads in the packets may wrap
      around the ALSA dma buffer partially, which leads to memory corruption
      and audible clicks and pops in the audio stream at the moment, because
      there is no boundary check before the memcpy().
      
      In preparation to an implementation for smaller and dynamically sized
      packets, we have to address such cases, and copy the payload in two
      steps conditionally.
      
      The 'src' and 'dst' approach doesn't work here anymore, as different
      behavior is necessary in playback and capture cases. Thus, this patch
      open-codes the routine now.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      ec9e4313
    • D
      usb: gadget: f_uac2: introduce agdev_to_uac2_opts · 254b3bf6
      Daniel Mack 提交于
      Add a simple container_of() wrapper to get a struct f_uac2_opts from a
      struct struct audio_dev. Use it in two places where it is currently
      open-coded.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      254b3bf6
    • D
      usb: gadget: f_uac2: add short-hand for 'dev' · a8147dab
      Daniel Mack 提交于
      In afunc_bind() and afunc_set_alt(), &uac2->pdev.dev are used multiple
      times. Adding a short-hand for them makes lines shorter so we can
      remove some line wraps.
      
      No functional change.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      a8147dab
    • D
      usb: gadget: f_uac2: restructure some code in afunc_set_alt() · 430fdbd3
      Daniel Mack 提交于
      Restructure some code to make it easier to read.
      
      While at it, return -ENOMEM instead of -EINVAL if
      usb_ep_alloc_request() fails, and omit the logging in such cases
      (the mm core will complain loud enough).
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      430fdbd3
  12. 21 8月, 2014 5 次提交
  13. 17 7月, 2014 2 次提交
  14. 15 5月, 2014 1 次提交
    • A
      usb: gadget: f_uac2: don't queue new requests when shutting down · 1ade5d7e
      Andrzej Pietrasiewicz 提交于
      In some circumstances when g_audio is being unloaded there happens
      an endless loop in udc driver. It has happend on a board with
      s3c-hsotg. If there are requests in endpoint's queue, they are completed
      in a loop. But completing them might cause appending new requests
      to the queue. This patch causes agdev_iso_complete() to return immediately
      if request's status is -ESHUTDOWN. If it does not return immediately,
      then although the current request is removed from the queue, a new one
      is appended to the queue, so the above mentioned loop cannot end.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1ade5d7e
  15. 14 5月, 2014 1 次提交
  16. 14 2月, 2014 1 次提交
  17. 10 6月, 2013 1 次提交
  18. 15 5月, 2013 1 次提交
  19. 22 1月, 2013 1 次提交
  20. 10 1月, 2013 1 次提交
  21. 22 11月, 2012 1 次提交
  22. 31 10月, 2012 6 次提交
  23. 10 9月, 2012 1 次提交
    • S
      usb: gadget: remove __devexit in f_uac2 · 1e1a27c3
      Sebastian Andrzej Siewior 提交于
      avoids the following section missmatch
      |WARNING: drivers/usb/gadget/g_audio.o(.init.text+0x2e7): Section
      |mismatch in reference from the function afunc_bind() to the function
      |.devexit.text:snd_uac2_remove()
      |The function __init afunc_bind() references
      |a function __devexit snd_uac2_remove().
      |This is often seen when error handling in the init function
      |uses functionality in the exit path.
      |The fix is often to remove the __devexit annotation of
      |snd_uac2_remove() so it may be used outside an exit section.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      1e1a27c3