- 12 Jan, 2021 3 commits
-
-
Hans de Goede authored
sound/soc/soc-core.c: soc_remove_component() unconditionally calls snd_soc_component_set_jack(component, NULL, NULL); on any components being removed. This means that on machines where the machine-driver does not provide a jack through snd_soc_component_set_jack() es8316_disable_jack_detect() will still get called and at this time es8316->jack will be NULL and the es8316->jack->status check in es8316_disable_jack_detect() will lead to a NULL pointer deref. Fix this by checking for es8316->jack bein NULL at the start of es8316_disable_jack_detect() and turn the function into a no-op in that case. Cc: russianneuromancer <russianneuromancer@ya.ru> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210112101725.44200-1-hdegoede@redhat.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Xu Wang authored
Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20210108084456.6603-1-vulab@iscas.ac.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
Hans de Goede authored
Move the snd_soc_dai_set_tdm_slot() call from cht_codec_init() to cht_codec_fixup(). There are 2 reasons for doing this: 1. This aligns the cht_bsw_nau8824 with all the other BYT/CHT machine drivers which also do this from their codec_fixup function. 2. When using the SOF driver, things like the TDM info is set from the topology file. Moving the call to the codec_fixup function, which gets skipped when using the SOF driver avoids the call interfering with the settings when using the SOF driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210107115324.11602-1-hdegoede@redhat.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 11 Jan, 2021 11 commits
-
-
Mark Brown authored
Merge series "ASoC: rt5645: Enable internal mic and headset on ECS EF20" from Chris Chiu <chiu@endlessos.org>: These patches are trying to fix the jack detection and internal microphone problems on ECS EF20 series laptops which are empowered by Intel Atom x5-Z8350 CPU (CherryTrail) with Realtek rt5645 audio codec. --- v2 -> v3: Restore the accidentally removed terminator of the dmi_platform_data[]. v1 -> v2: Invoke callback() of the DMI quirk if it exists, because the dmi_first_match() doesn't. --- Chris Chiu (4): ASoC: rt5645: Introduce mapping for ACPI-defined GPIO ASoC: rt5645: Add ACPI-defined GPIO for ECS EF20 series ASoC: rt5645: add inv_hp_det flag ASoC: rt5645: Enable internal microphone and JD on ECS EF20 include/sound/rt5645.h | 2 ++ sound/soc/codecs/rt5645.c | 45 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) -- 2.20.1
-
Mark Brown authored
Merge series "Enable DMA mode on Intel Keem Bay platform" from Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>: v2: Update patch to align with latest kernel release. v1: Initial patch version, to enable DMA mode on Intel Keembay platform. Michael Sit Wei Hong (2): dt-bindings: sound: intel, keembay-i2s: Add info for device to use DMA ASoC: Intel: KMB: Enable DMA transfer mode .../bindings/sound/intel,keembay-i2s.yaml | 14 ++ sound/soc/intel/Kconfig | 2 + sound/soc/intel/keembay/kmb_platform.c | 157 ++++++++++++++++-- sound/soc/intel/keembay/kmb_platform.h | 9 + 4 files changed, 167 insertions(+), 15 deletions(-) -- 2.17.1
-
Dan Carpenter authored
The error path here doesn't set "ret" so it returns uninitialized data instead of a negative error code. Fixes: 2c138284 ("ASoC: soc-pcm: disconnect BEs if the FE is not ready") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X/wfXQFxeMLvpO+1@mwandaSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
wm_adsp_read_data_word() used if (ret) to check for an error from wm_adsp_read_raw_data_block(). While this is perfectly valid, wm_adsp_read_raw_data_block() itself uses if (ret < 0) and three calls to wm_adsp_read_data_word() also use if (ret < 0). This creates an error check chain like this: 1st) if (ret < 0) return ret; 2nd) if (ret) return ret; 3rd) if (ret < 0) ... This can confuse the compiler into thinking that there are possible returns > 0 from the middle if() that are not handled by the final if(). If this was true it would lead to using uninitialized variables later in the outer function. Fix this by changing the test in wm_adsp_read_data_word() to be if (ret < 0). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210111133825.8758-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Souptick Joarder authored
Kernel test robot throws below error -> sound/soc/soc-pcm.c:2523 dpcm_run_update_startup() error: uninitialized symbol 'ret'. Initializing ret = 0 and returning correct -ERRNO in failure path. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Link: https://lore.kernel.org/r/1610163901-5523-1-git-send-email-jrdr.linux@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shuming Fan authored
To avoid the pop noise, this patch enables the feature of fast discharge. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20210111092544.9064-1-shumingf@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Shuming Fan authored
This patch will be the workaround to fix getting the wrong device ID on the rare chance. It seems like something unstable when the system resumes. e.g. the bus clock This patch tries to read the device ID to check several times. After the test, the driver will get the correct device ID the second time. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://lore.kernel.org/r/20210111092740.9128-1-shumingf@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chris Chiu authored
On ECS EF20 series laptops, the internal mic is on DMIC2/IN2P. And they need the inv_hp_det to make jack detection to work as exoected. Signed-off-by: Chris Chiu <chiu@endlessos.org> Link: https://lore.kernel.org/r/20210111054141.4668-5-chiu@endlessos.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chris Chiu authored
The ECS EF20EA laptop use gpio for jack detection instead of rt5645 rt5645 JD. However, the GPIO polarity is inverse for hp-detect based on the _DSD property of the RTK2 device. Name (_DSD, Package () { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () {"hp-detect-gpio", Package() {^RTK2, 0, 0, 1 }}, } }) This flag will invert the hp-detect gpio polarity. Signed-off-by: Chris Chiu <chiu@endlessos.org> Link: https://lore.kernel.org/r/20210111054141.4668-4-chiu@endlessos.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chris Chiu authored
Add the hp-detect gpio for ECS EF20 series laptops based on the _CRS defined in DSDT table. Method (_CRS, 0, NotSerialized) { Name (SBUF, ResourceTemplate () { I2cSerialBusV2 (0x001A, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C2", 0x00, ResourceConsumer, , Exclusive, ) GpioInt (Edge, ActiveBoth, SharedAndWake, PullNone, 0x0000, "\\_SB.GPO3", 0x00, ResourceConsumer, , ) { // Pin list 0x004F } GpioIo (Shared, PullDefault, 0x0000, 0x0000, IoRestrictionInputOnly, "\\_SB.GPO3", 0x00, ResourceConsumer, , ) { // Pin list 0x004F } }) Return (SBUF) /* \_SB_.PCI0.I2C2.RTK2._CRS.SBUF */ } Signed-off-by: Chris Chiu <chiu@endlessos.org> Link: https://lore.kernel.org/r/20210111054141.4668-3-chiu@endlessos.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Chris Chiu authored
On at least one laptop (ECS EF20EA) the 'hp-detect' GPIO is defined in the DSDT table by the ACPI GpioIo resources in _CRS. The GPIO related information should be mapped to the rt5645 driver to enable the jack detection also on non-DT platforms. Signed-off-by: Chris Chiu <chiu@endlessos.org> Link: https://lore.kernel.org/r/20210111054141.4668-2-chiu@endlessos.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 08 Jan, 2021 3 commits
-
-
Michael Sit Wei Hong authored
Add descriptions for entries needed for audio device to use DMA channels for audio playback and capture. Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210108031248.20520-5-michael.wei.hong.sit@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Michael Sit Wei Hong authored
Enable DMA transfer mode for Intel Keem Bay ASoC platform driver. The driver will search the device tree for DMA resources at boot time to enable DMA transfer mode, and will proceed to use DMA transfer if the resource is available, otherwise the default PIO mode will be used. Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210108031248.20520-6-michael.wei.hong.sit@intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Xu Wang authored
Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Link: https://lore.kernel.org/r/20210108085834.7168-1-vulab@iscas.ac.cnSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 07 Jan, 2021 2 commits
-
-
朱灿灿 authored
FE is connected to two BEs, BE1 is active, BE2 is deactive. When closing BE1, FE/BE1 is in HW_FREE state, then BE2 is startup by mixer runtime update. For FE is in HW_FREE state, dpcm_run_update_startup() will skip BE2's startup because FE's state is HW_FREE, BE2 stays in FE's be_clients list. During FE's closed, the dpcm_fe_dai_close() will close all related BEs, BE2 will be closed. This will lead to BE2's dpcm[stream].users mismatch. We need disconnet all pending BEs in the corner case. Signed-off-by: zhucancan <zhucancan@vivo.com> Link: https://lore.kernel.org/r/AAoArwDfDnoefyxzy2wyiaqm.1.1608885766936.Hmail.zhucancan@vivo.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Hans de Goede authored
Remove a stale comment about SSP0 being untested, the bytcht_es8316 has supported SSP0 for a while now and this has been successfully tested on a GP electrinic T701 tablet. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210107120757.12051-1-hdegoede@redhat.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 06 Jan, 2021 1 commit
-
-
Thomas Bogendoerfer authored
CPU support for TX49xx is getting removed, so remove sound support for it. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Link: https://lore.kernel.org/r/20210105140305.141401-11-tsbogend@alpha.franken.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 05 Jan, 2021 2 commits
-
-
Tzung-Bi Shih authored
bclk_ratio is unused. Removes bclk_ratio and .set_bclk_ratio callback. Removes snd_soc_dai_set_bclk_ratio() in a few machine drivers which are obviously using rt1015. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224101854.3024823-1-tzungbi@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Assuming the calibration state gets lost after system suspend. Re-calibrates again when resuming. The rt1015_priv is alloced by kzalloc. No need to initialize cali_done to 0 in component probe callback. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201225030845.4138497-1-tzungbi@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 04 Jan, 2021 2 commits
-
-
Arnd Bergmann authored
The newly added driver requires DMA support and fails to build when that is disabled: aarch64-linux-ld: sound/soc/fsl/fsl_aud2htx.o: in function `fsl_aud2htx_probe': fsl_aud2htx.c:(.text+0x3e0): undefined reference to `imx_pcm_dma_init' Fixes: 8a24c834 ("ASoC: fsl_aud2htx: Add aud2htx module driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Link: https://lore.kernel.org/r/20210103135327.3630973-1-arnd@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Adam Ford authored
The driver can request an optional clock for mclk. Update the txt file to reflect this. Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Adam Ford <aford173@gmail.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20201217162740.1452000-1-aford173@gmail.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 31 Dec, 2020 3 commits
-
-
Arnd Bergmann authored
Randconfig builds often show harmless warnings like WARNING: unmet direct dependencies detected for SND_SOC_MT6359 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && MTK_PMIC_WRAP [=n] Selected by [y]: - SND_SOC_MT8192_MT6359_RT1015_RT5682 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && I2C [=y] && SND_SOC_MT8192 [=y] Add a dependency to avoid that. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201230154345.639122-1-arnd@kernel.orgSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
Sparse will complain about trying to convert between values declared as snd_ctl_elem_type_t and other types. This patch converts to consistently use snd_ctl_elem_type_t for control type values. A __force cast is needed in a couple of cases where the control type value is parsed out of a DSP data block. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201230172427.13865-2-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
This fixes some minor cases where u32 or unsigned int types were used to store big-endian data, and __be32 types used to store both big-endian and cpu-endian data. This was producing sparse warnings. Most cases resulted from using the same variable to hold the big-endian value and its converted cpu-endian value. These can be simply fixed by introducing another local variable, or avoiding storing the intermediate value back into the original variable. One special case is the raw_buf used in the compressed streams to transfer data from DSP to user-side. The endian conversion happens in-place (as there's no point introducing another buffer) so a cast to (__be32 *) is added when passing it to wm_adsp_read_raw_data_block(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201230172427.13865-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 30 Dec, 2020 1 commit
-
-
Oder Chiou authored
This patch removes the redundant delay time to speed up from the cold start of headphone playback. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Link: https://lore.kernel.org/r/20201230080235.12698-1-oder_chiou@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 29 Dec, 2020 7 commits
-
-
Mark Brown authored
The series refactors rt1015.c. The 1st patch sorts header inclusions alphabetically. The 2nd and 3rd patch improve error handling for kcontrols. The 4th patch enhances readability. The 5th patch removes unused variables in rt1015_priv. Tzung-Bi Shih (5): ASoC: rt1015: sort header inclusions ASoC: rt1015: save boost_mode only if valid ASoC: rt1015: return error if any when setting bypass_boost ASoC: rt1015: refactor retry loop and rt1015_priv allocation ASoC: rt1015: remove unneeded variables in rt1015_priv sound/soc/codecs/rt1015.c | 49 ++++++++++++++++++++------------------- sound/soc/codecs/rt1015.h | 4 ---- 2 files changed, 25 insertions(+), 28 deletions(-) -- 2.29.2.729.g45daf8777d-goog
-
Tzung-Bi Shih authored
- `lrck' is only used in .hw_params callback so that it can be local. - `bclk' is unused. - `id' is unused. - `amp_ver' is unused. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224100607.3006171-6-tzungbi@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Refactors retry loop in flush DAC work. It is more clear to use a for-loop here. Uses !rt1015 to check if NULL. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224100607.3006171-5-tzungbi@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Returns -EBUSY if DAC is using when setting bypass_boost. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224100607.3006171-4-tzungbi@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Saves boost_mode only if valid. Also returns -EINVAL if it is invalid. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224100607.3006171-3-tzungbi@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Tzung-Bi Shih authored
Sorts header inclusions. ASCII value of 'r' is less than 's'. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201224100607.3006171-2-tzungbi@google.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Christophe JAILLET authored
s/apci/acpi/ Turn an ICL into a TGL because it is likely a cut'n'paste error Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20201229085103.192715-1-christophe.jaillet@wanadoo.frSigned-off-by: Mark Brown <broonie@kernel.org>
-
- 28 Dec, 2020 5 commits
-
-
Lars-Peter Clausen authored
Using a managed buffer will pre-allocate the buffer using snd_pcm_lib_preallocate_pages() and automatically free it when the PCM is destroyed. In addition it will call snd_pcm_lib_malloc_pages() before the driver's hw_params() callback and snd_pcm_lib_free_pages() after the driver's hw_free() callback. This slightly reduces the boilerplate code of the driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Tested-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20201218154544.25513-1-lars@metafoo.deSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Since we got list_entry_is_head() helper in the generic header, we may switch driver to use it. This eliminates the need in additional variable. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20201208111805.6989-1-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Jack Yu authored
New calibration sequence to fix power issue in idle state. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/ec66399502514edbb1de3cf9bff08b1d@realtek.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Richard Fitzgerald authored
As the register map is 16-bit or 32-bit big-endian, the 24-bit DSP words appear padded and with the bytes swapped. When reading a raw stream of bytes, the pad bytes must be removed and the data bytes swapped back to their original order. The previous implementation of this assumed that the be32_to_cpu() in wm_adsp_read_data_block() would swap back to little-endian. But this is obviously only true on a little-endian CPU. It also made two walks through the data, once to endian-swap and again to strip the pad bytes. This patch re-works the code so that the endian-swap and unpad are done together in a single walk, and it is not dependent on the endianness of the CPU. The data_word_size argument to wm_adsp_remove_padding() has been dropped because currently this is always 3. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201216112512.26503-1-rf@opensource.cirrus.comSigned-off-by: Mark Brown <broonie@kernel.org>
-
Andy Shevchenko authored
Since we got list_entry_is_head() helper in the generic header, we may switch catpt to use it. It removes the need in additional variable. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201214172138.44267-1-andriy.shevchenko@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
-