summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
...
* ASoC: SOF: Intel: initial support to AlderLake-PKai Vehmanen2021-01-181-1/+5
| | | | | | | | | | | Add PCI id for the AlderLake-P. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210114115558.52699-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge series "ASoC/SoundWire: fix timeout values" from Bard Liao ↵Mark Brown2021-01-156-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <yung-chuan.liao@linux.intel.com>: The timeout for an individual transaction w/ the Cadence IP is the same as the entire resume operation for codecs. This doesn't make sense, we need to have at least one order of magnitude between individual transactions and the entire resume operation. Set the timeout on the Cadence side to 500ms and 5s for the codec resume. Both ASoC and SoundWire trees are fine for this series. Pierre-Louis Bossart (2): ASoC: codecs: soundwire: increase resume timeout soundwire: cadence: reduce timeout on transactions drivers/soundwire/cadence_master.c | 2 +- sound/soc/codecs/max98373-sdw.c | 4 +++- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt5682.h | 2 +- sound/soc/codecs/rt700-sdw.c | 2 +- sound/soc/codecs/rt711-sdw.c | 2 +- sound/soc/codecs/rt715-sdw.c | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) -- 2.17.1
| * ASoC: codecs: soundwire: increase resume timeoutPierre-Louis Bossart2021-01-156-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | The resume operation relies on multiple transactions to synchronize the regmap state, make sure the timeout is one order of magnitude larger than an individual transaction, so that timeouts of failed transactions are detected first. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20210115061651.9740-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge series "ASoC: qcom: Minor code cleanups for lpass-cpu" from Stephen ↵Mark Brown2021-01-151-11/+6
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Boyd <swboyd@chromium.org>: Here's some minor code cleanups for the lpass-cpu driver. I noticed that it casts away const from the driver data from DT. That's not great but fixing it is a little more involved. I'll get to it later. There's also some questionable clk_get() usage that should probably be clk_get_optional(). For now this should help a little. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Stephen Boyd (4): ASoC: qcom: Remove useless debug print ASoC: qcom: Add some names to regmap configs ASoC: qcom: Stop casting away __iomem for error pointers ASoC: qcom: Remove duplicate error messages on ioremap sound/soc/qcom/lpass-cpu.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e -- https://chromeos.dev
| * ASoC: qcom: Remove duplicate error messages on ioremapStephen Boyd2021-01-151-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to print an error message when these ioremap operations fail. The function that returns an error already prints an error message and properly attributes it to the device. Drop them to save some code. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-5-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qcom: Stop casting away __iomem for error pointersStephen Boyd2021-01-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to cast away __iomem when testing with IS_ERR() or converting with PTR_ERR(). Modern sparse can handle this just fine. Drop it. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-4-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qcom: Add some names to regmap configsStephen Boyd2021-01-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This device can sometimes have multiple regmaps. Let's add a name so that we can differentiate in debugfs more easily. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-3-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: qcom: Remove useless debug printStephen Boyd2021-01-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks like a left over debug print that tells us that HDMI is enabled. Let's remove it as that's definitely not an error to have HDMI enabled. Cc: V Sujith Kumar Reddy <vsujithk@codeaurora.org> Cc: Srinivasa Rao <srivasam@codeaurora.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Cheng-Yi Chiang <cychiang@chromium.org> Fixes: 7cb37b7bd0d3 ("ASoC: qcom: Add support for lpass hdmi driver") Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210115034327.617223-2-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge v5.11-rc3Mark Brown2021-01-137-4/+34
|\ \
| * \ Merge tag 'sound-5.11-rc3' of ↵Linus Torvalds2021-01-057-4/+34
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here is a collection of USB- and HD-audio fixes. Most of them are device-specific quirks while one fix is for a regression due to an incorrect mutex unlock introduced in this merge window" * tag 'sound-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/via: Fix runtime PM for Clevo W35xSS ALSA: usb-audio: Add quirk for RC-505 ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable() ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7 ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256. ALSA: hda/realtek: Add mute LED quirk for more HP laptops ALSA: hda/conexant: add a new hda codec CX11970 ALSA: usb-audio: Add quirk for BOSS AD-10 ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks ALSA: hda/realtek - Modify Dell platform name ALSA: hda/realtek - Fix speaker volume control on Lenovo C940
| | * ALSA: hda/via: Fix runtime PM for Clevo W35xSSTakashi Iwai2021-01-042-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clevo W35xSS_370SS with VIA codec has had the runtime PM problem that looses the power state of some nodes after the runtime resume. This was worked around by disabling the default runtime PM via a denylist entry. Since 5.10.x made the runtime PM applied (casually) even though it's disabled in the denylist, this problem was revisited. The result was that disabling power_save_node feature suffices for the runtime PM problem. This patch implements the disablement of power_save_node feature in VIA codec for the device. It also drops the former denylist entry, too, as the runtime PM should work in the codec side properly now. Fixes: b529ef2464ad ("ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklist") Reported-by: Christian Labisch <clnetbox@gmail.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210104153046.19993-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: usb-audio: Add quirk for RC-505Timon Reinold2021-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BOSS RC-505 (shown by lsusb as "Roland Corp. RC-505") does require the same quirk as these other BOSS devices. Without this quirk it is neither possible to capture audio from nor to write audio to the RC-505. Both just result in an empty audio stream. With these changes both capture and playback seem to work quite fine. MIDI funtionality was not tested. Tested-by: Harry Reinold <harry.reinold@posteo.de> Signed-off-by: Timon Reinold <tirei@agon.one> Link: https://lore.kernel.org/r/20210102210835.21268-1-tirei@agon.one Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/hdmi: Fix incorrect mutex unlock in silent_stream_disable()Takashi Iwai2021-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The silent_stream_disable() function introduced by the commit b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") takes the per_pin->lock mutex, but it unlocks the wrong one, spec->pcm_lock, which causes a deadlock. This patch corrects it. Fixes: b1a5039759cb ("ALSA: hda/hdmi: fix silent stream for first playback to DP") Reported-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org> Cc: <stable@vger.kernel.org> Acked-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210101083852.12094-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7Kai-Heng Feng2020-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HP EliteBook 850 G7 uses the same GPIO pins as ALC285_FIXUP_HP_GPIO_LED to enable mute and micmute LED. So apply the quirk to enable the LEDs. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201230125636.45028-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256.PeiSen Hou2020-12-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two "Intel Reference boad" SSID in the alc256. Enable "power saving mode" and Enable "headset jack mode". Signed-off-by: PeiSen Hou <pshou@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/5978d2267f034c28973d117925ec9c63@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek: Add mute LED quirk for more HP laptopsManuel Jiménez2020-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HP Pavilion 13-bb0000 (SSID 103c:87c8) needs the same quirk as other models with ALC287. Signed-off-by: Manuel Jiménez <mjbfm99@me.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/X+s/gKNydVrI6nLj@HP-Pavilion-13 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/conexant: add a new hda codec CX11970bo liu2020-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current kernel does not support the cx11970 codec chip. Add a codec configuration item to kernel. [ Minor coding style fix by tiwai ] Signed-off-by: bo liu <bo.liu@senarytech.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201229035226.62120-1-bo.liu@senarytech.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: usb-audio: Add quirk for BOSS AD-10Takashi Iwai2020-12-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | BOSS AD-10 requires the very same quirk like other BOSS devices to enable the special implicit feedback mode. Reported-and-tested-by: Martin Passing <martin@passing.name> Link: https://lore.kernel.org/r/20201229083428.20467-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: usb-audio: Fix UBSAN warnings for MIDI jacksTakashi Iwai2020-12-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calculation of in_cables and out_cables bitmaps are done with the bit shift by the value from the descriptor, which is an arbitrary value, and can lead to UBSAN shift-out-of-bounds warnings. Fix it by filtering the bad descriptor values with the check of the upper bound 0x10 (the cable bitmaps are 16 bits). Reported-by: syzbot+92e45ae45543f89e8c88@syzkaller.appspotmail.com Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201223174557.10249-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek - Modify Dell platform nameKailang Yang2020-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dell platform SSID:0x0a58 change platform name. Use the generic name instead for avoiding confusion. Fixes: 150927c3674d ("ALSA: hda/realtek - Supported Dell fixed type headset") Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/efe7c196158241aa817229df7835d645@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
| | * ALSA: hda/realtek - Fix speaker volume control on Lenovo C940Kailang Yang2020-12-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cannot adjust speaker's volume on Lenovo C940. Applying the alc298_fixup_speaker_volume function can fix the issue. [ Additional note: C940 has I2S amp for the speaker and this needs the same initialization as Dell machines. The patch was slightly modified so that the quirk entry is moved next to the corresponding Dell quirk entry. -- tiwai ] Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/ea25b4e5c468491aa2e9d6cb1f2fced3@realtek.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ASoC: SOF: Intel: tgl: do thorough remove at .shutdown() callbackKeyon Jie2021-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Invoke hda_dsp_remove() as the .shutdown() callback. This will help to perform shutdown of the DSP safely on TGL platforms before shutting down or rebooting the system. BugLink: https://github.com/thesofproject/linux/issues/2571 Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-4-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: SOF: sof-pci-dev: add .shutdown() callbackKeyon Jie2021-01-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the .shutdown() callback to the sof-pci-dev driver, to help to handle shutting down specific tasks for SOF PCI platforms. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: SOF: add snd_sof_device_shutdown() helper for shutdownKeyon Jie2021-01-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper snd_sof_device_shutdown() to wrap the platform specific .shutdown callbacks for SOF platforms. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | ASoC: SOF: add .shutdown() callback to snd_sof_dsp_opsKeyon Jie2021-01-132-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add .shutdown() callback to the struct snd_sof_dsp_ops, for doing platform specific actions at shutdown. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210113152617.4048541-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "ASoC: soc-pcm: cleanup code" from Kuninori Morimoto ↵Mark Brown2021-01-131-99/+78
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <kuninori.morimoto.gx@renesas.com>: Hi Mark These are not so important, but for soc-pcm cleanup patches. Kuninori Morimoto (6): ASoC: soc-pcm: move dpcm_set_fe_update_state() ASoC: soc-pcm: add dpcm_set_be_update_state() ASoC: soc-pcm: add soc_pcm_set_dai_params() ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry() ASoC: soc-pcm: cleanup soc_pcm_params_symmetry() ASoC: soc-pcm: setup pcm at one place in soc_new_pcm() sound/soc/soc-pcm.c | 231 +++++++++++++++++--------------------------- 1 file changed, 90 insertions(+), 141 deletions(-) -- 2.25.1 Thank you for your help !! Best regards --- Kuninori Morimoto
| * | | ASoC: soc-pcm: cleanup soc_pcm_apply_symmetry()Kuninori Morimoto2021-01-131-47/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soc_pcm_apply_symmetry() want to call snd_pcm_hw_constraint_single() for rate/channel/sample_bits, but, it needs many condition check. These are very similar but different, thus, it needs to have very verbose code. This patch use macro for it and make code more simple. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87wnxo7uyq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: soc-pcm: add soc_pcm_set_dai_params()Kuninori Morimoto2021-01-131-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Getting rate/channels/sample_bits from param needs fixed method. This patch adds new soc_pcm_set_dai_params() and replace existing code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87y2i47uyw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: soc-pcm: add dpcm_set_be_update_state()Kuninori Morimoto2021-01-131-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | soc-pcm has dpcm_set_fe_update_state() to update FE's runtime_update (except dpcm_fe_dai_do_trigger() which needs to update it without it). OTOH, it doesn't have BE's update function. O: dpcm_set_fe_update_state() X: dpcm_set_be_update_state() This patch add BE's dpcm_set_fe_update_state() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87zh2k7uz1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: soc-pcm: move dpcm_set_fe_update_state()Kuninori Morimoto2021-01-131-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves dpcm_set_fe_update_state() to top side. This is prepare for cleanup soc-pcm.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/871rfw99jn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: kirkwood: Use managed DMA buffer allocationLars-Peter Clausen2021-01-131-76/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manually managing its DMA buffers using dma_{alloc,free}_coherent() lets the sound core take care of this using managed buffers. On one hand this reduces the amount of boiler plate code, but the main motivation for the change is to use the shared code where possible. This makes it easier to argue about correctness and that the code does not contain subtle bugs like data leakage or similar. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210106133650.13509-3-lars@metafoo.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: bcm: cygnus: Use managed DMA buffer allocationLars-Peter Clausen2021-01-131-104/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manually managing its DMA buffers using dma_{alloc,free}_coherent() lets the sound core take care of this using managed buffers. On one hand this reduces the amount of boiler plate code, but the main motivation for the change is to use the shared code where possible. This makes it easier to argue about correctness and that the code does not contain subtle bugs like data leakage or similar. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20210106133650.13509-2-lars@metafoo.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: atmel-pdc: Use managed DMA buffer allocationLars-Peter Clausen2021-01-131-74/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of manually managing its DMA buffers using dma_{alloc,free}_coherent() lets the sound core take care of this using managed buffers. On one hand this reduces the amount of boiler plate code, but the main motivation for the change is to use the shared code where possible. This makes it easier to argue about correctness and that the code does not contain subtle bugs like data leakage or similar. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20210106133650.13509-1-lars@metafoo.de Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: qcom: qdsp6: Move frontend AIFs to q6asm-daiStephan Gerhold2021-01-132-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment it is necessary to set up the DAPM routes between front-end AIF<->DAI explicitly in the device tree, e.g. using audio-routing = "MM_DL1", "MultiMedia1 Playback", "MM_DL3", "MultiMedia3 Playback", "MM_DL4", "MultiMedia4 Playback", "MultiMedia2 Capture", "MM_UL2"; This is prone to mistakes and (sadly) there is no clear error if one of these routes is missing. :( Actually, this should not be necessary because the ASoC core normally automatically links AIF<->DAI within snd_soc_dapm_link_dai_widgets(). This is done using the "stname" parameter of SND_SOC_DAPM_AIF_IN/OUT. For SND_SOC_DAPM_AIF_IN("MM_DL1", "MultiMedia1 Playback", 0, 0, 0, 0), it should create the route from above: MM_DL1 <-> MultiMedia1 Playback. This does not work at the moment because the AIF widget (MM_DL1) and the DAI widget (MultiMedia1 Playback) belong to different DAPM contexts (q6routing / q6asm-dai). Fix this by declaring the AIF widgets in the same driver as the DAIs (q6asm-dai). Now the routes above are created automatically and no longer need to be specified in the device tree. This is also more consistent with the back-end AIFs which are already declared in q6afe-dais instead of q6routing. q6routing should only link the components together using mixers. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Link: https://lore.kernel.org/r/20201211203255.148246-1-stephan@gerhold.net Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: cs42l56: fix up error handling in probeDan Carpenter2021-01-131-1/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two issues with this code. The first error path forgot to set the error code and instead returns success. The second error path doesn't clean up. Fixes: 272b5edd3b8f ("ASoC: Add support for CS42L56 CODEC") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/X9NE/9nK9/TuxuL+@mwanda Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "ASoC: Intel: bytcr_rt5640: Add support for devices with only a ↵Mark Brown2021-01-121-13/+39
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | headphone jack (no speakers/mic)" from Hans de Goede <hdegoede@redhat.com>: Hi All, This series adds support for devices with only a headphone jack (no speakers/internal mic). Specifically this adds support for the Mele PCG03 Mini PC. But the new no-speakers and no-internal-mic quirks will likely be useful on other devices too. Regards, Hans
| * | | ASoC: Intel: bytcr_rt5640: Add quirk for the Mele PCG03 Mini PCHans de Goede2021-01-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a quirk for the Mele PCG03 Mini PC, being a Mini PC this device has no speakers and no internal microphone. To make matters worse the speaker output pins are shorted (to gnd or to each other?) and SPKVDD is provided. So trying to output sound on the speakers leads to shorting SPKVDD, this leads to a power dip after which the codec is an unknown state. Sometimes it drops of the i2c bus, sometimes it does still respond to i2c transfers, but is otherwise not functional. TL;DR: trying to use the speaker outputs on this model is BAD. Besides not having speakers / an internal mic, this is a Bay Trail CR device without a CHAN package in ACPI, so we default to SSP0-AIF2 as codec connection. But the device is actually using SSP0-AIF1, so we need to quirk that too. Cc: Rasmus Porsager <rasmus@beat.dk> 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/20210109210119.159032-4-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mappingHans de Goede2021-01-121-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices, like mini PCs/media/top-set boxes do not have an internal microphone at all, an example of the is the Mele PCG03 Mini PC. Add a new BYT_RT5640_NO_INTERNAL_MIC_MAP input-mapping for this, which does not add any internal-mic routes and modifies the components and the (optional) long_name strings to reflect this. Cc: Rasmus Porsager <rasmus@beat.dk> 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/20210109210119.159032-3-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: Intel: bytcr_rt5640: Add new BYT_RT5640_NO_SPEAKERS quirk-flagHans de Goede2021-01-121-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices, like mini PCs/media/top-set boxes do not have any speakers at all, an example of the is the Mele PCG03 Mini PC. Add a new BYT_RT5640_NO_SPEAKERS quirk-flag which when sets does not add speaker routes and modifies the components and the (optional) long_name strings to reflect that there are no speakers. Cc: Rasmus Porsager <rasmus@beat.dk> 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/20210109210119.159032-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: SOF: add mutex to protect the dsp_power_state accessKeyon Jie2021-01-123-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There could be more than one thread read/write the dsp_power_state simultaneously (e.g. hda_dsp_d0i3_work and sof_ipc_tx_message), add a mutex power_state_access to make sure the access to it is mutually exclusive. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <bard.liao@intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210105155640.3725238-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: es8316: Fix possible NULL pointer deref in es8316_disable_jack_detect()Hans de Goede2021-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: adau17x1: Remove redundant null check before clk_disable_unprepareXu Wang2021-01-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.cn Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | ASoC: Intel: cht_bsw_nau8824: Move snd_soc_dai_set_tdm_slot call to ↵Hans de Goede2021-01-121-7/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cht_codec_fixup 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.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge series "ASoC: rt5645: Enable internal mic and headset on ECS EF20" ↵Mark Brown2021-01-111-0/+45
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | ASoC: rt5645: Enable internal microphone and JD on ECS EF20Chris Chiu2021-01-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5645: add inv_hp_det flagChris Chiu2021-01-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5645: Add ACPI-defined GPIO for ECS EF20 seriesChris Chiu2021-01-111-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.org Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | ASoC: rt5645: Introduce mapping for ACPI-defined GPIOChris Chiu2021-01-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.org Signed-off-by: Mark Brown <broonie@kernel.org>
* | | | Merge series "Enable DMA mode on Intel Keem Bay platform" from Michael Sit ↵Mark Brown2021-01-113-15/+153
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | ASoC: Intel: KMB: Enable DMA transfer modeMichael Sit Wei Hong2021-01-083-15/+153
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.com Signed-off-by: Mark Brown <broonie@kernel.org>