29 Apr, 2016

1 commit

  • 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: Takashi Iwai

    Takashi Iwai
     

16 Mar, 2016

1 commit

  • Add some sanity check codes before actually accessing the endpoint via
    get_endpoint() in order to avoid the invalid access through a
    malformed USB descriptor. Mostly just checking bNumEndpoints, but in
    one place (snd_microii_spdif_default_get()), the validity of iface and
    altsetting index is checked as well.

    Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

17 Feb, 2015

1 commit

  • 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: Joe Turner
    Signed-off-by: Takashi Iwai

    Joe Turner
     

26 Feb, 2014

1 commit

  • 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: Takashi Iwai

    Takashi Iwai
     

28 Jun, 2013

1 commit


26 Apr, 2013

1 commit


10 Apr, 2013

1 commit


04 Apr, 2013

7 commits


03 Apr, 2013

1 commit

  • The C-Media CM6631 USB receiver doesn't respond to changes in sample rate
    while the interface is active. The same behavior is observed in other UAC2
    hardware like the VIA VT1731.

    Reset the interface after setting the sampling frequency on sample rate
    changes, to ensure that the sample rate set by snd_usb_init_sample_rate() is
    used. Otherwise, the device will try to use the sample rate of the previous
    stream, causing distorted sound on sample rate changes.

    The reset is performed for all UAC2 devices, as it should not affect a
    standards compliant device, but it is only necessary for C-Media CM6631,
    VIA VT1731 and possibly others.

    Failure to read sample rate from the device is not handled as an error in
    set_sample_rate_v2(), as (permanent or intermittent) failure to read sample
    rate isn't essential for a successful sample rate set.

    Signed-off-by: Torstein Hegge
    Acked-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Torstein Hegge
     

01 Aug, 2012

1 commit

  • uac_clock_source_is_valid() uses the control selector value to access
    the bmControls bitmap of the clock source unit. This is wrong, as
    control selector values start from 1, while the bitmap uses all
    available bits.

    In other words, "Clock Validity Control" is stored in D3..2, not D5..4
    of the clock selector unit's bmControls.

    Signed-off-by: Daniel Mack
    Reported-by: Andreas Koch
    Cc: stable@kernel.org
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

27 Sep, 2011

1 commit

  • There are certain devices that are reportedly so slow that they need
    more than 100 ms to handle control transfers. Therefore, increase the
    timeout in mixer(_quirks).c to 1000 ms.

    The timeout parameter of snd_usb_ctl_msg() is now constant, so we can
    drop it.

    Reported-by: Felipe Balbi
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

18 May, 2011

1 commit


04 Sep, 2010

1 commit

  • The Audio Class v2 support code in 2.6.35 added checks for the
    bInterfaceProtocol field. However, there are devices (usually those
    detected by vendor-specific quirks) that do not have one of the
    predefined values in this field, which made the driver reject them.

    To fix this regression, restore the old behaviour, i.e., assume that
    a device with an unknown bInterfaceProtocol field (other than
    UAC_VERSION_2) has more or less UAC-v1-compatible descriptors.

    [compile warning fixes by tiwai]

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

    Clemens Ladisch
     

09 Jul, 2010

1 commit

  • It is not advisable to print a warning when a device does not support
    setting the sample rate because this is perfectly valid for devices with
    a single rate or where rates are implicitly changed by selecting another
    alternate setting.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

23 Jun, 2010

3 commits


12 Jun, 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