Skip to content
Snippets Groups Projects
  1. Aug 02, 2021
    • Takashi Iwai's avatar
      ALSA: usb-audio: Introduce quirk_flags field · 4d4dee0a
      Takashi Iwai authored
      As more and more device-specific workarounds came up and gathered in
      various places, it becomes harder to manage.  Now it's time to clean
      up and collect workarounds more consistently and make them more easily
      applicable.
      
      This patch is the first step for that: a new field quirk_flags is
      introduced in snd_usb_audio struct to contain the bit flags for
      various device-specific quirks.  Those are separate one from the
      quirks in quirks-table.h; the quirks-table.h entries are for more
      intrusive stuff that needs the descriptor override, while the new
      quirk_flags is for easier ones that are tied with the vendor:product
      IDs.
      
      In this patch, as the first example, we convert the list of devices
      and vendors to ignore GET_SAMPLE_RATE, formerly defined in
      snb_usb_get_sample_rate_quirk().
      
      Link: https://lore.kernel.org/r/20210729073855.19043-2-tiwai@suse.de
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4d4dee0a
  2. Jul 24, 2021
    • chihhao.chen's avatar
      ALSA: usb-audio: fix incorrect clock source setting · 4511781f
      chihhao.chen authored
      
      The following scenario describes an echo test for
      Samsung USBC Headset (AKG) with VID/PID (0x04e8/0xa051).
      
      We first start a capture stream(USB IN transfer) in 96Khz/24bit/1ch mode.
      In clock find source function, we get value 0x2 for clock selector
      and 0x1 for clock source.
      
      Kernel-4.14 behavior
      Since clock source is valid so clock selector was not set again.
      We pass through this function and start a playback stream(USB OUT transfer)
      in 48Khz/32bit/2ch mode. This time we get value 0x1 for clock selector
      and 0x1 for clock source. Finally clock id with this setting is 0x9.
      
      Kernel-5.10 behavior
      Clock selector was always set one more time even it is valid.
      When we start a playback stream, we will get 0x2 for clock selector
      and 0x1 for clock source. In this case clock id becomes 0xA.
      This is an incorrect clock source setting and results in severe noises.
      We see wrong data rate in USB IN transfer.
      (From 288 bytes/ms becomes 144 bytes/ms) It should keep in 288 bytes/ms.
      
      This earphone works fine on older kernel version load because
      this is a newly-added behavior.
      
      Fixes: d2e8f641 ("ALSA: usb-audio: Explicitly set up the clock selector")
      Signed-off-by: default avatarchihhao.chen <chihhao.chen@mediatek.com>
      Link: https://lore.kernel.org/r/1627100621-19225-1-git-send-email-chihhao.chen@mediatek.com
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4511781f
  3. Jun 10, 2021
  4. May 21, 2021
  5. May 19, 2021
  6. Apr 13, 2021
  7. Feb 27, 2021
  8. Jan 21, 2021
  9. Jan 18, 2021
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints · 87cb9af9
      Takashi Iwai authored
      The current sample rate setup function for UAC1 assumes only the first
      endpoint retrieved from the interface:altset pair, but the rate set up
      may be needed also for the secondary endpoint.  Also, retrieving the
      endpoint number from the interface descriptor is redundant; we have
      already the target endpoint in the given audioformat object.
      
      This patch simplifies the code and corrects the target endpoint as
      described in the above.  It simply refers to fmt->endpoint directly.
      
      Also, this patch drops the pioneer_djm_set_format_quirk() that is
      caleld from snd_usb_set_format_quirk(); this function does the sample
      rate setup but for the capture endpoint (0x82), and that's exactly
      what the change above fixes.
      
      Link: https://lore.kernel.org/r/20210118075816.25068-2-tiwai@suse.de
      
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      87cb9af9
  10. Dec 18, 2020
  11. Nov 23, 2020
  12. Jul 09, 2020
  13. Mar 06, 2020
  14. Feb 13, 2020
  15. Oct 30, 2019
  16. Aug 22, 2019
  17. May 30, 2019
  18. Jul 19, 2018
  19. May 28, 2018
  20. May 13, 2018
    • Ruslan Bilovol's avatar
      ALSA: usb: add UAC3 BADD profiles support · 17156f23
      Ruslan Bilovol authored
      
      Recently released USB Audio Class 3.0 specification
      contains BADD (Basic Audio Device Definition) document
      which describes pre-defined UAC3 configurations.
      
      BADD support is mandatory for UAC3 devices, it should be
      implemented as a separate USB device configuration.
      As per BADD document, class-specific descriptors
      shall not be included in the Device’s Configuration
      descriptor ("inferred"), but host can guess them
      from BADD profile number, number of endpoints and
      their max packed sizes.
      
      This patch adds support of all BADD profiles from the spec
      
      Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
      Tested-by: default avatarJorge Sanjuan <jorge.sanjuan@codethink.co.uk>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      17156f23
  21. Apr 07, 2018
  22. Mar 23, 2018
    • Andrew Chant's avatar
      ALSA: usb-audio: fix uac control query argument · 21e9b3e9
      Andrew Chant authored
      
      This patch fixes code readability and should have no functional change.
      
      Correct uac control query functions to account for the 1-based indexing
      of USB Audio Class control identifiers.
      
      The function parameter, u8 control, should be the
      constant defined in audio-v2.h to identify the control to be checked for
      readability or writeability.
      
      This patch fixes all callers that had adjusted, and makes explicit
      the mapping between audio_feature_info[] array index and the associated
      control identifier.
      
      Signed-off-by: default avatarAndrew Chant <achant@google.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      21e9b3e9
  23. Mar 21, 2018
    • Ruslan Bilovol's avatar
      ALSA: usb: initial USB Audio Device Class 3.0 support · 9a2fe9b8
      Ruslan Bilovol authored
      
      Recently released USB Audio Class 3.0 specification
      introduces many significant changes comparing to
      previous versions, like
       - new Power Domains, support for LPM/L1
       - new Cluster descriptor
       - changed layout of all class-specific descriptors
       - new High Capability descriptors
       - New class-specific String descriptors
       - new and removed units
       - additional sources for interrupts
       - removed Type II Audio Data Formats
       - ... and many other things (check spec)
      
      It also provides backward compatibility through
      multiple configurations, as well as requires
      mandatory support for BADD (Basic Audio Device
      Definition) on each ADC3.0 compliant device
      
      This patch adds initial support of UAC3 specification
      that is enough for Generic I/O Profile (BAOF, BAIF)
      device support from BADD document.
      
      Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9a2fe9b8
  24. Nov 21, 2017
  25. Apr 29, 2016
    • Takashi Iwai's avatar
      ALSA: usb-audio: Limit retrying sample rate reads · 57dd5414
      Takashi Iwai authored
      
      There are many USB audio devices with buggy firmware that don't react
      with the sample rate reading properly.  This often results in the
      flood of error messages and slowing down the operation.
      
      The sample rate read back is basically only for confirming the sample
      rate setup, and it's not critically important.  As a compromise, in
      this patch, we stop the sample rate read back once when the device
      gives errors more than tolerance (twice, as of now).  This should
      improve most of error cases while we still can catch the firmware
      bugginess.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      57dd5414
  26. Mar 16, 2016
  27. Feb 17, 2015
    • Joe Turner's avatar
      ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate · b62b9980
      Joe Turner authored
      
      Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate.
      
      This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound.
      
      [minor tidy up by tiwai]
      
      Signed-off-by: default avatarJoe Turner <joe@oampo.co.uk>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b62b9980
  28. Feb 26, 2014
    • Takashi Iwai's avatar
      ALSA: usb-audio: Use standard printk helpers · 0ba41d91
      Takashi Iwai authored
      
      Convert with dev_err() and co from snd_printk(), etc.
      As there are too deep indirections (e.g. ep->chip->dev->dev),
      a few new local macros, usb_audio_err() & co, are introduced.
      
      Also, the device numbers in some messages are dropped, as they are
      shown in the prefix automatically.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      0ba41d91
  29. Jun 27, 2013
  30. Apr 26, 2013
  31. Apr 10, 2013
  32. Apr 04, 2013
Loading