21 Nov, 2014

2 commits


17 Nov, 2014

1 commit


16 Nov, 2014

1 commit

  • This patch adds a USB control message delay quirk for a few specific Marantz/Denon
    devices. Without the delay the DACs will not work properly and produces the
    following type of messages:

    Nov 15 10:09:21 orwell kernel: [ 91.342880] usb 3-13: clock source 41 is not valid, cannot use
    Nov 15 10:09:21 orwell kernel: [ 91.343775] usb 3-13: clock source 41 is not valid, cannot use

    There are likely other Marantz/Denon devices using the same USB module which exhibit the
    same problems. But as this cannot be verified I limited the patch to the devices
    I could test.

    The following two devices are covered by this path:
    - Marantz SA-14S1
    - Marantz HD-DAC1

    Signed-off-by: Jurgen Kramer
    Cc:
    Signed-off-by: Takashi Iwai

    Jurgen Kramer
     

12 Nov, 2014

1 commit


05 Nov, 2014

1 commit

  • Some USB-audio devices show weird sysfs warnings at disconnecting the
    devices, e.g.
    usb 1-3: USB disconnect, device number 3
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 973 at fs/sysfs/group.c:216 device_del+0x39/0x180()
    sysfs group ffffffff8183df40 not found for kobject 'midiC1D0'
    Call Trace:
    [] ? dump_stack+0x49/0x71
    [] ? warn_slowpath_common+0x82/0xb0
    [] ? warn_slowpath_fmt+0x45/0x50
    [] ? device_del+0x39/0x180
    [] ? device_unregister+0x9/0x20
    [] ? device_destroy+0x34/0x40
    [] ? snd_unregister_device+0x7f/0xd0 [snd]
    [] ? snd_rawmidi_dev_disconnect+0xce/0x100 [snd_rawmidi]
    [] ? snd_device_disconnect+0x62/0x90 [snd]
    [] ? snd_device_disconnect_all+0x3c/0x60 [snd]
    [] ? snd_card_disconnect+0x124/0x1a0 [snd]
    [] ? usb_audio_disconnect+0x88/0x1c0 [snd_usb_audio]
    [] ? usb_unbind_interface+0x5e/0x1b0 [usbcore]
    [] ? __device_release_driver+0x79/0xf0
    [] ? device_release_driver+0x25/0x40
    [] ? bus_remove_device+0xf1/0x130
    [] ? device_del+0x109/0x180
    [] ? usb_disable_device+0x95/0x1f0 [usbcore]
    [] ? usb_disconnect+0x8f/0x190 [usbcore]
    [] ? hub_thread+0x539/0x13a0 [usbcore]
    [] ? sched_clock_local+0x15/0x80
    [] ? sched_clock_cpu+0xb8/0xd0
    [] ? bit_waitqueue+0xb0/0xb0
    [] ? usb_port_resume+0x430/0x430 [usbcore]
    [] ? usb_port_resume+0x430/0x430 [usbcore]
    [] ? kthread+0xce/0xf0
    [] ? kthread_create_on_node+0x1c0/0x1c0
    [] ? ret_from_fork+0x7c/0xb0
    [] ? kthread_create_on_node+0x1c0/0x1c0
    ---[ end trace 40b1928d1136b91e ]---

    This comes from the fact that usb-audio driver may receive the
    disconnect callback multiple times, per each usb interface. When a
    device has both audio and midi interfaces, it gets called twice, and
    currently the driver tries to release resources at the last call.
    At this point, the first parent interface has been already deleted,
    thus deleting a child of the first parent hits such a warning.

    For fixing this problem, we need to call snd_card_disconnect() and
    cancel pending operations at the very first disconnect while the
    release of the whole objects waits until the last disconnect call.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80931
    Reported-and-tested-by: Tomas Gayoso
    Reported-and-tested-by: Chris J Arges
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

25 Oct, 2014

