aboutsummaryrefslogtreecommitdiffstats
path: root/sound/i2c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2018-06-13ALSA: hda/realtek - Add shutup hintTakashi Iwai1-0/+3
The pin shutup callback seems working well on some devices while it does harm on some other devices; e.g. Lenovo laptops show often the noises at (runtime) PM with the pin shutup enabled. Currently, the only way to disable the pin shutup is to hard-code spec->shutup = alc_no_shutup; in the fixup, and this makes the debugging harder for normal users. For allowing users to test the similar effect without recompiling the kernel, this patch adds a new hint string "shutup". It's a boolean value, and by passing false to this, user can turn off the pin shutup call. For example, to turn off the shutup on Lenovo P50, create a "firmware patch" file (e.g. /lib/firmware/alsa/lenovo-p50) containing the following lines: [codec] 0x10ec0298 0x17aa222e 0 [hint] shutup = no and pass the file via patch option of snd-hda-intel module (e.g. patch=alsa/lenovo-p50). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-12ALSA: usb-audio: Disable the quirk for Nura headsetTakashi Iwai1-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>
2018-06-12ALSA: hda: add dock and led support for HP ProBook 640 G4Dennis Wassenberg1-0/+1
This patch adds missing initialisation for HP 2013 UltraSlim Dock Line-In/Out PINs and activates keyboard mute/micmute leds for HP ProBook 640 G4 Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-12ALSA: hda: add dock and led support for HP EliteBook 830 G5Dennis Wassenberg1-0/+1
This patch adds missing initialisation for HP 2013 UltraSlim Dock Line-In/Out PINs and activates keyboard mute/micmute leds for HP EliteBook 830 G5 Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-11ALSA: emu10k1: add error handling for snd_ctl_addZhouyang Jia1-1/+3
When snd_ctl_add fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling snd_ctl_add. Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-11ALSA: fm801: add error handling for snd_ctl_addZhouyang Jia1-4/+12
When snd_ctl_add fails, the lack of error-handling code may cause unexpected results. This patch adds error-handling code after calling snd_ctl_add. Signed-off-by: Zhouyang Jia <jiazhouyang09@gmail.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-04ASoC: dapm: delete dapm_kcontrol_data paths list before freeing itSrinivas Kandagatla1-0/+2
dapm_kcontrol_data is freed as part of dapm_kcontrol_free(), leaving the paths pointer dangling in the list. This leads to system crash when we try to unload and reload sound card. I hit this bug during ADSP crash/reboot test case on Dragon board DB410c. Without this patch, on SLAB Poisoning enabled build, kernel crashes with "BUG kmalloc-128 (Tainted: G W ): Poison overwritten" Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2018-06-04ALSA: usb-audio: remove redundant check on errColin Ian King1-2/+0
The check on err is redundant as both the true and false paths end up on a break statement. Remove the redundant check. Detected by CoverityScan, CID#1268773 ("Identical code for different branches") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-01ASoC: topology: Move skl-tplg-interface.h to uapiGuenter Roeck5-14/+5
skl-tplg-interface.h describes firmware format details for Skylake topology files. It is part of the ABI and should reside in the uapi directory. While moving the file, also replace the license boilerplate with the SPDX License Identifier. No functional change. Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-01ASoC: topology: Move v4 manifest header data structures to uapiGuenter Roeck2-56/+57
Topology manifest v4 is still part of the ABI. Move its data structures into the uapi header file. No functional change. Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-01ASoC: topology: Improve backwards compatibility with v4 topology filesGuenter Roeck3-2/+248
Commit dc31e741db49 ("ASoC: topology: ABI - Add the types for BE DAI") introduced sound topology files version 5. Initially, this change made the topology code incompatible with v4 topology files. Backwards compatibility with v4 configuration files was subsequently added with commit 288b8da7e992 ("ASoC: topology: Support topology file of ABI v4"). Unfortunately, backwards compatibility was never fully implemented. First, the manifest size in (Skylake) v4 configuration files is set to 0, which causes manifest_new_ver() to bail out with error messages similar to the following. snd_soc_skl 0000:00:1f.3: ASoC: invalid manifest size snd_soc_skl 0000:00:1f.3: tplg component load failed-22 snd_soc_skl 0000:00:1f.3: Failed to init topology! snd_soc_skl 0000:00:1f.3: ASoC: failed to probe component -22 skl_n88l25_m98357a skl_n88l25_m98357a: ASoC: failed to instantiate card -22 skl_n88l25_m98357a: probe of skl_n88l25_m98357a failed with error -22 After this problem is fixed, the following error message is seen instead. snd_soc_skl 0000:00:1f.3: ASoC: old version of manifest snd_soc_skl 0000:00:1f.3: Invalid descriptor token 1093938482 snd_soc_skl 0000:00:1f.3: ASoC: failed to load widget media0_in cpr 0 snd_soc_skl 0000:00:1f.3: tPlg component load failed-22 This message is seen because backwards compatibility for loading widgets was never implemented. The lack of audio support when running the upstream kernel on recent Chromebooks has been reported in various forums, and can be traced back to this problem. Attempts to fix the problem, usually by providing v5 configuration files, were only partially successful. Let's implement backward compatibility properly to solve the problem for good. Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-01ALSA: pci/hda: Remove unused, broken, header fileBen Hutchings1-40/+0
sound/pci/hda/local.h seems to be an earlier version of sound/hda/local.h; it was added at the same time but doesn't seem to have ever been used (within the git history). Most of its macros depend on a hdac_read_parm() function which is not defined anywhere. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-01ASoC: TSCS454: Add SupportSteven Eckhoff5-0/+5853
Currently there is no support for Tempo Semiconductor's TSCS454 CODEC. Add support for it. Signed-off-by: Steven Eckhoff <steven.eckhoff.opensource@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-01ASoC: Intel: kbl: Move codec sysclk config to codec_init functionMac Chiang1-8/+9
On APL, commit fd0f237572ad ("ASoC: Intel: bxt: Move codec sysclk config to codec_init function") fixed an issue related to jack detection. The MCLK for DA7219 does not change in this platform, but is currently being configured everytime as part of the platform_clock event handler for DAPM. The upshot of this is that we have unnecessary calls to this function, and it also means that if a stream hasn't yet been started, DA7219 driver does not have the correct MCLK rates programmed and so the HP detection feature does not operate as expected. The same fix is needed on KBL. This patch rectifies this issue by moving the sysclk call to codec_init function so it's only called once at initialisation. Signed-off-by: Mac Chiang <mac.chiang@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-01ASoC: simple-card: set cpu dai clk in hw_paramsDaniel Mack2-0/+26
The simple-card driver currently accepts a clock node in the cpu dai sub-node and only uses it as an alternative to the 'system-clock-frequency' property to get the current frequency. This patch adds another use of the passed clock node. If mclk-fs is specified, the clocks in cpu and codec dai sub-nodes will be set to the calculated rate (stream rate * mclk_fs) in hw_params. This allows platforms to pass tuneable clocks as phandle that will automatically be set to the right rates. Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-01ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()Bo Chen1-1/+3
When 'kzalloc()' fails in 'snd_hda_attach_pcm_stream()', a new pcm instance is created without setting its operators via 'snd_pcm_set_ops()'. Following operations on the new pcm instance can trigger kernel null pointer dereferences and cause kernel oops. This bug was found with my work on building a gray-box fault-injection tool for linux-kernel-module binaries. A kernel null pointer dereference was confirmed from line 'substream->ops->open()' in function 'snd_pcm_open_substream()' in file 'sound/core/pcm_native.c'. This patch fixes the bug by calling 'snd_device_free()' in the error handling path of 'kzalloc()', which removes the new pcm instance from the snd card before returns with an error code. Signed-off-by: Bo Chen <chenbo@pdx.edu> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-31ALSA: oxygen: use match_string() helperYisheng Xie1-7/+7
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-31ASoC: dapm: use match_string() helperXie Yisheng1-11/+7
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: max98095: use match_string() helperXie Yisheng1-8/+5
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: max98088: use match_string() helperXie Yisheng1-8/+5
match_string() returns the index of an array for a matching string, which can be used instead of open coded variant. Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: Intel: bytcr_rt5651: Set card long_name based on quirksHans de Goede1-0/+11
Many X86 devices using a BYT SoC + RT5651 codec are cheap devices with generic DMI strings, causing snd_soc_set_dmi_name() to fail to set a long_name, making it impossible for userspace to have a correct UCM profile which knowns which input is connected to the internal mic, which input is connected to the hsmic (for correct jack-based switching) and which inputs are unused. Our quirks already specify which inputs the internal and headset mic are connected to. This commit sets a long_name based on the quirks so that userspace can have UCM profiles doing the right thing based on the long_name. Note that if we ever encounter the need for a special UCM profile for some device we can add a quirk to set a specific long_name for the device, Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: mt6797-mt6351: add hostless phone call pathKai Chieh Chuang1-0/+46
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: mt6797: add Hostless DAIKai Chieh Chuang5-0/+129
add path for hosltess lpbk from ADDA Capture to ADDA Playback add path for hostless phone call between ADDA DAI and PCM DAI Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: mt6797: add PCM interfaceKai Chieh Chuang5-0/+494
Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: mediatek: export mtk-afe symbols as neededArnd Bergmann1-0/+5
The new mt6797-afe driver uses some functions in a common file, which works for a built-in driver but fails for a loadable module: ERROR: "mtk_afe_pcm_free" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_add_sub_dai_control" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_pcm_new" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_combine_sub_dai" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! ERROR: "mtk_afe_pcm_ops" [sound/soc/mediatek/mt6797/snd-soc-mt6797-afe.ko] undefined! This exports the five symbols above for modules. Fixes: b3c702f56bf5 ("ASoC: mt6797: combine DAI to register component") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: codecs: PCM1789: include gpio/consumer.hArnd Bergmann1-1/+1
When CONFIG_GPIOLIB is disabled, this codec fails to build because gpio/consumer.h is not included implicitly. sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init': sound/soc/codecs/pcm1789.c:247:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration] pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~~~~~~~~~~ Fixes: 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ALSA: xen-front: fix a loop timeoutDan Carpenter1-1/+1
We want the loop to exit when "to" is set to zero, but in the current code it's set to -1. Also I tweaked the indenting so it doesn't look like we're passing "--to" to xenbus_read_unsigned(). Fixes: cc3196ae197c ("ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-30ASoC: core: Fix return code shown on error for hw_paramsJon Hunter1-1/+1
When the call to hw_params for a component fails, the error code is held by the variable '__ret' but the error message displays the value held by the variable 'ret'. Fix the return code shown when hw_params fails for a component. Fixes: b8135864d4d3 ("ASoC: snd_soc_component_driver has snd_pcm_ops") Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-30ALSA: xen-front: freeing an error pointerDan Carpenter1-0/+2
kfree() doesn't accept error pointers so I've set "str" to NULL on these paths. Fixes: fd3b36045c2c ("ALSA: xen-front: Read sound driver configuration from Xen store") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-30ASoC: imx-audmux: add RXFS/RXCLK defines for 6-wire connectionsPhilipp Zabel1-0/+7
In asynchronous mode, a RxFS and RxClk connection needs to be made between two ports. Add a define for the bit to be set in the *SEL fields. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> [m.felsch@pengutronix.de: fixed comment to include i.MX21 and 35] Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-30ASoC: fix 0-day warnings with snd_soc_new_compress()Pierre-Louis Bossart1-0/+5
All conditionally-defined routines in include/sound/soc.h expose a static inline fallback to avoid 0-day warnings and compilation issues, except snd_soc_new_compress(). Fixes: 5db6aab6f36f ('ASoC: topology: Add support for compressed PCMs') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-30ALSA: hda/realtek - Enable mic-mute hotkey for several Lenovo AIOsHui Wang1-1/+5
We have several Lenovo AIOs like M810z, M820z and M920z, they have the same design for mic-mute hotkey and led and they use the same codec with the same pin configuration, so use the pin conf table to apply fix to all of them. Fixes: 29693efcea0f ("ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine") Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-29ALSA: hda/realtek - Fixup for HP x360 laptops with B&O speakersTom Briden2-1/+106
Added a new helper file for these fixups due to requiring a huge number of coefs being set to get the top speakers to work, as well as setting pin 0x17 for the top speakers and the correct input source of 0x17 for volume control [ Note: this is a revised work based on Tom's fixup patch with the replacement of the full COEF tables provided by Realtek. Also, the fixup function has a proper HDA_FIXUP_ACT_* handling now. The credit for the new COEF table goes to Kailang -- tiwai ] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189331 Cc: Kailang Yang <kailang@realtek.com> Signed-off-by: Tom Briden <tom@decompile.me.uk> Tested-by: Tom Briden <tom@decompile.me.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-05-29ASoC: atmel-i2s: add driver for the new Atmel I2S controllerCyrille Pitchen3-0/+776
This patch adds support for the Atmel I2S controller embedded into sama5d2x SoCs. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>