23 Aug, 2013

1 commit

  • ASoC: Updates for v3.12

    - DAPM is now mandatory for CODEC drivers in order to avoid the repeated
    regressions in the special cases for non-DAPM CODECs and make it
    easier to integrate with other components on boards. All existing
    drivers have had some level of DAPM support added.
    - A lot of cleanups in DAPM plus support for maintaining controls in a
    specific state while a DAPM widget all contributed by Lars-Peter Clausen.
    - Core helpers for bitbanged AC'97 reset from Markus Pargmann.
    - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a),
    Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based
    machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung
    Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson
    Microelectronics WM8997.
    - Support for building drivers that can support it cross-platform for
    compile test.

    Takashi Iwai
     

08 Aug, 2013

1 commit

  • The driver used to assume that the streaming endpoint's wMaxPacketSize
    value would be an indication of how much data the endpoint expects or
    sends, and compute the number of packets per URB using this value.

    However, the Focusrite Scarlett 2i4 declares a value of 1024 bytes,
    while only about 88 or 44 bytes are be actually used. This discrepancy
    would result in URBs with far too few packets, which would not work
    correctly on the EHCI driver.

    To get correct URBs, use wMaxPacketSize only as an upper limit on the
    packet size.

    Reported-by: James Stone
    Tested-by: James Stone
    Cc: # 2.6.35+
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

06 Aug, 2013

1 commit


29 Apr, 2013