1 commit

  • Pull sound fixes from Takashi Iwai:
    "Here are a chunk of small fixes since rc1: two PCM core fixes, one is
    a long-standing annoyance about lockdep and another is an ARM64 mmap
    fix.

    The rest are a HD-audio HDMI hotplug notification fix, a fix for
    missing NULL termination in Realtek codec quirks and a few new
    device/codec-specific quirks as usual"

    * tag 'sound-3.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda - Add missing terminating entry to SND_HDA_PIN_QUIRK macro
    ALSA: pcm: Fix false lockdep warnings
    ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad
    ALSA: hda - hdmi: Fix missing ELD change event on plug/unplug
    ALSA: usb-audio: Add support for Steinberg UR22 USB interface
    ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume
    ALSA: pcm: use the same dma mmap codepath both for arm and arm64

    Linus Torvalds
     

20 Oct, 2014

1 commit

  • Adding support for Steinberg UR22 USB interface via quirks table patch

    See Ubuntu bug report:
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1317244
    Also see threads:
    http://linux-audio.4202.n7.nabble.com/Support-for-Steinberg-UR22-Yamaha-USB-chipset-0499-1509-tc82888.html#a82917
    http://www.steinberg.net/forums/viewtopic.php?t=62290

    Tested by at least 4 people judging by the threads.
    Did not test MIDI interface, but audio output and capture both are
    functional. Built 3.17 kernel with this driver on Ubuntu 14.04 & tested with mpg123
    Patch applied to 3.13 Ubuntu kernel works well enough for daily use.

    Signed-off-by: Vlad Catoi
    Acked-by: Clemens Ladisch
    Cc:
    Signed-off-by: Takashi Iwai

    Vlad Catoi
     

11 Oct, 2014

1 commit

  • Pull sound updates from Takashi Iwai:
    "This time it's a relatively calm update batch, but the amount isn't
    too small in the end. Here we go over some highlights:

    ALSA core:
    - One major change is the support of nonatomic PCM operations. This
    allows the trigger and other callbacks to call schedule(), which
    would be useful for mailbox type communications. Already some
    drivers (Digigram ones) have been converted to use together with
    threaded irqs as an example.
    - Improvement / fixes of DSD PCM format support

    HD-audio:
    - Large volume of rewrites are found in Realtek codec driver for
    converting Dell and HP quirks to generic forms.
    - Inverted dmic code cleanup from David.
    - Realtek COEF access has been optimized.
    - Now HD-audio jack infrastructure allows multiple callbacks, which
    fixes / simplifies the jack-dependent power controls on STAC/IDT
    and VIA codecs.
    - Many additional device-specific fixups as usual
    - A few deadcode cleanups, CA0132 code cleanup, etc.

    ASoC:
    - More componentization work from Lars-Peter, this time mainly
    cleaning up the suspend and bias level transition callbacks.
    - Real system support for the Intel drivers and a bunch of fixes and
    enhancements for the associated CODEC drivers, this is going to
    need a lot quirks over time due to the lack of any firmware
    description of the boards.
    - Jack detect support for simple card from Dylan Reid.
    - A bunch of small fixes and enhancements for the Freescale drivers.
    - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32,
    Everest Semiconductor ES8328 and Freescale cards using the ASRC in
    newer i.MX processors.
    - A few simple-card fixes, mostly cleanups but also a fix for
    interaction between GPIO 0 and simple-card.

    Misc:
    - Virtuoso / Oxygen updates by Clemens
    - USB-audio: Yamaha MOTIF XF MIDI port name fixes
    - Conversion of kernel messages to standard dev_*() in ctxfi driver"

    * tag 'sound-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (251 commits)
    ASoC: mc13783: Ensure we only try to dereference valid of_nodes
    ASoC: rockchip-i2s: fix infinite loop in rockchip_snd_txctrl
    ALSA: hda - Add dock port support to Thinkpad L440 (71aa:501e)
    ALSA: Allow pass NULL dev for snd_pci_quirk_lookup()
    ASoC: imx-es8328: Fix of_node_put() call with uninitialized object
    ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb()
    ASoC: simple-card: Initialize headphone and mic GPIO numbers
    ASoC: imx-es8328: Fix missing return code in imx_es8328_probe()
    ALSA: hda - Add dock support for Thinkpad T440 (17aa:2212)
    ALSA: usb: caiaq: check for cdev->n_streams > 1
    ASoC: 88pm860x-codec: Fix possibly missing string termination
    ASoC: core: fix use after free in snd_soc_remove_platform()
    ASoC: soc-dapm: fix use after free
    ALSA: hda - Make the inv dmic handling for Realtek use generic parser
    ALSA: hda - Add Inverted Internal mic for Samsung Ativ book 9 (NP900X3G)
    ALSA: hda - Add inverted internal mic for Asus Aspire 4830T
    ASoC: Intel: byt-rt5640: fix coccinelle warnings
    ASoC: fsl_esai doc: Add "fsl,vf610-esai" as compatible string
    ASoC: da732x: Remove unnecessary KERN_ERR in pr_err()
    ASoC: simple-card: Fix detect gpio documentation.
    ...

    Linus Torvalds
     

