summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2021-11-18ASoC: tegra: Fix kcontrol put callback in DSPKSameer Pujar1-32/+146
The kcontrol put callback is expected to return 1 when there is change in HW or when the update is acknowledged by driver. This would ensure that change notifications are sent to subscribed applications. Update the DSPK driver accordingly. Fixes: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver") Suggested-by: Jaroslav Kysela <perex@perex.cz> Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-11-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix kcontrol put callback in DMICSameer Pujar1-34/+149
The kcontrol put callback is expected to return 1 when there is change in HW or when the update is acknowledged by driver. This would ensure that change notifications are sent to subscribed applications. Update the DMIC driver accordingly. Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver") Suggested-by: Jaroslav Kysela <perex@perex.cz> Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-10-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix kcontrol put callback in I2SSameer Pujar1-76/+226
The kcontrol put callback is expected to return 1 when there is change in HW or when the update is acknowledged by driver. This would ensure that change notifications are sent to subscribed applications. Update the I2S driver accordingly. Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver") Suggested-by: Jaroslav Kysela <perex@perex.cz> Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-9-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix kcontrol put callback in ADMAIFSameer Pujar1-29/+109
The kcontrol put callback is expected to return 1 when there is change in HW or when the update is acknowledged by driver. This would ensure that change notifications are sent to subscribed applications. Update the ADMAIF driver accordingly. Fixes: f74028e159bb ("ASoC: tegra: Add Tegra210 based ADMAIF driver") Suggested-by: Jaroslav Kysela <perex@perex.cz> Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-8-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix wrong value type in MVCSameer Pujar1-4/+4
The enum controls are expected to use enumerated value type. Update relevant references in control get/put callbacks. Fixes: e539891f9687 ("ASoC: tegra: Add Tegra210 based MVC driver") Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-7-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix wrong value type in SFCSameer Pujar1-9/+12
The enum controls are expected to use enumerated value type. Update relevant references in control get/put callbacks. Fixes: b2f74ec53a6c ("ASoC: tegra: Add Tegra210 based SFC driver") Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-6-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix wrong value type in DSPKSameer Pujar1-12/+11
The enum controls are expected to use enumerated value type. Update relevant references in control get/put callbacks. Fixes: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver") Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-5-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix wrong value type in DMICSameer Pujar1-12/+11
The enum controls are expected to use enumerated value type. Update relevant references in control get/put callbacks. Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver") Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix wrong value type in I2SSameer Pujar1-18/+24
The enum controls are expected to use enumerated value type. Update relevant references in control get/put callbacks. Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver") Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-18ASoC: tegra: Fix wrong value type in ADMAIFSameer Pujar1-2/+2
The enum controls are expected to use enumerated value type. Update relevant references in control get/put callbacks. Fixes: f74028e159bb ("ASoC: tegra: Add Tegra210 based ADMAIF driver") Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/1637219231-406-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-17ASoC: stm32: i2s: fix 32 bits channel length without mclkOlivier Moysan1-1/+1
Fix divider calculation in the case of 32 bits channel configuration, when no master clock is used. Fixes: e4e6ec7b127c ("ASoC: stm32: Add I2S driver") Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://lore.kernel.org/r/20211117104404.3832-1-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH maskSrinivas Kandagatla1-1/+1
For some reason we ended up using snd_soc_component_write_field for HPHL and snd_soc_component_update_bits for HPHR, so fix this. Fixes: af3d54b99764 ("ASoC: codecs: lpass-rx-macro: add support for lpass rx macro") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114623.11891-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: codecs: wcd934x: return error code correctly from hw_paramsSrinivas Kandagatla1-2/+1
Error returned from wcd934x_slim_set_hw_params() are not passed to upper layer, this could be misleading to the user which can start sending stream leading to unnecessary errors. Fix this by properly returning the errors. Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114623.11891-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: codecs: wcd938x: fix volatile register rangeSrinivas Kandagatla1-0/+3
Interrupt Clear registers WCD938X_INTR_CLEAR_0 - WCD938X_INTR_CLEAR_2 are not marked as volatile. This has resulted in a missing interrupt bug while performing runtime pm. regcache_sync() during runtime pm resume path will write to Interrupt clear registers with previous values which basically clears the pending interrupt and actual interrupt handler never sees this interrupt. This issue is more visible with headset plug-in plug-out case compared to headset button. Fix this by adding the Interrupt clear registers to volatile range Fixes: 8d78602aa87a ("ASoC: codecs: wcd938x: add basic driver") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114623.11891-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: topology: Add missing rwsem around snd_ctl_remove() callsTakashi Iwai1-0/+3
snd_ctl_remove() has to be called with card->controls_rwsem held (when called after the card instantiation). This patch add the missing rwsem calls around it. Fixes: 8a9782346dcc ("ASoC: topology: Add topology core") Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20211116071812.18109-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: qdsp6: q6routing: validate port id before setting up routeSrinivas Kandagatla1-0/+6
Validate port id before it starts sending commands to dsp this would make error handling simpler. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114721.12517-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: qdsp6: q6adm: improve error reportingSrinivas Kandagatla1-2/+2
reset value for port is -1 so printing an hex would not give us very useful debug information, so use %d instead. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114721.12517-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: qdsp6: q6asm: fix q6asm_dai_prepare error handlingSrinivas Kandagatla1-6/+13
Error handling in q6asm_dai_prepare() seems to be completely broken, Fix this by handling it properly. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114721.12517-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: qdsp6: q6routing: Conditionally reset FrontEnd MixerSrinivas Kandagatla1-1/+5
Stream IDs are reused across multiple BackEnd mixers, do not reset the stream mixers if they are not already set for that particular FrontEnd. Ex: amixer cset iface=MIXER,name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1 would set the MultiMedia1 steam for SLIMBUS_0_RX, however doing below command will reset previously setup MultiMedia1 stream, because both of them are using MultiMedia1 PCM stream. amixer cset iface=MIXER,name='SLIMBUS_2_RX Audio Mixer MultiMedia1' 0 reset the FrontEnd Mixers conditionally to fix this issue. This is more noticeable in desktop setup, where in alsactl tries to restore the alsa state and overwriting the previous mixer settings. Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114721.12517-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: qdsp6: qdsp6: q6prm: handle clk disable correctlySrinivas Kandagatla2-2/+55
Q6PRM clks need to be disabled using PRM_CMD_RELEASE_HW_RSC dsp command rather then using PRM_CMD_RSP_REQUEST_HW_RSC cmd with rate set to zero. DSP will throw errors if we try to disable the clock using existing code. Fix this by properly handling the clk release. Fixes: 9a0e5d6fb16f ("ASoC: qdsp6: audioreach: add q6prm support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20211116114721.12517-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-16ASoC: wm_adsp: wm_adsp_control_add() error: uninitialized symbol 'ret'Simon Trimmer1-2/+3
This patch fixes the static analysis warning as it is correctly indicating a possible code path, it cannot know that for the affected firmware versions subname would always be NULL. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211115120154.56782-1-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-15ASoC: Merge rt9120 series from ChiYuan Huang:Mark Brown1-10/+48
Changes from ChiYuan Huang <cy_huang@richtek.com> to fix a couple of bugs and add a new device ID/quirk for the rt9120s to the driver.
2021-11-13ASoC: rsnd: fixup DMAEngine APIKuninori Morimoto1-1/+1
commit d5bb69dc54ec1 ("ASoC: sh: rcar: dma: : use proper DMAENGINE API for termination") updated DMAEngine API _all() to _sync(), but it should be _async(). _all() and _async() are almost same, the difference is only return error code. _sync() will call dmaengine_synchronize() and will be kernel panic. This patch is needed for v5.15 or later. [ 27.293264] BUG: scheduling while atomic: irq/130-ec70000/131/0x00000003 [ 27.300084] 2 locks held by irq/130-ec70000/131: [ 27.304743] #0: ffff0004c274d908 (&group->lock){....}-{2:2}, at: _snd_pcm_stream_lock_irqsave+0x48/0x54 [ 27.314344] #1: ffff0004c1788c60 (&priv->lock#2){....}-{2:2}, at: rsnd_soc_dai_trigger+0x70/0x7bc [ 27.323409] irq event stamp: 206 [ 27.326664] hardirqs last enabled at (205): [<ffff80001082de50>] _raw_spin_unlock_irq+0x50/0xa0 [ 27.335529] hardirqs last disabled at (206): [<ffff80001082d9e4>] _raw_spin_lock_irqsave+0xc4/0xd0 [ 27.344564] softirqs last enabled at (0): [<ffff800010037324>] copy_process+0x644/0x1b10 [ 27.352819] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 27.359142] CPU: 0 PID: 131 Comm: irq/130-ec70000 Not tainted 5.14.0-rc1+ #918 [ 27.366429] Hardware name: Renesas H3ULCB Kingfisher board based on r8a77950 (DT) [ 27.373975] Call trace: [ 27.376442] dump_backtrace+0x0/0x1b4 [ 27.380141] show_stack+0x24/0x30 [ 27.383488] dump_stack_lvl+0x8c/0xb8 [ 27.387184] dump_stack+0x18/0x34 [ 27.390528] __schedule_bug+0x8c/0x9c [ 27.394224] __schedule+0x790/0x8dc [ 27.397746] schedule+0x7c/0x110 [ 27.401003] synchronize_irq+0x94/0xd0 [ 27.404786] rcar_dmac_device_synchronize+0x20/0x2c [ 27.409710] rsnd_dmaen_stop+0x50/0x64 [ 27.413495] rsnd_soc_dai_trigger+0x554/0x7bc [ 27.417890] snd_soc_pcm_dai_trigger+0xe8/0x264 Cc: <stable@kernel.org> Fixes: commit d5bb69dc54ec1 ("ASoC: sh: rcar: dma: : use proper DMAENGINE API for termination") Link: https://lore.kernel.org/r/TY2PR01MB3692889E1A7476C4322CC296D8AE9@TY2PR01MB3692.jpnprd01.prod.outlook.com Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87mtmfz36o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-13ASoC: SOF: build compression interface into snd_sof.koArnd Bergmann1-1/+1
With CONFIG_SND_SOC_SOF_COMPRESS=m, the compression code is not built into a the main SOF driver when that is built-in: x86_64-linux-ld: sound/soc/sof/ipc.o: in function `ipc_stream_message': ipc.c:(.text+0x5a2): undefined reference to `snd_sof_compr_fragment_elapsed' x86_64-linux-ld: sound/soc/sof/topology.o: in function `sof_dai_load': topology.c:(.text+0x32d1): undefined reference to `snd_sof_compr_init_elapsed_work' x86_64-linux-ld: topology.c:(.text+0x32e1): undefined reference to `snd_sof_compr_init_elapsed_work' Make this a 'bool' symbol so it just decides whether the code gets built at all. Fixes: 858f7a5c45ca ("ASoC: SOF: Introduce fragment elapsed notification API") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211108111132.3800548-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12ASoC: mediatek: mt8173: Fix debugfs registration for componentsAngeloGioacchino Del Regno1-8/+43
When registering the mt8173-afe-pcm driver, we are also adding two components: one is for the PCM DAIs and one is for the HDMI DAIs, but when debugfs is enabled, we're getting the following issue: [ 17.279176] debugfs: Directory '11220000.audio-controller' with parent 'mtk-rt5650' already present! [ 17.288345] debugfs: Directory '11220000.audio-controller' with parent 'mtk-rt5650' already present! To overcome to that without any potentially big rewrite of this driver, similarly to what was done in mt8195-afe-pcm, add a debugfs_prefix to the components before actually adding them. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20211111161108.502344-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12ASoC: rt5682: Re-detect the combo jack after resumingDerek Fang3-3/+22
Sometimes, end-users change the jack type under suspending, so it needs to re-detect the combo jack type after resuming to avoid any unexpected behaviors. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20211109095450.12950-2-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12ASoC: rt5682: Avoid the unexpected IRQ event during going to suspendDerek Fang1-6/+9
When the system suspends, the codec driver will set SAR to power saving mode if a headset is plugged in. There is a chance to generate an unexpected IRQ, and leads to issues after resuming such as noise from OMTP type headsets. Signed-off-by: Derek Fang <derek.fang@realtek.com> Link: https://lore.kernel.org/r/20211109095450.12950-1-derek.fang@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12ASoC: rt1011: revert 'I2S Reference' to SOC_ENUM_EXTJack Yu2-6/+56
Revert 'I2S Reference' to SOC_ENUM_EXT because the settings are specific for some platforms, the default setting for 'I2S Reference' does nothing, only some SoC platform need to configure it. Previous 'I2S Reference' in SOC_ENUM format only toggles one bit of RT1011_TDM1_SET_1 register, which isn't enough for specific platform. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://lore.kernel.org/r/20211111091705.20879-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12ASoC: rt9120: Add the compatibility with rt9120sChiYuan Huang1-4/+29
Use device id reg to be compatible with rt9120 and rt9120s. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1636515921-31694-4-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12ASoC: rt9120: Fix clock auto sync issue when fs is the multiple of 48ChiYuan Huang1-5/+19
If fs is divided by 48, to make audio clock sync rate correct, internal sync function have be disabled. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1636515921-31694-3-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-12ASoC: rt9120: Update internal ocp level to the correct valueChiYuan Huang1-2/+1
Update internal ocp level to correct value. Even the wrong ocp setting can also make the sound output, but the power cannot match the IC capability. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/1636515921-31694-2-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: sof_sdw: Add support for SKU 0B12 productGongjun Song1-0/+10
This product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-10-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: soc-acpi: add SKU 0B29 SoundWire configurationGongjun Song1-0/+58
Product audio hardware configuration is rt711 on link2, two rt1316s on link0 and link1, rt714 on link 3. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-9-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: sof_sdw: Add support for SKU 0B29 productGongjun Song1-0/+10
This product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-8-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: soc-acpi: add SKU 0B13 SoundWire configurationGongjun Song1-0/+21
Product audio hardware configuration is rt1316 on link2, rt714 on link 3. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-7-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: sof_sdw: Add support for SKU 0B13 productGongjun Song1-0/+9
This product supports SoundWire capture from local microphones and one SoundWire amplifier(no headset codec). Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-6-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: sof_sdw: Add support for SKU 0B11 productGongjun Song1-0/+10
This product supports a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-5-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: sof_sdw: Add support for SKU 0B00 and 0B01 productsGongjun Song1-0/+20
Both products support a SoundWire headset codec, SoundWire capture from local microphones and two SoundWire amplifiers. Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: soc-acpi: add SKU 0AF3 SoundWire configurationGongjun Song1-0/+26
New product audio hardware configuration is rt714 on link0, two rt1316s on link1 and link2 Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: Intel: sof_sdw: Add support for SKU 0AF3 productGongjun Song1-0/+10
This product supports SoundWire capture from local microphones and two SoundWire amplifiers(no headset codec). Signed-off-by: Gongjun Song <gongjun.song@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20211105022646.26305-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: mediatek: mt8173-rt5650: Rename Speaker control to Ext SpkAngeloGioacchino Del Regno1-4/+4
Some RT5645 and RT5650 powered platforms are using "Ext Spk" instead of "Speaker", and this is also reflected in alsa-lib configurations for the generic RT5645 usecase manager configs. Rename the "Speaker" control to "Ext Spk" in order to be able to make the userspace reuse/inherit the same configurations also for this machine, along with the others. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20211105152013.75252-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: DAPM: Cover regression by kctl change notification fixTakashi Iwai1-6/+23
The recent fix for DAPM to correct the kctl change notification by the commit 5af82c81b2c4 ("ASoC: DAPM: Fix missing kctl change notifications") caused other regressions since it changed the behavior of snd_soc_dapm_set_pin() that is called from several API functions. Formerly it returned always 0 for success, but now it returns 0 or 1. This patch addresses it, restoring the old behavior of snd_soc_dapm_set_pin() while keeping the fix in snd_soc_dapm_put_pin_switch(). Fixes: 5af82c81b2c4 ("ASoC: DAPM: Fix missing kctl change notifications") Reported-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20211105090925.20575-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-05ASoC: SOF: Intel: hda: fix hotplug when only codec is suspendedKai Vehmanen3-2/+34
If codec is in runtime suspend, but controller is not, hotplug events are missed as the codec has no way to alert the controller. Problem does not occur if both controller and codec are active, or when both are suspended. An easy way to reproduce is to play an audio stream on one codec (e.g. to HDMI/DP display codec), wait for other HDA codec to go to runtime suspend, and then plug in a headset to the suspended codec. The jack event is not reported correctly in this case. Another way to reproduce is to force controller to stay active with "snd_sof_pci.sof_pci_debug=0x1" Fix the issue by reconfiguring the WAKEEN register when powering up/down individual links, and handling control events in the interrupt handler. Fixes: 87fc20e4a0cb ("ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management") Reported-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20211105111655.668777-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-04ASoC: SOF:control: Fix variable type in snd_sof_refresh_control()Peter Ujfalusi1-4/+4
The second parameter for snd_sof_ipc_set_get_comp_data() is ipc_cmd, not ipc_ctrl_type and the type is u32. Fixes: 756bbe4205bc6 ("ASoC: SOF: Handle control change notification from firmware") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Acked-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20211103082710.17165-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-11-02ASoC: cs35l41: Change monitor widgets to siggensCharles Keepax1-7/+7
Currently the internal monitor sources are input widgets, which means if the card is set to fully routed these will not enable unless connected to something in the machine driver. However, all these are internal monitor signals so it makes no sense to connect them to something in the machine driver. As such switch them to siggen widgets which will have the same behaviour except not require external linkage on a fully routed card. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: David Rhodes <drhodes@opensource.cirrus.com> Link: https://lore.kernel.org/r/20211029214028.401284-1-drhodes@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29Merge series "Multiple headphone codec driver support" from Brent Lu ↵Mark Brown12-170/+116
<brent.lu@intel.com>: Support multiple headphone drivers in same machine driver. In this case, both rt5682 and rt5682s are supported and enumerated by different ACPI HID "10EC5682" and "RTL5682". V2 Changes: - remove useless 'NULL', 'false' in if-condition - can use 'comp_ids' field alone to enumerate driver - add comma to the end of entry in structure initialization - keep the table of byt/cht/cml/icl untouched V3 Changes: - upstreamd from SOF github, PR#3200 - use new compatiable IDs to shrink the enumerate table of BYT and CHT - add 'const' to snd_soc_acpi_codecs structures V4 Changes: - add signoff to patch 4~6 V5 Changes: - none, just rebase for patch 3 conflict Brent Lu (3): ASoC: soc-acpi: add comp_ids field for machine driver matching ASoC: Intel: sof_rt5682: detect codec variant in probe function ASoC: Intel: sof_rt5682: use comp_ids to enumerate rt5682s Pierre-Louis Bossart (3): ASoC: Intel: soc-acpi-byt: shrink tables using compatible IDs ASoC: Intel: soc-acpi-cht: shrink tables using compatible IDs ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecs include/sound/soc-acpi.h | 3 + sound/soc/intel/boards/sof_rt5682.c | 34 ++------- .../intel/common/soc-acpi-intel-adl-match.c | 11 ++- .../intel/common/soc-acpi-intel-bxt-match.c | 2 +- .../intel/common/soc-acpi-intel-byt-match.c | 68 +++++++----------- .../intel/common/soc-acpi-intel-cht-match.c | 69 +++++++------------ .../intel/common/soc-acpi-intel-cml-match.c | 8 +-- .../intel/common/soc-acpi-intel-glk-match.c | 2 +- .../intel/common/soc-acpi-intel-jsl-match.c | 43 ++++-------- .../intel/common/soc-acpi-intel-kbl-match.c | 12 ++-- .../intel/common/soc-acpi-intel-skl-match.c | 2 +- .../intel/common/soc-acpi-intel-tgl-match.c | 11 ++- sound/soc/soc-acpi.c | 24 ++++++- 13 files changed, 119 insertions(+), 170 deletions(-) -- 2.25.1
2021-10-29Merge series "ASoC: Sanity checks and soc-topology updates" from Cezary ↵Mark Brown3-7/+43
Rojewski <cezary.rojewski@intel.com>: Couple of soc-topology related changes and a use-after-free fix. Said fix and two sanity checks for soc-topology lead the way. While the use-after-free is quite obvious, the sanity checks are here to cover for cases where user malformed the topology file -or- access to filesystem somehow got interrupted during copy operation. We shouldn't be reading outside the file boundary. Afterward a change to soc_tplg_add_kcontrol(): device being passed to soc_tplg_add_dcontrol() from comp->dev to tplg->dev which corrects dev_xxx() invoked later on. Also, device used for topology memory allocations from component->dev to component->card->dev so memory gets freed each time card device (usually platform device) is removed rather than the component device what may happen less frequently. Dummy component gets smarter and no longer overrides hw_params if there are other components accociated with related struct snd_soc_pcm_runtime instance. Amadeusz Sławiński (5): ASoC: core: Remove invalid snd_soc_component_set_jack call ASoC: topology: Check for dapm widget completeness ASoC: topology: Use correct device for prints ASoC: topology: Change topology device to card device ASoC: Stop dummy from overriding hwparams Cezary Rojewski (1): ASoC: topology: Add header payload_size verification sound/soc/soc-core.c | 3 --- sound/soc/soc-topology.c | 34 ++++++++++++++++++++++++++++++---- sound/soc/soc-utils.c | 13 +++++++++++++ 3 files changed, 43 insertions(+), 7 deletions(-) -- 2.25.1
2021-10-29ASoC: rsnd: Fix an error handling path in 'rsnd_node_count()'Christophe JAILLET1-0/+1
If we return before the end of the 'for_each_child_of_node()' iterator, the reference taken on 'np' must be released. Add the missing 'of_node_put()' call. Fixes: c413983eb66a ("ASoC: rsnd: adjust disabled module") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/4c0e893cbfa21dc76c1ede0b6f4f8cff42209299.1634586167.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: tlv320aic3x: Make aic3x_remove() return voidUwe Kleine-König4-5/+8
Up to now aic3x_remove() returns zero unconditionally. Make it return void instead which makes it easier to see in the callers that there is no error to handle. Also the return value of i2c and spi remove callbacks is ignored anyway. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20211019074125.3812513-1-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-29ASoC: Intel: soc-acpi: use const for all uses of snd_soc_acpi_codecsPierre-Louis Bossart6-17/+17
'const' qualifiers are missing on some platforms, add as needed. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/20211029171409.611600-7-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>