1 commit

  • The recent changes in the USB API ("implement new semantics for
    URB_ISO_ASAP") made the former meaning of the URB_ISO_ASAP flag the
    default, and changed this flag to mean that URBs can be delayed.
    This is not the behaviour wanted by any of the audio drivers because
    it leads to discontinuous playback with very small period sizes.
    Therefore, our URBs need to be submitted without this flag.

    Reported-by: Joe Rayhawk
    Cc: # 3.8 only
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

18 Apr, 2013

1 commit

  • In order to provide a compatibility way for pushing DSD
    samples through ordinary PCM channels, the "DoP open Standard" was
    invented. See http://www.dsd-guide.com for the official document.

    The host is required to stuff DSD marker bytes (0x05, 0xfa,
    alternating) in the MSB of 24 bit wide samples on the bus, in addition
    to the 16 bits of actual DSD sample payload.

    To support this, the hardware and software stride logic in the driver
    has to be tweaked a bit, as we make the userspace believe we're
    operating on 16 bit samples, while we in fact push one more byte per
    channel down to the hardware.

    The DOP runtime information is stored in struct snd_usb_substream, so
    we can keep track of our state across multiple calls to
    prepare_playback_urb_dsd_dop().

    Signed-off-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

04 Apr, 2013

2 commits


29 Nov, 2012

1 commit

  • For implicit feedback endpoints, the number of bytes for each packet
    is matched by the corresponding synchronizing endpoint.
    The size is calculated by taking the actual size and dividing it by
    the stride - currently by the endpoint's stride, but we should use the
    synchronization source's stride.
    This is evident when the number of channels differ between the
    synchronization source and the implicitly fed-back endpoint, as with
    M-Audio Fast Track C400 - the synchronization source (capture)
    has 4 channels, while the implicit feedback mode endpoint has 6.

    Signed-off-by: Eldad Zack
    Signed-off-by: Takashi Iwai

    Eldad Zack
     

21 Nov, 2012

4 commits


17 Nov, 2012

1 commit


08 Nov, 2012

1 commit

  • There are bug reports of a crash with USB-audio devices when PCM
    prepare is performed immediately after the stream is stopped via
    trigger callback. It turned out that the problem is that we don't
    wait until all URBs are killed.

    This patch adds a new function to synchronize the pending stop
    operation on an endpoint, and calls in the prepare callback for
    avoiding the crash above.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=49181

    Reported-and-tested-by: Artem S. Tashkinov
    Cc: [v3.6]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

09 Oct, 2012

1 commit

  • Pull sound updates from Takashi Iwai:
    "This contains pretty many small commits covering fairly large range of
    files in sound/ directory. Partly because of additional API support
    and partly because of constantly developed ASoC and ARM stuff.

    Some highlights:

    - Introduced the helper function and documentation for exposing the
    channel map via control API, as discussed in Plumbers; most of PCI
    drivers are covered, will follow more drivers later

    - Most of drivers have been replaced with the new PM callbacks (if
    the bus is supported)

    - HD-audio controller got the support of runtime PM and the support
    of D3 clock-stop. Also changing the power_save option in sysfs
    kicks off immediately to enable / disable the power-save mode.

    - Another significant code change in HD-audio is the rewrite of
    firmware loading code. Other than that, most of changes in
    HD-audio are continued cleanups and standardization for the generic
    auto parser and bug fixes (HBR, device-specific fixups), in
    addition to the support of channel-map API.

    - Addition of ASoC bindings for the compressed API, used by the
    mid-x86 drivers.

    - Lots of cleanups and API refreshes for ASoC codec drivers and
    DaVinci.

    - Conversion of OMAP to dmaengine.

    - New machine driver for Wolfson Microelectronics Bells.

    - New CODEC driver for Wolfson Microelectronics WM0010.

    - Enhancements to the ux500 and wm2000 drivers

    - A new driver for DA9055 and the support for regulator bypass mode."

    Fix up various arm soc header file reorg conflicts.

    * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (339 commits)
    ALSA: hda - Add new codec ALC283 ALC290 support
    ALSA: hda - avoid unneccesary indices on "Headphone Jack" controls
    ALSA: hda - fix indices on boost volume on Conexant
    ALSA: aloop - add locking to timer access
    ALSA: hda - Fix hang caused by race during suspend.
    sound: Remove unnecessary semicolon
    ALSA: hda/realtek - Fix detection of ALC271X codec
    ALSA: hda - Add inverted internal mic quirk for Lenovo IdeaPad U310
    ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol event
    ALSA: hda - make a generic unsol event handler
    ASoC: codecs: Add DA9055 codec driver
    ASoC: eukrea-tlv320: Convert it to platform driver
    ALSA: ASoC: add DT bindings for CS4271
    ASoC: wm_hubs: Ensure volume updates are handled during class W startup
    ASoC: wm5110: Adding missing volume update bits
    ASoC: wm5110: Add OUT3R support
    ASoC: wm5110: Add AEC loopback support
    ASoC: wm5110: Rename EPOUT to HPOUT3
    ASoC: arizona: Add more clock rates
    ASoC: arizona: Add more DSP options for mixer input muxes
    ...

    Linus Torvalds
     

28 Sep, 2012

1 commit

  • Also fix the calls to next_packet_size() for the pause case. This was
    missed in 245baf983 ("ALSA: snd-usb: fix calls to next_packet_size").

    Signed-off-by: Daniel Mack
    Reviewed-by: Takashi Iwai
    Reported-and-tested-by: Christian Tefzer
    Cc: stable@kernel.org
    [ Taking directly because Takashi is on vacation - Linus ]
    Signed-off-by: Linus Torvalds

    Daniel Mack
     

19 Sep, 2012

1 commit


11 Sep, 2012

1 commit


04 Sep, 2012

1 commit

  • Playback Designs' USB devices have some hardware limitations on their
    USB interface. In particular:

    - They need a 20ms delay after each class compliant request as the
    hardware ACKs the USB packets before the device is actually ready
    for the next command. Sending data immediately will result in buffer
    overflows in the hardware.
    - The devices send bogus feedback data at the start of each stream
    which confuse the feedback format auto-detection.

    This patch introduces a new quirks hook that is called after each
    control packet and which adds a delay for all devices that match
    Playback Designs' USB VID for now.

    In addition, it adds a counter to snd_usb_endpoint to drop received
    packets on the floor. Another new quirks function that is called once
    an endpoint is started initializes that counter for these devices on
    their sync endpoint.

    Signed-off-by: Daniel Mack
    Reported-and-tested-by: Andreas Koch
    Supported-by: Demian Martin
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

01 Sep, 2012

1 commit

  • In order to support devices with implicit feedback streaming models,
    packet sizes are now stored with each individual urb, and the PCM
    handling code which fills the buffers purely relies on the size fields
    now.

    However, calling snd_usb_audio_next_packet_size() for all possible
    packets in an URB at once, prior to letting the PCM code do its job
    does in fact not lead to the same behaviour than what the old code did:
    The PCM code will break its loop once a period boundary is reached,
    consequently using up less packets that it really could.

    As snd_usb_audio_next_packet_size() implements a feedback mechanism to
    the endpoints phase accumulator, the number of calls to that function
    matters, and when called too often, the data rate runs out of bounds.

    Fix this by making the next_packet function public, and call it from the
    PCM code as before if the packet data sizes are not defined.

    Signed-off-by: Daniel Mack
    Cc: stable@kernel.org [v3.5+]
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

30 Aug, 2012

1 commit

  • Commit e9ba389c5 ("ALSA: usb-audio: Fix scheduling-while-atomic bug in
    PCM capture stream") fixed a scheduling-while-atomic bug that happened
    when snd_usb_endpoint_start was called from the trigger callback, which
    is an atmic context. However, the patch breaks the idea of the endpoints
    reference counting, which is the reason why the driver has been
    refactored lately.

    Revert that commit and let snd_usb_endpoint_start() take care of the URB
    cancellation again. As this function is called from both atomic and
    non-atomic context, add a flag to denote whether the function may sleep.

    Signed-off-by: Daniel Mack
    Cc: stable@kernel.org [3.5+]
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

16 Aug, 2012

1 commit

  • A PCM capture stream on usb-audio causes a scheduling-while-atomic
    BUG, as reported in the bugzilla entry below. It's because
    snd_usb_endpoint_start() is called at first at trigger START for a
    capture stream, and this function contains the left-over EP
    deactivation codes. The problem doesn't happen for a playback stream
    because the function is called at PCM prepare time, which can sleep.

    This patch fixes the BUG by moving the EP deactivation code into the
    PCM prepare callback.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46011
    Cc: [v3.5+]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

13 Jul, 2012

1 commit

  • The rework of the snd-usb endpoint logic moved the calls to
    snd_usb_set_interface() into the snd_usb_endpoint implemenation. This
    changed the order in which these calls are issued to the device, and
    thereby caused regressions for some webcams.

    Fix this by moving the calls back to pcm.c for now to make it work again
    and use snd_usb_endpoint_activate() to really tear down all remaining
    URBs in the flight, consequently fixing another regression caused by USB
    packets on the wire after altsetting 0 has been selected.

    Signed-off-by: Daniel Mack
    Reported-and-tested-by: Philipp Dreimann
    Reported-by: Joseph Salisbury
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

25 Apr, 2012

1 commit


24 Apr, 2012

1 commit


13 Apr, 2012

6 commits

  • ep->fill_max is a 1 bit flag, thus it has to be boolean.
    sound/usb/endpoint.c: In function 'snd_usb_endpoint_set_params':
    sound/usb/endpoint.c:785: warning: overflow in implicit constant conversion

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • sound/usb/endpoint.c: In function ‘deactivate_urbs’:
    sound/usb/endpoint.c:520:16: warning: unused variable ‘flags’ [-Wunused-variable]

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Document the new streaming code and some of the functions so that
    contributers can catch up easier.

    Signed-off-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Daniel Mack
     
  • Signed-off-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Daniel Mack
     
  • With the previous commit that added the new streaming model, all
    endpoint and streaming related code is now in endpoint.c, and pcm.c
    only acts as a wrapper for handling the packet's payload.

    Signed-off-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Daniel Mack
     
  • This patch adds a new generic streaming logic for audio over USB.

    It defines a model (snd_usb_endpoint) that handles everything that
    is related to an USB endpoint and its streaming. There are functions to
    activate and deactivate an endpoint (which call usb_set_interface()),
    and to start and stop its URBs. It also has function pointers to be
    called when data was received or is about to be sent, and pointer to
    a sync slave (another snd_usb_endpoint) that is informed when data has
    been received.

    A snd_usb_endpoint knows about its state and implements a refcounting,
    so only the first user will actually start the URBs and only the last
    one to stop it will tear them down again.

    With this sort of abstraction, the actual streaming is decoupled from
    the pcm handling, which makes the "implicit feedback" mechanisms easy to
    implement.

    In order to split changes properly, this patch only adds the new
    implementation but leaves the old one around, so the the driver doesn't
    change its behaviour. The switch to actually use the new code is
    submitted separately.

    Signed-off-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

09 Jan, 2012

1 commit


14 Sep, 2011

2 commits


04 Aug, 2011

1 commit


13 Jul, 2011

1 commit

  • This patch gives M-Audio Fast Track Pro and M-Audio Quattro quirks and
    endpoints to boot and setup those devices with special options (digital
    inputs and outputs, 24 bits mode, etc...). M-Audio Audiophile quirks are
    just adapted to match the new global M-Audio parameters.

    Special configurations can be then loaded through a modprobe conf file.
    For example, to set the 24 bits mode on the Fast Track Pro add
    /etc/modprobe.d/fast_track_pro.conf :

    options snd_usb_audio vid=0x763 pid=0x2012 device_setup=0x08

    Here is a list of the possibilities in this example :
    http://files.parisson.com/debian/fast-track-pro.conf

    Signed-off-by: Guillaume Pellerin
    Signed-off-by: Takashi Iwai

    Guillaume Pellerin
     

04 Sep, 2010

2 commits


02 Sep, 2010

1 commit


23 Jun, 2010

1 commit