07 Oct, 2014

1 commit


06 Oct, 2014

1 commit

  • ASoC: Updates for v3.18

    - More componentisation work from Lars-Peter, this time mainly
    cleaning up the suspend and bias level transition callbacks.
    - Real system support for the Intel drivers and a bunch of fixes and
    enhancements for the associated CODEC drivers, this is going to need
    a lot quirks over time due to the lack of any firmware description of
    the boards.
    - Jack detect support for simple card from Dylan Reid.
    - A bunch of small fixes and enhancements for the Freescale drivers.
    - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest
    Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX
    processors.

    Takashi Iwai
     

25 Sep, 2014

1 commit


24 Sep, 2014

1 commit

  • USB hub has started to use a workqueue instead of kthread. Let's update
    the documentation and comments here and there.

    This patch mostly just replaces "khubd" with "hub_wq". There are only few
    exceptions where the whole sentence was updated. These more complicated
    changes can be found in the following files:

    Documentation/usb/hotplug.txt
    drivers/net/usb/usbnet.c
    drivers/usb/core/hcd.c
    drivers/usb/host/ohci-hcd.c
    drivers/usb/host/xhci.c

    Signed-off-by: Petr Mladek
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Petr Mladek
     

22 Sep, 2014

1 commit


08 Sep, 2014

2 commits


10 Aug, 2014

1 commit

  • The BOSS ME-25 turns out not to have any useful descriptors in its MIDI
    interface, so its needs a quirk entry after all.

    Reported-and-tested-by: Kees van Veen
    Fixes: 8e5ced83dd1c ("ALSA: usb-audio: remove superfluous Roland quirks")
    Cc:
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

06 Aug, 2014

2 commits


04 Aug, 2014

2 commits


26 Jun, 2014

1 commit

  • When a USB-audio device is disconnected while PCM is still running, we
    still see some race: the disconnect callback calls
    snd_usb_endpoint_free() that calls release_urbs() and then kfree()
    while a PCM stream would be closed at the same time and calls
    stop_endpoints() that leads to wait_clear_urbs(). That is, the EP
    object might be deallocated while a PCM stream is syncing with
    wait_clear_urbs() with the same EP.

    Basically calling multiple wait_clear_urbs() would work fine, also
    calling wait_clear_urbs() and release_urbs() would work, too, as
    wait_clear_urbs() just reads some fields in ep. The problem is the
    succeeding kfree() in snd_pcm_endpoint_free().

    This patch moves out the EP deallocation into the later point, the
    destructor callback. At this stage, all PCMs must have been already
    closed, so it's safe to free the objects.

    Reported-by: Alan Stern
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

25 May, 2014

2 commits


05 May, 2014

1 commit


03 May, 2014

