26 Aug, 2011

1 commit


25 May, 2011

1 commit


11 Mar, 2011

1 commit

  • Devices are autosuspended if no pcm nor midi channel is open
    Mixer devices may be opened. This way they are active when
    in use to play or record sound, but can be suspended while
    users have a mixer application running.

    [Small clean-ups using static inline by tiwai]

    Signed-off-by: Oliver Neukum
    Signed-off-by: Takashi Iwai

    Oliver Neukum
     

23 Feb, 2011

1 commit

  • When a USB audio device is disconnected, snd_usb_audio_disconnect()
    kills all audio URBs. At the same time, the application, after being
    notified of the disconnection, might close the device, in which case
    ALSA calls the .hw_free callback, which should free the URBs too.

    Commit de1b8b93a0ba "[ALSA] Fix hang-up at disconnection of usb-audio"
    prevented snd_usb_hw_free() from freeing the URBs to avoid a hang that
    resulted from this race, but this introduced another race because the
    URB callbacks could now be executed after snd_usb_hw_free() has
    returned, and try to access already freed data.

    Fix the first race by introducing a mutex to serialize the disconnect
    callback and all PCM callbacks that manage URBs (hw_free and hw_params).

    Reported-and-tested-by: Pierre-Louis Bossart
    Cc:
    [CL: also serialize hw_params callback]
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

23 Oct, 2010

1 commit


01 Jun, 2010

1 commit

  • Audio devices which comply to the UAC2 standard can export complex clock
    topologies in its descriptors and set up links between them.

    The entities that are defined are

    - clock sources, which define the end-leafs.
    - clock selectors, which act as switch to select one out of many
    possible clocks sources.
    - clock multipliers, which have an input clock source, and act as clock
    source again. They can be used to derive one clock from another.

    All sample rate changes, clock validity queries and the like must go to
    clock source elements, while clock selectors and multipliers can be used
    as terminal clock source.

    The following patch adds a parser for these elements and functions to
    iterate over the tree and find the leaf nodes (clock sources).

    The samplerate set functions were moved to the new clock.c file.

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

    Daniel Mack
     

21 May, 2010

1 commit


05 Mar, 2010

2 commits

  • Clean up the usb audio driver by factoring out a lot of functions to
    separate files. Code for procfs, quirks, urbs, format parsers etc all
    got a new home now.

    Moved almost all special quirk handling to quirks.c and introduced new
    generic functions to handle them, so the exceptions do not pollute the
    whole driver.

    Renamed usbaudio.c to card.c because this is what it actually does now.
    Renamed usbmidi.c to midi.c for namespace clarity.
    Removed more things from usbaudio.h.

    The non-standard drivers were adopted accordingly.

    Signed-off-by: Daniel Mack
    Cc: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Daniel Mack
     
  • Rename snd-usb-lib to snd-usbmidi-lib as MIDI functions are the only
    thing it actually contains. Introduce a new header file to only declare
    these functions.

    Introduced usbmixer.h for all functions exported by usbmixer.c.

    Signed-off-by: Daniel Mack
    Cc: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

02 Mar, 2010

2 commits


23 Feb, 2010

3 commits

  • Use the definitions from linux/usb/audio.h all over the ALSA USB audio
    driver and add some missing definitions there as well.

    Use the endpoint attribute macros from linux/usb/ch9 and remove the own
    things from sound/usb/usbaudio.h.

    Now things are also nicely prefixed which makes understanding the code
    easier.

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

    Daniel Mack
     
  • This adds a number of parsers for audio class v2.0. In particular, the
    following internals are different and now handled by the code:

    * the number of streaming interfaces is now reported by an interface
    association descriptor. The old approach using a proprietary
    descriptor is deprecated.

    * The number of channels per interface is now stored in the AS_GENERAL
    descriptor (used to be part of the FORMAT_TYPE descriptor).

    * The list of supported sample rates is no longer stored in a variable
    length appendix of the format_type descriptor but is retrieved from
    the device using a class specific GET_RANGE command.

    * Supported sample formats are now reported as 32bit bitmap rather than
    a fixed value. For now, this is worked around by choosing just one of
    them.

    * A devices needs to have at least one CLOCK_SOURCE descriptor which
    denotes a clockID that is needed im the class request command.

    * Many descriptors (format_type, ...) have changed their layout. Handle
    this by casting the descriptors to the appropriate structs.

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

    Daniel Mack
     
  • This patch adds some definitions for audio class v2.

    Unfortunately, the UNIT types PROCESSING_UNIT and EXTENSION_UNIT have
    different numerical representations in both standards, so there is need
    for a _V1 add-on now. usbmixer.c is changed accordingly.

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

    Daniel Mack
     

