summaryrefslogtreecommitdiffstats
path: root/sound/usb/quirks-table.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' into for-nextTakashi Iwai2020-09-091-7/+53
|\ | | | | | | | | | | | | Back-merge to apply the tasklet conversion patches that are based on the already applied tasklet API changes on 5.9-rc4. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: Add basic capture support for Pioneer DJ DJM-250MK2František Kučera2020-08-261-7/+53
| | | | | | | | | | | | | | | | | | | | This patch extends support for DJM-250MK2 and allows recording. However, DVS is not possible yet (see the comment in code). Signed-off-by: František Kučera <franta-linux@frantovo.cz> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200825153113.6352-1-konference@frantovo.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Correct wrongly matching entries with audio classTakashi Iwai2020-08-241-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 51ab5d77dcb8 ("ALSA: usb-audio: Properly match with audio interface class") converted the quirk entries that have both vid/pid pair and bInterface fields to match with all those with a new macro USB_AUDIO_CLASS(). However, it turned out that those are false conversions; all those (but the unknown KeithMcMillen device) are actually with vendor-specific interface class, hence the conversions broke the matching. This patch corrects those entries to the right one, USB_DEVICE_VENDOR_SPEC() (and USB_DEVICE() for KeithMcMillen to be sure), and drop the unused USB_AUDIO_CLASS macro again. Fixes: 51ab5d77dcb8 ("ALSA: usb-audio: Properly match with audio interface class") Reported-by: Alexander Tsoy <alexander@tsoy.me> Link: https://lore.kernel.org/r/20200823113251.10175-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2020-08-231-0/+17
|\| | | | | | | | | | | | | | | Correct quirk table entries for Lenovo ThinkStation P620, too. The name and profile strings are now set from a different table, hence removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: usb-audio: Disable autosuspend for Lenovo ThinkStation P620Kai-Heng Feng2020-08-231-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If USB autosuspend is enabled, both front and rear panel can no longer detect jack insertion. Enable USB remote wakeup, i.e. needs_remote_wakeup = 1, doesn't help either. So disable USB autosuspend to prevent missing jack detection event. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200823105854.26950-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Properly match with audio interface classTakashi Iwai2020-08-201-36/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few entries in the quirk table that set the device ID with USB_DEVICE() macro while having an extra bInterfaceClass field. But bInterfaceClass field is never checked unless the proper match_flags is set, so those may match incorrectly with all interfaces. Introduce another macro to match with the vid/pid pair and the audio class interface, and apply it to such entries, so that they can match properly. Link: https://lore.kernel.org/r/20200817082140.20232-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Simplify quirk entries with a macroTakashi Iwai2020-08-201-84/+21
| | | | | | | | | | | | | | | | Introduce a new macro USB_AUDIO_DEVICE() for the entries matching with the pid/vid pair and the class/subclass, and remove the open-code. Link: https://lore.kernel.org/r/20200817082140.20232-3-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: Move device rename and profile quirks to an internal tableTakashi Iwai2020-08-201-120/+0
|/ | | | | | | | | | | | | | | | | So far we've added the devices that need vendor/product string renames or the profile setup into the standard quirk table in quirks-table.h. This table is imported into the primary USB audio device entry, hence it's all exported for the probing so that udev and co can take a look at it. OTOH, for renaming or profile setup, we don't need to expose those explicit entries because the probe itself follows the standard way. That said, we're exposing unnecessarily too many entries. This patch moves such internal quirk entries into the own table, and reduces the exported device table size. Along with the moving items, re-arrange the entries in the proper order. Link: https://lore.kernel.org/r/20200817082140.20232-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Update documentation comment for MS2109 quirkHector Martin2020-08-171-2/+2
| | | | | | | | | | As the recent fix addressed the channel swap problem more properly, update the comment as well. Fixes: 1b7ecc241a67 ("ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109") Signed-off-by: Hector Martin <marcan@marcan.st> Link: https://lore.kernel.org/r/20200816084431.102151-1-marcan@marcan.st Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add capture support for Saffire 6 (USB 1.1)Alexander Tsoy2020-08-151-0/+30
| | | | | | | | | | | | | Capture and playback endpoints on Saffire 6 (USB 1.1) resides on the same interface. This was not supported by the composite quirk back in the day when initial support for this device was added, thus only playback was enabled until now. Fixes: 11e424e88bd4 ("ALSA: usb-audio: Add support for Focusrite Saffire 6 USB") Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Cc: <stable.vger.kernel.org> Link: https://lore.kernel.org/r/20200815002103.29247-1-alexander@tsoy.me Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: add quirk for Pioneer DDJ-RBHector Martin2020-08-101-0/+56
| | | | | | | | | | This is just another Pioneer device with fixed endpoints. Input is dummy but used as feedback (it always returns silence). Cc: stable@vger.kernel.org Signed-off-by: Hector Martin <marcan@marcan.st> Link: https://lore.kernel.org/r/20200810082502.225979-1-marcan@marcan.st Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109Hector Martin2020-08-101-1/+7
| | | | | | | | | | | Matching by device matches all interfaces, which breaks the video/HID portions of the device depending on module load order. Fixes: e337bf19f6af ("ALSA: usb-audio: add quirk for MacroSilicon MS2109") Cc: stable@vger.kernel.org Signed-off-by: Hector Martin <marcan@marcan.st> Link: https://lore.kernel.org/r/20200810045319.128745-1-marcan@marcan.st Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: add startech usb audio dock nameCurtis Malainey2020-08-041-4/+8
| | | | | | | | | The dock sold from startech (PID: ICUSBAUDIO7D) has no friendly name and shows up currently as "USB Sound Device" in ALSA. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20200804010616.3399256-1-cujomalainey@chromium.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add support for Lenovo ThinkStation P620Kai-Heng Feng2020-08-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lenovo ThinkStation P620 is like other TRX40 boards, is equipped with two USB audio cards. USB device (17aa:104d) provides functionality for Internal Speaker and Front Headset. It's UAC v2, so it supports insertion control (jack detection). However, when trying to get the connector status of the speaker, an error occurs: [ 5.787405] usb 3-1: cannot get connectors status: req = 0x81, wValue = 0x200, wIndex = 0x1000, type = 0 Since the insertion control works perfectly for the headset, the error for speaker is probably casued by connecting internally. So let's relax the error for a bit if it's a speaker, and always reports it's connected. USB device (17aa:1046) is for rear Line-in, Line-out and Microphone. The insertion control works for all three jacks. However, there's an Function Unit that doesn't work: [ 5.905415] usb 3-6: cannot get ctl value: req = 0x83, wValue = 0xc00, wIndex = 0x1300, type = 4 [ 5.905418] usb 3-6: 19:0: cannot get min/max values for control 12 (id 19) So turn off the FU to avoid the error. Also, add specific card name for both devices, so userspace can easily indentify both cards. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20200803142612.17156-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-next' into for-linusTakashi Iwai2020-08-031-1/+1
|\
| * ALSA: usb-audio: Replace blacklist wordTakashi Iwai2020-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | Follow the recent inclusive terminology guidelines and replace the word "blacklist" appropriately. Only a comment fix, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-11-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: usb-audio: add quirk for MacroSilicon MS2109Hector Martin2020-07-071-0/+52
|/ | | | | | | | | | These devices claim to be 96kHz mono, but actually are 48kHz stereo with swapped channels and unaligned transfers. Cc: stable@vger.kernel.org Signed-off-by: Hector Martin <marcan@marcan.st> Link: https://lore.kernel.org/r/20200702071433.237843-1-marcan@marcan.st Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Use the new macro for HP Dock rename quirksTakashi Iwai2020-06-081-12/+4
| | | | | | | | | Replace the open-code with the new QUIRK_DEVICE_PROFILE() macro for simplicity. Fixes: 0c5086f56999 ("ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock") Link: https://lore.kernel.org/r/20200608071513.570-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt DockKai-Heng Feng2020-06-081-0/+20
| | | | | | | | | | | The HP Thunderbolt Dock has two separate USB devices, one is for speaker and one is for headset. Add names for them so userspace can apply UCM settings. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200608062630.10806-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add Pioneer DJ DJM-900NXS2 supportDmitry Panchenko2020-06-011-0/+63
| | | | | | | | | | | | Pioneer DJ DJM-900NXS2 is a widely used DJ mixer with 2 audio USB interfaces. Both have a MIDI controller, 10 playback and 12 capture channels. Audio endpoints are vendor-specific and 3 files need to be patched. All playback and capture channels work fine with all supported sample rates (44.1k, 48k, 96k). Patches are attached. Signed-off-by: Dmitry Panchenko <dmitry@d-systems.ee> Link: https://lore.kernel.org/r/48ab19ff-3303-9bf8-ed0e-bcb31d8537eb@d-systems.ee Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Clean up quirk entries with macrosTakashi Iwai2020-05-281-63/+30
| | | | | | | | Introduced a couple of macros to simplify some quirk entries. Just cosmetic, no functional changes. Link: https://lore.kernel.org/r/20200527061227.24915-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Quirks for Gigabyte TRX40 Aorus Master onboard audioTakashi Iwai2020-05-271-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gigabyte TRX40 Aorus Master is equipped with two USB-audio devices, a Realtek ALC1220-VB codec (USB ID 0414:a001) and an ESS SABRE9218 DAC (USB ID 0414:a000). The latter serves solely for the headphone output on the front panel while the former serves for the rest I/Os (mostly for the I/Os in the rear panel but also including the front mic). Both chips do work more or less with the unmodified USB-audio driver, but there are a few glitches. The ALC1220-VB returns an error for an inquiry to some jacks, as already seen on other TRX40-based mobos. However this machine has a slightly incompatible configuration, hence the existing mapping cannot be used as is. Meanwhile the ESS chip seems working without any quirk. But since both audio devices don't provide any specific names, both cards appear as "USB-Audio", and it's quite confusing for users. This patch is an attempt to overcome those issues: - The specific mapping table for ALC1220-VB is provided, reducing the non-working nodes and renaming the badly chosen controls. The connector map isn't needed here unlike other TRX40 quirks. - For both USB IDs (0414:a000 and 0414:a001), provide specific card name strings, so that user-space can identify more easily; and more importantly, UCM profile can be applied to each. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200526082810.29506-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: add mapping for ASRock TRX40 CreatorAndrew Oakley2020-05-041-0/+1
| | | | | | | | | | | | | | | | | This is another TRX40 based motherboard with ALC1220-VB USB-audio that requires a static mapping table. This motherboard also has a PCI device which advertises no codecs. The PCI ID is 1022:1487 and PCI SSID is 1022:d102. As this is using the AMD vendor ID, don't blacklist for now in case other boards have a working audio device with the same ssid. alsa-info.sh report for this board: http://alsa-project.org/db/?f=0a742f89066527497b77ce16bca486daccf8a70c Signed-off-by: Andrew Oakley <andrew@adoakley.name> Link: https://lore.kernel.org/r/20200503141639.35519-1-andrew@adoakley.name Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add quirk for Focusrite Scarlett 2i2Gregor Pintar2020-04-211-84/+0
| | | | | | | | | | | | | | | | | | Force it to use asynchronous playback. Same quirk has already been added for Focusrite Scarlett Solo (2nd gen) with a commit 46f5710f0b88 ("ALSA: usb-audio: Add quirk for Focusrite Scarlett Solo"). This also seems to prevent regular clicks when playing at 44100Hz on Scarlett 2i2 (2nd gen). I did not notice any side effects. Moved both quirks to snd_usb_audioformat_attributes_quirk() as suggested. Signed-off-by: Gregor Pintar <grpintar@gmail.com> Reviewed-by: Alexander Tsoy <alexander@tsoy.me> Link: https://lore.kernel.org/r/20200420214030.2361-1-grpintar@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add static mapping table for ALC1220-VB-based mobosTakashi Iwai2020-04-201-0/+14
| | | | | | | | | | | | | | | | | TRX40 mobos from MSI and others with ALC1220-VB USB-audio device need yet more quirks for the proper control names. This patch provides the mapping table for those boards, correcting the FU names for volume and mute controls as well as the terminal names for jack controls. It also improves build_connector_control() not to add the directional suffix blindly if the string is given from the mapping table. With this patch applied, the new UCM profiles will be effective. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206873 Link: https://lore.kernel.org/r/20200420062036.28567-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add Pioneer DJ DJM-250MK2 quirkFrantišek Kučera2020-04-031-0/+42
| | | | | | | | | | | Pioneer DJ DJM-250MK2 is a mixer that acts like a USB sound card. The MIDI controller part is standard but the PCM part is "vendor specific". Output is enabled by this quirk: 8 channels, 48 000 Hz, S24_3LE. Input is not working. Signed-off-by: František Kučera <franta-linux@frantovo.cz> Link: https://lore.kernel.org/r/20200401095907.3387-1-konference@frantovo.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add support for MOTU MicroBook IIcAlexander Tsoy2020-03-061-1/+1
| | | | | | | | | | | | | | | | | | | MicroBook IIc operates in UAC2 mode by default. This patch addresses several issues with it: - MicroBook II and IIc shares the same USB ID. We can distinguish them by interface class. - MaxPacketsOnly attribute is erroneously set in endpoint descriptors. As a result this card produces noise with all sample rates other than 96 KHz. This also causes issues like IOMMU page faults and other problems with host controller. - Sample rate changes takes more than 2 seconds for this device. Clock validity request returns false during that period, so the clock validity quirk is required. Signed-off-by: Alexander Tsoy <alexander@tsoy.me> Link: https://lore.kernel.org/r/20200229151815.14199-1-alexander@tsoy.me Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: set the interface format after resume on Dell WD19Hui Wang2019-12-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Recently we found the headset-mic on the Dell Dock WD19 doesn't work anymore after s3 (s2i or deep), this problem could be workarounded by closing (pcm_close) the app and then reopening (pcm_open) the app, so this bug is not easy to be detected by users. When problem happens, retire_capture_urb() could still be called periodically, but the size of captured data is always 0, it could be a firmware bug on the dock. Anyway I found after resuming, the snd_usb_pcm_prepare() will be called, and if we forcibly run set_format() to set the interface and its endpoint, the capture size will be normal again. This problem and workaound also apply to playback. To fix it in the kernel, add a quirk to let set_format() run forcibly once after resume. Signed-off-by: Hui Wang <hui.wang@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191218132650.6303-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add Pioneer DDJ-SX3 PCM quirckArd van Breemen2019-08-061-0/+57
| | | | | | | | | The Pioneer DDJ-SX3 is a plain 12 32bit channel out and 10 channel in PCM/midi controller. The PCM part is "vendor specific". It needs the "ignore invalid bsynchaddress" patch as it uses 0 for that. Signed-off-by: Ard van Breemen <ard@kwaak.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'asoc-v5.3' of ↵Takashi Iwai2019-07-081-15/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.3 This is a very big update, mainly thanks to Morimoto-san's refactoring work and some fairly large new drivers. - Lots more work on moving towards a component based framework from Morimoto-san. - Support for force disconnecting muxes from Jerome Brunet. - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant CX2072X, Realtek RT1011 and RT1308. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156Thomas Gleixner2019-05-301-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | ALSA: usb-audio: Enable .product_name override for Emagic, Unitor 8.Stefan Sauer2019-06-111-1/+1
|/ | | | | | | | | | | | | | The Emagic Unitor 8 does not provide iManufacturer and iProduct fields in its device descriptor. These fields are used by alsa to make build the device name. Thus uncomment the .product-name in the quirks-table. Without this change the device shows up as 'USB Device 0x86a:0x01'. Output of lsusb and amidi: https://gist.github.com/ensonic/7820a102e91f31575be355da2b6b33bc Signed-off-by: Stefan Sauer <ensonic@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'sound-5.2-rc1' of ↵Linus Torvalds2019-05-091-0/+84
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "The most significant changes at this cycle are the Sound Open Firmware support from Intel for the common DSP framework along with its support for Intel platforms. It's a door opened to a real "free" firmware (in the sense of FOSS), and other parties show interests in it. In addition to SOF, we've got a bunch of updates and fixes as usual. Some highlights are below. ALSA core: - Cleanups and fixes in ALSA timer code to cover some races spotted by syzkaller - Cleanups and fixes in ALSA sequencer code to cover some races, again unsurprisingly, spotted by syzkaller - Optimize the common page allocation helper with alloc_pages_exact() ASoC: - Add SOF core support, as well as Intel SOF platform support - Generic card driver improvements: support for MCLK/sample rate ratio and pin switches - A big set of improvements to TLV320AIC32x4 drivers - New drivers for Freescale audio mixers, several Intel machines, several Mediatek machines, Meson G12A, Spreadtrum compressed audio and DMA devices HD-audio: - A few Realtek codec fixes for reducing pop noises - Quirks for Chromebooks - Workaround for faulty connection report on AMD/Nvidia HDMI Others: - A quirk for Focusrite Scarlett Solo USB-audio - Add support for MOTU 8pre FireWire - 24bit sample format support in aloop - GUS patch format support (finally, over a decade) in native emux synth code" * tag 'sound-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (375 commits) ASoC: SOF: Fix unused variable warnings ALSA: line6: toneport: Fix broken usage of timer for delayed execution ALSA: aica: Fix a long-time build breakage ALSA: hda/realtek - Support low power consumption for ALC256 ASoC: stm32: i2s: update pcm hardware constraints ASoC: codec: hdac_hdmi: no checking monitor in hw_params ASoC: mediatek: mt6358: save PGA for mixer control ASoC: mediatek: mt6358: save output volume for mixer controls ASoC: mediatek: mt6358: initialize setting when ramping volume ASoC: SOF: core: fix undefined nocodec reference ASoC: SOF: xtensa: fix undefined references ASoC: SOF: Propagate sof_get_ctrl_copy_params() error properly ALSA: hdea/realtek - Headset fixup for System76 Gazelle (gaze14) ALSA: hda/intel: add CometLake PCI IDs ALSA: hda/realtek - Support low power consumption for ALC295 ASoC: rockchip: Fix an uninitialized variable compile warning ASoC: SOF: Fix a compile warning with CONFIG_PCI=n ASoC: da7219: Fix a compile warning at CONFIG_COMMON_CLK=n ASoC: sound/soc/sof/: fix kconfig dependency warning ASoC: stm32: spdifrx: change trace level on iec control ...
| * ALSA: usb-audio: Add quirk for Focusrite Scarlett SoloRoope Salmi2019-04-151-0/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device reports Synch: Synchronous on the playback interface. This causes regular audible napping on sample rates that are not multiples of 1 kHz. Fix to Synch: Asynchronous. Specifically observed on Focusrite Scarlett Solo 2nd generation. I assume the first generation model has a different device ID. A first generation Scarlett 2i2 I was able to test advertised Synch: Asynchronous by default. For example, with a sample rate of 44100 Hz, a silent sample is played every 40.96 seconds (likely 44.0 samples instead of 44.1 transmitted per USB frame on average, 4096 being the size of some internal buffer). There may be some other bug at play here since this doesn't happen on other platforms. However, a feedback endpoint is listed and using it fixes the issue. That is the only change in the quirk, but I didn't find a way to declare only it. Tested on two units and on two different computers. Signed-off-by: Roope Salmi <rpsalmi@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | media: sound/usb: Use Media Controller API to share media resourcesShuah Khan2019-04-221-0/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Media Device Allocator API to allows multiple drivers share a media device. This API solves a very common use-case for media devices where one physical device (an USB stick) provides both audio and video. When such media device exposes a standard USB Audio class, a proprietary Video class, two or more independent drivers will share a single physical USB bridge. In such cases, it is necessary to coordinate access to the shared resource. Using this API, drivers can allocate a media device with the shared struct device as the key. Once the media device is allocated by a driver, other drivers can get a reference to it. The media device is released when all the references are released. Change the ALSA driver to use the Media Controller API to share media resources with DVB, and V4L2 drivers on a AU0828 media device. The Media Controller specific initialization is done after sound card is registered. ALSA creates Media interface and entity function graph nodes for Control, Mixer, PCM Playback, and PCM Capture devices. snd_usb_hw_params() will call Media Controller enable source handler interface to request the media resource. If resource request is granted, it will release it from snd_usb_hw_free(). If resource is busy, -EBUSY is returned. Media specific cleanup is done in usb_audio_disconnect(). Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Shuah Khan <shuah@kernel.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* ALSA: usb-audio: Add quirk for MOTU MicroBook IIManuel Reinhardt2019-02-281-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an entry to the quirks-table to for usb-audio to recognize the Microbook II (although it only exposes vendor interfaces). A simple boot quirk is also implemented to set up the sample rate and make sure that no audio urbs are sent before the device is ready. This patch only provides audio playback and capture at 96kHz sample rate. Notice the following shortcomings: - The sample rate is currently hardcoded to 96k although the device also supports 48k and 44.1k. - The various mixer controls of the MicroBook are not made available. - The keep-iface control should be on by default because the device shuts down whenever the altsetting is reset which is usually unwanted. (I don't know the best way to do this) - The communication format used by the MicroBook for sample rate setting and also other setup has been reverse engineered by looking at the usbmon output while running the windows driver through virtualbox. In this patch the first byte of every message is set to \0 while in the observed communications the first byte acts as a "message-counter" increasing its value with every message sent. Leaving it at \0 does not seem to affect the device. Signed-off-by: Manuel Reinhardt <manuel.rhdt@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirksHui Peng2019-01-071-0/+6
| | | | | | | | | | | | | | | | | | | | | In `create_composite_quirk`, the terminating condition of for loops is `quirk->ifnum < 0`. So any composite quirks should end with `struct snd_usb_audio_quirk` object with ifnum < 0. for (quirk = quirk_comp->data; quirk->ifnum >= 0; ++quirk) { ..... } the data field of Bower's & Wilkins PX headphones usb device device quirks do not end with {.ifnum = -1}, wihch may result in out-of-bound read. This Patch fix the bug by adding an ending quirk object. Fixes: 240a8af929c7 ("ALSA: usb-audio: Add a quirck for B&W PX headphones") Signed-off-by: Hui Peng <benquike@163.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add vendor and product name for Dell WD19 DockHui Wang2018-11-281-0/+10
| | | | | | | | | Like the Dell WD15 Dock, the WD19 Dock (0bda:402e) doens't provide useful string for the vendor and product names too. In order to share the UCM with WD15, here we keep the profile_name same as the WD15. Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: update quirk for B&W PX to remove microphoneNicolas Huaman2018-10-041-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | A quirk in snd-usb-audio was added to automate setting sample rate to 4800k and remove the previously exposed nonfunctional microphone for the Bowers & Wilkins PX: commit 240a8af929c7c57dcde28682725b29cf8474e8e5 https://lore.kernel.org/patchwork/patch/919689/ However the headphones where updated shortly after that to remove the unintentional microphone functionality. I guess because of this the headphones now crash when connecting them via USB while the quirk is active. Dmesg: snd-usb-audio: probe of 2-3:1.0 failed with error -22 usb 2-3: 2:1: cannot get min/max values for control 2 (id 2) This patch removes the microfone and allows the headphones to connect and work out of the box. It is based on the current mainline kernel and successfully applied an tested on my machine (4.18.10.arch1-1). Fixes: 240a8af929c7 ("ALSA: usb-audio: Add a quirck for B&W PX headphones") Signed-off-by: Nicolas Huaman <nicolas@herochao.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Fix multiple definitions in AU0828_DEVICE() macroTakashi Iwai2018-07-261-1/+2
| | | | | | | | | | | | | | | AU0828_DEVICE() macro in quirks-table.h uses USB_DEVICE_VENDOR_SPEC() for expanding idVendor and idProduct fields. However, the latter macro adds also match_flags and bInterfaceClass, which are different from the values AU0828_DEVICE() macro sets after that. For fixing them, just expand idVendor and idProduct fields manually in AU0828_DEVICE(). This fixes sparse warnings like: sound/usb/quirks-table.h:2892:1: warning: Initializer entry defined twice Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Disable the quirk for Nura headsetTakashi Iwai2018-06-121-0/+5
| | | | | | | | | | | | | | | | | | The commit 33193dca671c ("ALSA: usb-audio: Add a quirk for Nura's first gen headset") added a quirk for Nura headset with USB ID 0a12:1243, with a hope that it doesn't conflict with others. Unfortunately, other devices (e.g. Philips Wecall) with the very same ID got broken by this change, spewing an error like: usb 2-1.8.2: 2:1: cannot set freq 48000 to ep 0x3 Until we find a proper solution, fix the regression at first by disabling the added quirk entry. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199905 Fixes: 33193dca671c ("ALSA: usb-audio: Add a quirk for Nura's first gen headset") Reviewed-by: Martin Peres <martin.peres@free.fr> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Give proper vendor/product name for Dell WD15 DockTakashi Iwai2018-05-021-0/+10
| | | | | | | | Dell WD15 Dock with 0bda:4014 doesn't give any useful strings for the vendor and the product names. Name them more specifically via quirk, as well as the UCM profile name. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add a quirck for B&W PX headphonesErik Veijola2018-02-241-0/+47
| | | | | | | | | The capture interface doesn't work and the playback interface only supports 48 kHz sampling rate even though it advertises more rates. Signed-off-by: Erik Veijola <erik.veijola@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add a quirk for Nura's first gen headsetMartin Peres2018-01-151-0/+48
| | | | | | | | | | | | | The capture interface does not work, and the playback interface actually supports only 48kHz unlike what is advertised (44.1, 32, 22, 16, 8). The only unknown here is if there are other devices that use the same product ID, but given that this ID is currently unknown, I would assume it is specially allocated for the nura headset. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: usb-audio: Add quirk for Syntek STK1160Marcel Hasler2016-10-271-0/+17
| | | | | | | | | | | The stk1160 chip needs QUIRK_AUDIO_ALIGN_TRANSFER. This patch resolves the issue reported on the mailing list (http://marc.info/?l=linux-sound&m=139223599126215&w=2) and also fixes bug 180071 (https://bugzilla.kernel.org/show_bug.cgi?id=180071). Signed-off-by: Marcel Hasler <mahasler@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [media] Revert "[media] sound/usb: Use Media Controller API to share media ↵Mauro Carvalho Chehab2016-03-311-1/+0
| | | | | | | | | | | | | | | | | | | resources" Unfortunately, this patch caused several regressions at au0828 and snd-usb-audio, like this one: https://bugzilla.kernel.org/show_bug.cgi?id=115561 It also showed several troubles at the MC core that handles pretty poorly the memory protections and data lifetime management. So, better to revert it and fix the core before reapplying this change. This reverts commit aebb2b89bff0 ("[media] sound/usb: Use Media Controller API to share media resources")' Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] sound/usb: Use Media Controller API to share media resourcesShuah Khan2016-03-031-0/+1
| | | | | | | | | | | | | | | | | | | Change ALSA driver to use Media Controller API to share media resources with DVB and V4L2 drivers on a AU0828 media device. Media Controller specific initialization is done after sound card is registered. ALSA creates Media interface and entity function graph nodes for Control, Mixer, PCM Playback, and PCM Capture devices. snd_usb_hw_params() will call Media Controller enable source handler interface to request the media resource. If resource request is granted, it will release it from snd_usb_hw_free(). If resource is busy, -EBUSY is returned. Media specific cleanup is done in usb_audio_disconnect(). Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* ALSA: usb-audio: prevent CH345 multiport output SysEx corruptionClemens Ladisch2015-11-161-0/+11
| | | | | | | | | | | | | | | | | | | The CH345 USB MIDI chip has two output ports. However, they are multiplexed through one pin, and the number of ports cannot be reduced even for hardware that implements only one connector, so for those devices, data sent to either port ends up on the same hardware output. This becomes a problem when both ports are used at the same time, as longer MIDI commands (such as SysEx messages) are likely to be interrupted by messages from the other port, and thus to get lost. It would not be possible for the driver to detect how many ports the device actually has, except that in practice, _all_ devices built with the CH345 have only one port. So we can just ignore the device's descriptors, and hardcode one output port. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: USB-audio: Remove mixer entry from Zoom R16/24 quirkRicard Wanderlof2015-10-191-7/+0
| | | | | | | | The device has no mixer (and identifies itself as such), so just skip the mixer definition. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: USB-audio: Add quirk for Zoom R16/24 playbackRicard Wanderlof2015-10-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Zoom R16/24 have a nonstandard playback format where each isochronous packet contains a length descriptor in the first four bytes. (Curiously, capture data does not contain this and requires no quirk.) The quirk involves adding the extra length descriptor whenever outgoing isochronous packets are generated, both in pcm.c (outgoing audio) and endpoint.c (silent data). In order to make the quirk as unintrusive as possible, for pcm.c:prepare_playback_urb(), the isochronous packet descriptors are initially set up in the same way no matter if the quirk is enabled or not. Once it is time to actually copy the data into the outgoing packet buffer (together with the added length descriptors) the isochronous descriptors are adjusted in order take the increased payload length into account. For endpoint.c:prepare_silent_urb() it makes more sense to modify the actual function, partly because the function is less complex to start with and partly because it is not as time-critical as prepare_playback_urb() (whose bulk is run with interrupts disabled), so the (minute) additional time spent in the non-quirk case is motivated by the simplicity of having a single function for all cases. The quirk is controlled by the new tx_length_quirk member in struct snd_usb_substream and struct snd_usb_audio, which is conveyed to pcm.c and endpoint.c from quirks.c in a similar manner to the txfr_quirk member in the same structs. In contrast to txfr_quirk however, the quirk is enabled directly in quirks.c:create_standard_audio_quirk() by checking the USB ID in that function. Another option would be to introduce a new QUIRK_AUDIO_ZOOM_INTERFACE or somesuch, which would have made the quirk very plain to see in the quirk table, but it was felt that the additional code needed to implement it this way would just make the implementation more complex with no real gain. Tested with a Zoom R16, both by doing capture and playback separately using arecord and aplay (8 channel capture and 2 channel playback, respectively), as well as capture and playback together using Ardour, as well as Audacity and Qtractor together with jackd. The R24 is reportedly compatible with the R16 when used as an audio interface. Both devices share the same USB ID and have the same number of inputs (8) and outputs (2). Therefore "R16/24" is mentioned throughout the patch. Regression tested using an Edirol UA-5 in both class compliant (16-bit) and "advanced" (24 bit, forces the use of quirks) modes. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Tested-by: Panu Matilainen <pmatilai@laiskiainen.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>