4 commits

  • The TEAC UD-H01 firmware sends wrong feedback frequency values, thus
    causing the PC to send the samples at a wrong rate, which results in
    clicks and crackles in the output.

    Add a workaround to detect and fix the corruption.

    Signed-off-by: Clemens Ladisch
    [mick37@gmx.de: use sender->udh01_fb_quirk rather than
    ep->udh01_fb_quirk in snd_usb_handle_sync_urb()]
    Reported-and-tested-by: Mick
    Reported-and-tested-by: Andrea Messa
    Cc:
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • The recent addition of the USB audio mixer suspend/resume may lead to
    deadlocks when the driver tries to call usb_autopm_get_interface()
    recursively, since the function tries to sync with the finish of the
    other calls. For avoiding it, introduce a flag indicating the resume
    operation and avoids the recursive usb_autopm_get_interface() calls
    during the resume.

    Reported-and-tested-by: Bryan Quigley
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The suspend callback of usb-audio driver may be called multiple times
    per suspend when multiple USB interfaces are bound to a single sound
    card instance. In such a case, it's superfluous to save the mixer
    values multiple times. This patch fixes it by checking the counter.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This (widely used) construction:

    if(printk_ratelimit())
    dev_dbg()

    Causes the ratelimiting to spam the kernel log with the "callbacks suppressed"
    message below, even while the dev_dbg it is supposed to rate limit wouldn't
    print anything because DEBUG is not defined for this device.

    [ 533.803964] retire_playback_urb: 852 callbacks suppressed
    [ 538.807930] retire_playback_urb: 852 callbacks suppressed
    [ 543.811897] retire_playback_urb: 852 callbacks suppressed
    [ 548.815745] retire_playback_urb: 852 callbacks suppressed
    [ 553.819826] retire_playback_urb: 852 callbacks suppressed

    So use dev_dbg_ratelimited() instead of this construction.

    Signed-off-by: Sander Eikelenboom
    Signed-off-by: Takashi Iwai

    Sander Eikelenboom
     

28 Apr, 2014

1 commit


14 Apr, 2014

1 commit


10 Apr, 2014

1 commit

  • BugLink: http://bugs.launchpad.net/bugs/1305133

    Malfunctioning or slow devices can cause a flood of dmesg SPAM.

    I've ignored checkpatch.pl complaints about the use of printk_ratelimit() in favour
    of prior art in sound/usb/pcm.c.

    WARNING: Prefer printk_ratelimited or pr__ratelimited to printk_ratelimit
    + if (printk_ratelimit() &&

    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Eldad Zack
    Cc: Daniel Mack
    Cc: Clemens Ladisch
    Signed-off-by: Tim Gardner
    Signed-off-by: Takashi Iwai

    Tim Gardner
     

07 Apr, 2014

1 commit

  • This patch adds initial support for the Behringer BCD2000 USB DJ controller.
    At the moment, only the MIDI part of the device is working, i.e. knobs,
    buttons and LEDs.

    I also plan to add support for the audio part, but I assume that this will
    require more effort than the rather simple MIDI interface. Progress can be
    tracked at https://github.com/anyc/snd-usb-bcd2000.

    Signed-off-by: Mario Kicherer
    Reviewed-by: Daniel Mack
    Reviewed-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Mario Kicherer
     

13 Mar, 2014

1 commit

  • ASoC: Updates for v3.15

    Quite a busy release for ASoC this time, more on janitorial work than
    exciting new features but welcome nontheless:

    - Lots of cleanups from Takashi for enumerations; the original API for
    these was error prone so he's refactored lots of code to use more
    modern APIs which avoid issues.
    - Elimination of the ASoC level wrappers for I2C and SPI moving us
    closer to converting to regmap completely and avoiding some
    randconfig hassle.
    - Provide both manually and transparently locked DAPM APIs rather than
    a mix of the two fixing some concurrency issues.
    - Start converting CODEC drivers to use separate bus interface drivers
    rather than having them all in one file helping avoid dependency
    issues.
    - DPCM support for Intel Haswell and Bay Trail platforms.
    - Lots of work on improvements for simple-card, DaVinci and the Renesas
    rcar drivers.
    - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the
    CSR SiRF SoC.

    Takashi Iwai
     

05 Mar, 2014

1 commit


28 Feb, 2014

1 commit


27 Feb, 2014

1 commit


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
     

25 Feb, 2014

1 commit


17 Feb, 2014

1 commit

  • Avoid traversing the device object list of the card instance just for
    checking the PCM streams. The driver's private object already
    contains the array of substream pointers, so it can be simply looked
    through. The card internal may be restructured in future, thus better
    not to rely on it.

    Also, this fixes the possible deadlocks in PCM mutex. Instead of
    taking multiple PCM mutexes, just take the common mutex in all
    places. Along with it, rename prepare_mutex as pcm_mutex.

    Signed-off-by: Takashi Iwai

    Takashi Iwai