28 Dec, 2009

3 commits

  • Detect the HVR-950Q HVR-850 urb data alignment quirk using usbquirk.h
    rather than using a case statement in snd_usb_audio_probe.

    Signed-off-by: John S. Gruber
    Signed-off-by: Takashi Iwai

    John S. Gruber
     
  • Addressing audio quality problem.

    In sound/usb/usbaudio.c, for the Hauppage HVR-950Q and HVR-850 only, change
    retire_capture_urb to allow transfers on audio sub-slot boundaries rather
    than audio slots boundaries.

    With these devices the left and right channel samples can be split between
    two different urbs. Throwing away extra channel samples causes a sound
    quality problem for stereo streams as the left and right channels are
    swapped repeatedly, perhaps many times per second.

    Urbs unaligned on sub-slot boundaries are still truncated to the next
    lowest stride (audio slot) to retain synchronization on samples even
    though left/right channel synchronization may be lost in this case.

    Detect the quirk using a case statement in snd_usb_audio_probe.

    BugLink: https://bugs.launchpad.net/ubuntu/+bug/495745

    Signed-off-by: John S. Gruber
    Signed-off-by: Takashi Iwai

    John S. Gruber
     
  • Added functionality:
    1) Extension Units support (all XU settings now available at alsamixer,
    kmix, etc):
    - "AnalogueIn soft limiter" switch;
    - "Sample rate" selector (values 0,1,2,3,4,5 corresponds to 44.1 48 ...
    192 kHz);
    - "DigitalIn CLK source" selector (internal/external) (**);
    - "DigitalOut format SPDIF/AC3" switch (**);
    (**)E-mu-0404usb only.

    2) Automatic device sample rate adjustment depending on substream
    samplerate for both capture and playback substream.

    [minor coding-style fixes by tiwai]

    Signed-off-by: Sergiy Kovalchuk
    Signed-off-by: Takashi Iwai

    Sergiy Kovalchuk
     

15 Dec, 2009

1 commit


24 Nov, 2009

1 commit


07 Nov, 2009

1 commit

  • Fix combine_word problem where first octet is not
    read properly. The only affected place seems to be the
    INPUT_TERMINAL type. Before now, sound controls can be created
    with the output terminal's name which is a fallback mechanism
    used only for unknown input terminal types. For example,
    Line can wrongly appear as Speaker. After the change it
    should appear as Line.

    The side effect of this change can be that users
    can expect the wrong control name in their scripts or
    programs while now we return the correct one.

    Probably, these defines should use get_unaligned_le16 and
    friends.

    Signed-off-by: Julian Anastasov
    Cc:
    Signed-off-by: Takashi Iwai

    Julian Anastasov
     

27 May, 2009

1 commit

  • Kernel 2.6.18 broke the MotU Fastlane, which uses duplicate endpoint
    numbers in a manner that is not only illegal but also confuses the
    kernel's endpoint descriptor caching mechanism. To work around this, we
    have to add a separate usb_set_interface() call to guide the USB core to
    the correct descriptors.

    Signed-off-by: Clemens Ladisch
    Reported-and-tested-by: David Fries
    Cc:
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

10 Oct, 2008

1 commit


15 Aug, 2008

1 commit


01 Aug, 2008

1 commit


01 Feb, 2008

1 commit


09 Feb, 2007

1 commit

  • Added support for the Edirol UA-101 (only in high-speed mode) by taking
    the quirks for the UA-1000 and change them accordingly. Changes were
    made in 'usbaudio.c', 'usbaudio.h', and 'usbquirks.h'
    MIDI and recording seem to work perfectly (with JACK), but playback
    gives some few glitches. I think that's the mentioned
    synchronizing-problem in the UA-1000 quirk ('FIXME: playback must be
    synchronized to capture'), so I didn't change that.
    ToDo: Adding Mixer-Support for the built-in
    control-panel/patch-bay/router.

    Signed-off-by: Bjoern Fay
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Bjoern Fay
     

23 Jun, 2006

1 commit


22 Mar, 2006

1 commit


03 Jan, 2006

1 commit


04 Nov, 2005

2 commits


28 Jul, 2005

3 commits


29 May, 2005

3 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds