Bard Liao
1bfdb1912c
ASoC: SOF: intel: move sof_intel_dsp_desc() forward
...
[ Upstream commit 2f1315ae94b46bf0d5b4be29be15cc3641364404 ]
sof_intel_dsp_desc() will be used by hda_dsp_check_sdw_irq() in the
following commit.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20210723115451.7245-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2022-08-25 11:38:10 +02:00
Peter Ujfalusi
6cbbe59fdc
ASoC: SOF: Intel: hda-loader: Clarify the cl_dsp_init() flow
...
[ Upstream commit bbfef046c6613404c01aeb9e9928bebb78dd327a ]
Update the comment for the cl_dsp_init() to clarify what is done by the
function and use the chip->init_core_mask instead of BIT(0) when
unstalling/running the init core.
Complements: 2a68ff846164 ("ASoC: SOF: Intel: hda: Revisit IMR boot sequence")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20220609085949.29062-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2022-07-21 21:20:15 +02:00
Ammar Faizi
0c307349fe
ASoC: SOF: Intel: Fix NULL ptr dereference when ENOMEM
...
commit b7fb0ae09009d076964afe4c1a2bde1ee2bd88a9 upstream.
Do not call snd_dma_free_pages() when snd_dma_alloc_pages() returns
-ENOMEM because it leads to a NULL pointer dereference bug.
The dmesg says:
[ T1387] sof-audio-pci-intel-tgl 0000:00:1f.3: error: memory alloc failed: -12
[ T1387] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ T1387] #PF: supervisor read access in kernel mode
[ T1387] #PF: error_code(0x0000) - not-present page
[ T1387] PGD 0 P4D 0
[ T1387] Oops: 0000 [#1 ] PREEMPT SMP NOPTI
[ T1387] CPU: 6 PID: 1387 Comm: alsa-sink-HDA A Tainted: G W 5.17.0-rc4-superb-owl-00055-g80d47f5de5e3
[ T1387] Hardware name: HP HP Laptop 14s-dq2xxx/87FD, BIOS F.15 09/15/2021
[ T1387] RIP: 0010:dma_free_noncontiguous+0x37/0x80
[ T1387] Code: [... snip ...]
[ T1387] RSP: 0000:ffffc90002b87770 EFLAGS: 00010246
[ T1387] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ T1387] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888101db30d0
[ T1387] RBP: 00000000fffffff4 R08: 0000000000000000 R09: 0000000000000000
[ T1387] R10: 0000000000000000 R11: ffffc90002b874d0 R12: 0000000000000001
[ T1387] R13: 0000000000058000 R14: ffff888105260c68 R15: ffff888105260828
[ T1387] FS: 00007f42e2ffd640(0000) GS:ffff888466b80000(0000) knlGS:0000000000000000
[ T1387] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ T1387] CR2: 0000000000000000 CR3: 000000014acf0003 CR4: 0000000000770ee0
[ T1387] PKRU: 55555554
[ T1387] Call Trace:
[ T1387] <TASK>
[ T1387] cl_stream_prepare+0x10a/0x120 [snd_sof_intel_hda_common 146addf995b9279ae7f509621078cccbe4f875e1]
[... snip ...]
[ T1387] </TASK>
Cc: Daniel Baluta <daniel.baluta@nxp.com >
Cc: Jaroslav Kysela <perex@perex.cz >
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Cc: Keyon Jie <yang.jie@linux.intel.com >
Cc: Liam Girdwood <lgirdwood@gmail.com >
Cc: Mark Brown <broonie@kernel.org >
Cc: Rander Wang <rander.wang@intel.com >
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Cc: Takashi Iwai <tiwai@suse.com >
Cc: sound-open-firmware@alsa-project.org
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org # v5.2+
Fixes: d16046ffa6
("ASoC: SOF: Intel: Add Intel specific HDA firmware loader")
Link: https://lore.kernel.org/lkml/20220224145124.15985-1-ammarfaizi2@gnuweeb.org/ # v1
Link: https://lore.kernel.org/lkml/20220224180850.34592-1-ammarfaizi2@gnuweeb.org/ # v2
Link: https://lore.kernel.org/lkml/20220224182818.40301-1-ammarfaizi2@gnuweeb.org/ # v3
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org >
Link: https://lore.kernel.org/r/20220224185836.44907-1-ammarfaizi2@gnuweeb.org
Signed-off-by: Mark Brown <broonie@kernel.org >
[ammarfaizi2: Backport to Linux 5.10 LTS]
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-08 14:40:39 +02:00
Pierre-Louis Bossart
0c6daf4799
ASoC: SOF: Intel: hda-dai: fix potential locking issue
...
[ Upstream commit a20f3b10de61add5e14b6ce4df982f4df2a4cbbc ]
The initial hdac_stream code was adapted a third time with the same
locking issues. Move the spin_lock outside the loops and make sure the
fields are protected on read/write.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Acked-by: Mark Brown <broonie@kernel.org >
Link: https://lore.kernel.org/r/20210924192417.169243-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-11-26 10:39:09 +01:00
Guennadi Liakhovetski
2386a8cde1
ASoC: SOF: Intel: hda-ipc: fix reply size checking
...
[ Upstream commit 973b393fdf073a4ebd8d82ef6edea99fedc74af9 ]
Checking that two values don't have common bits makes no sense,
strict equality is meant.
Fixes: f3b433e469
("ASoC: SOF: Implement Probe IPC API")
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20210802151749.15417-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-08-18 08:59:08 +02:00
Guennadi Liakhovetski
f6db9dbfa6
ASoC: SOF: Intel: HDA: fix core status verification
...
[ Upstream commit 927280909fa7d8e61596800d82f18047c6cfbbe4 ]
When checking for enabled cores it isn't enough to check that
some of the requested cores are running, we have to check that
all of them are.
Fixes: 747503b181
("ASoC: SOF: Intel: Add Intel specific HDA DSP HW operations")
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20210322163728.16616-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-04-14 08:42:06 +02:00
Pan Xiuli
47a6cadb6c
ASoC: SOF: intel: fix wrong poll bits in dsp power down
...
commit fd8299181995093948ec6ca75432e797b4a39143 upstream.
The ADSPCS_SPA is Set Power Active bit. To check if DSP is powered
down, we need to check ADSPCS_CPA, the Current Power Active bit.
Fixes: 747503b181
("ASoC: SOF: Intel: Add Intel specific HDA DSP HW operations")
Reviewed-by: Rander Wang <rander.wang@intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20210309004127.4940-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-03-25 09:04:06 +01:00
Pierre-Louis Bossart
b94b71a7a6
ASoC: SOF: Intel: unregister DMIC device on probe error
...
commit 5bb0ecddb2a7f638d65e457f3da9fa334c967b14 upstream.
We only unregister the platform device during the .remove operation,
but if the probe fails we will never reach this sequence.
Suggested-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Fixes: dd96daca6c
("ASoC: SOF: Intel: Add APL/CNL HW DSP support")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Link: https://lore.kernel.org/r/20210302003410.1178535-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-03-25 09:04:06 +01:00
Pierre-Louis Bossart
6d7fdad08f
ASoC: SOF: Intel: broadwell: fix mutual exclusion with catpt driver
...
In v5.10, the "haswell" driver was replaced by the "catpt" driver, but
the mutual exclusion with the SOF driver was not updated. This leads
to errors with card names and UCM profiles not being loaded by
PulseAudio.
This fix should only be applied on v5.10-stable, the mutual exclusion
was removed in 5.11.
Reported-by: David Ward <david.ward@ll.mit.edu >
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=211985
Fixes: 6cbfa11d26
("ASoC: Intel: Select catpt and deprecate haswell")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com >
Acked-by: Mark Brown <broonie@kernel.org >
Cc: <stable@vger.kernel.org >
Cc: Sasha Levin <sashal@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-03-11 14:17:21 +01:00
Ranjani Sridharan
cb8e225c16
ASoC: SOF: Intel: hda: cancel D0i3 work during runtime suspend
...
[ Upstream commit 0084364d9678e9d722ee620ed916f2f9954abdbf ]
Cancel the D0i3 work during runtime suspend as no streams are
active at this point anyway.
Fixes: 63e51fd33f
("ASoC: SOF: Intel: cnl: Implement feature to support DSP D0i3 in S0")
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20210128092345.1033085-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-03-04 11:37:44 +01:00
Kai-Heng Feng
1fe0ce2f9a
ASoC: SOF: Intel: hda: Resume codec to do jack detection
...
[ Upstream commit bcd7059abc19e6ec5b2260dff6a008fb99c4eef9 ]
Instead of queueing jackpoll_work, runtime resume the codec to let it
use different jack detection methods based on jackpoll_interval.
This partially matches SOF driver's behavior with commit a6e7d0a4bd
("ALSA: hda: fix jack detection with Realtek codecs when in D3"), the
difference is SOF unconditionally resumes the codec.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Link: https://lore.kernel.org/r/20210112181128.1229827-1-kai.heng.feng@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-02-07 15:37:14 +01:00
Pierre-Louis Bossart
b030ba7f12
ASoC: SOF: Intel: soundwire: fix select/depend unmet dependencies
...
[ Upstream commit bd9038faa9d7f162b47e1577e35ec5eac39f9d90 ]
The LKP bot reports the following issue:
WARNING: unmet direct dependencies detected for SOUNDWIRE_INTEL
Depends on [m]: SOUNDWIRE [=m] && ACPI [=y] && SND_SOC [=y]
Selected by [y]:
- SND_SOC_SOF_INTEL_SOUNDWIRE [=y] && SOUND [=y] && !UML &&
SND [=y] && SND_SOC [=y] && SND_SOC_SOF_TOPLEVEL [=y] &&
SND_SOC_SOF_INTEL_TOPLEVEL [=y] && SND_SOC_SOF_INTEL_PCI [=y]
This comes from having tristates being configured independently, when
in practice the CONFIG_SOUNDWIRE needs to be aligned with the SOF
choices: when the SOF code is compiled as built-in, the
CONFIG_SOUNDWIRE also needs to be 'y'.
The easiest fix is to replace the 'depends' with a 'select' and have a
single user selection to activate SoundWire on Intel platforms. This
still allows regmap to be compiled independently as a module.
This is just a temporary fix, the select/depend usage will be
revisited and the SOF Kconfig re-organized, as suggested by Arnd
Bergman.
Reported-by: kernel test robot <lkp@intel.com >
Fixes: a115ab9b8b
('ASoC: SOF: Intel: add build support for SoundWire')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20210122005725.94163-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-02-03 23:28:47 +01:00
Kai-Heng Feng
9e9ae646eb
ASoC: SOF: Intel: hda: Avoid checking jack on system suspend
...
commit ef4d764c99f792b725d4754a3628830f094f5c58 upstream.
System takes a very long time to suspend after commit 215a22ed31
("ALSA: hda: Refactor codec PM to use direct-complete optimization"):
[ 90.065964] PM: suspend entry (s2idle)
[ 90.067337] Filesystems sync: 0.001 seconds
[ 90.185758] Freezing user space processes ... (elapsed 0.002 seconds) done.
[ 90.188713] OOM killer disabled.
[ 90.188714] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[ 90.190024] printk: Suspending console(s) (use no_console_suspend to debug)
[ 90.904912] intel_pch_thermal 0000:00:12.0: CPU-PCH is cool [49C], continue to suspend
[ 321.262505] snd_hda_codec_realtek ehdaudio0D0: Unable to sync register 0x2b8000. -5
[ 328.426919] snd_hda_codec_realtek ehdaudio0D0: Unable to sync register 0x2b8000. -5
[ 329.490933] ACPI: EC: interrupt blocked
That commit keeps the codec suspended during the system suspend. However,
mute/micmute LED will clear codec's direct-complete flag by
dpm_clear_superiors_direct_complete().
This doesn't play well with SOF driver. When its runtime resume is
called for system suspend, hda_codec_jack_check() schedules
jackpoll_work which uses snd_hdac_is_power_on() to check whether codec
is suspended. Because the direct-complete path isn't taken,
pm_runtime_disable() isn't called so snd_hdac_is_power_on() returns
false and jackpoll continues to run, and snd_hda_power_up_pm() cannot
power up an already suspended codec in multiple attempts, causes the
long delay on system suspend:
if (dev->power.direct_complete) {
if (pm_runtime_status_suspended(dev)) {
pm_runtime_disable(dev);
if (pm_runtime_status_suspended(dev)) {
pm_dev_dbg(dev, state, "direct-complete ");
goto Complete;
}
pm_runtime_enable(dev);
}
dev->power.direct_complete = false;
}
When direct-complete path is taken, snd_hdac_is_power_on() returns true
and hda_jackpoll_work() is skipped by accident. So this is still not
correct.
If we were to use snd_hdac_is_power_on() in system PM path,
pm_runtime_status_suspended() should be used instead of
pm_runtime_suspended(), otherwise pm_runtime_{enable,disable}() may
change the outcome of snd_hdac_is_power_on().
Because devices suspend in reverse order (i.e. child first), it doesn't
make much sense to resume an already suspended codec from audio
controller. So avoid the issue by making sure jackpoll isn't used in
system PM process.
Fixes: 215a22ed31
("ALSA: hda: Refactor codec PM to use direct-complete optimization")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20210112181128.1229827-3-kai.heng.feng@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-27 11:55:28 +01:00
Kai Vehmanen
1918787705
ASoC: SOF: Intel: fix page fault at probe if i915 init fails
...
commit 9c25af250214e45f6d1c21ff6239a1ffeeedf20e upstream.
The earlier commit to fix runtime PM in case i915 init fails,
introduces a possibility to hit a page fault.
snd_hdac_ext_bus_device_exit() is designed to be called from
dev.release(). Calling it outside device reference counting, is
not safe and may lead to calling the device_exit() function
twice. Additionally, as part of ext_bus_device_init(), the device
is also registered with snd_hdac_device_register(). Thus before
calling device_exit(), the device must be removed from device
hierarchy first.
Fix the issue by rolling back init actions by calling
hdac_device_unregister() and then releasing device with put_device().
This matches with existing code in hdac-ext module.
To complete the fix, add handling for the case where
hda_codec_load_module() returns -ENODEV, and clean up the hdac_ext
resources also in this case.
In future work, hdac-ext interface should be extended to allow clients
more flexibility to handle the life-cycle of individual devices, beyond
just the current snd_hdac_ext_bus_device_remove(), which removes all
devices.
BugLink: https://github.com/thesofproject/linux/issues/2646
Reported-by: Jaroslav Kysela <perex@perex.cz >
Fixes: 6c63c954e1
("ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@intel.com >
Reviewed-by: Libin Yang <libin.yang@intel.com >
Reviewed-by: Bard Liao <bard.liao@intel.com >
Link: https://lore.kernel.org/r/20210113150715.3992635-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2021-01-27 11:55:21 +01:00
Pierre-Louis Bossart
1081126211
ASoC: SOF: Intel: fix Kconfig dependency for SND_INTEL_DSP_CONFIG
...
[ Upstream commit 358f0ac1f2791c80c19cc26706cf34664c9fd756 ]
SND_INTEL_DSP_CONFIG is selected by the HDaudio, Skylake and SOF
drivers. When the HDaudio link is not selected as a option, this
Kconfig option is not touched and will default to whatever other
drivers selected. In the case e.g. where HDaudio is compiled as
built-in, the linker will complain:
ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe':
sof-pci-dev.c:(.text+0x5c): undefined reference to
`snd_intel_dsp_driver_probe'
Adding the select for all HDaudio platforms, regardless of whether
they rely on the HDaudio link or not, solves the problem.
Reported-by: Randy Dunlap <rdunlap@infradead.org >
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Fixes: 82d9d54a6c
('ALSA: hda: add Intel DSP configuration / probe code')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20201112164425.25603-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2020-12-30 11:53:08 +01:00
Mark Brown
fd6b519a30
Merge tag 'v5.9-rc5' into asoc-5.10
...
Linux 5.9-rc5
2020-10-06 16:19:24 +01:00
Kai Vehmanen
163cd1059a
ASoC: hdac: make SOF HDA codec driver probe deterministic
...
To provide backward compatibility to older systems, the SOF HDA driver
allows user to specify which HDMI codec driver to use at runtime via
kernel parameter. This mechanism has a subtle flaw in that it assumes
the codec drivers not to be loaded when the SOF PCI driver is loaded.
The problem is rooted in use of the hdev->type field.
snd_hdac_ext_bus_device_init() initializes this field to HDA_DEV_ASOC.
This signals the HDA core that ASoC drivers should be considered in
driver matching (hda_bus_match()). The SOF and SST drivers continue by
overriding this field to HDA_DEV_LEGACY and proceeding to load driver
modules with request_module(). Correct drivers will get loaded and
attached.
If however the codec drivers are already loaded when
snd_hdac_ext_bus_device_init() is called, the matching will not work as
expected as device type is still set to HDA_DEV_ASOC. Specifically if
hdac-hdmi is attached when machine driver is configured to use hdac-hda,
this leads to out-of-bounds memory access in
hda_dsp_hdmi_build_controls().
Fix the issue by adding codec type as a parameter to
snd_hdac_ext_bus_device_init() and ensuring type is set correctly from
the start.
Fixes: 139c7febad
("ASoC: SOF: Intel: add support for snd-hda-codec-hdmi")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20200921100841.2882662-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-09-21 23:57:24 +01:00
Mark Brown
e6937b6d1a
Merge series "ASoC: SOF: small fixes for 5.10" from Kai Vehmanen <kai.vehmanen@linux.intel.com>:
...
Series that adds debug support for IMX platforms, more details to
FW version information, adds missing -EACCESS handling to
pm_runtime_get_sync() calls and a set of minor cosmetic, trace
verbosity and coding style issues.
Guennadi Liakhovetski (3):
ASoC: SOF: (cosmetic) remove redundant "ret" variable uses
ASoC: SOF: remove several superfluous type-casts
ASoC: SOF: fix range checks
Iulian Olaru (1):
ASoC: SOF: imx: Add debug support for imx platforms
Karol Trzcinski (1):
ASoC: SOF: Add `src_hash` to `sof_ipc_fw_version` structure
Pierre-Louis Bossart (3):
ASoC: SOF: debug: update test for pm_runtime_get_sync()
ASoC: SOF: control: update test for pm_runtime_get_sync()
ASoC: SOF: Intel: hda: reduce verbosity of boot error logs
include/sound/sof/info.h | 4 +-
sound/soc/sof/control.c | 62 +++++++++++++--------------
sound/soc/sof/debug.c | 2 +-
sound/soc/sof/imx/Kconfig | 8 ++++
sound/soc/sof/imx/Makefile | 3 ++
sound/soc/sof/imx/imx-common.c | 72 ++++++++++++++++++++++++++++++++
sound/soc/sof/imx/imx-common.h | 16 +++++++
sound/soc/sof/imx/imx8.c | 23 +++++++++-
sound/soc/sof/imx/imx8m.c | 17 +++++++-
sound/soc/sof/intel/hda-loader.c | 16 +++----
sound/soc/sof/intel/hda.c | 12 ++++--
sound/soc/sof/intel/hda.h | 2 +
sound/soc/sof/sof-audio.c | 6 +--
sound/soc/sof/sof-priv.h | 8 ++++
sound/soc/sof/topology.c | 44 ++++++++++---------
15 files changed, 226 insertions(+), 69 deletions(-)
create mode 100644 sound/soc/sof/imx/imx-common.c
create mode 100644 sound/soc/sof/imx/imx-common.h
--
2.27.0
2020-09-17 17:40:15 +01:00
Rander Wang
30ee3738f8
ASoC: SOF: Intel: Add support for tgl-h
...
SOF will support tgl-h and tgl-lp in different FW binaries due to
hardware difference, so create another dev_desc entry with FW name
of sof-tgl-h.ri and dsp_desc named tglh_chip_info for tgl-h.
Fixes: c8d2e2bfae
("ASoC: SOF: Intel: add PCI IDs for ICL-H and TGL-H")
Signed-off-by: Rander Wang <rander.wang@intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200917103609.2559916-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-09-17 17:40:09 +01:00
Pierre-Louis Bossart
776100a4ce
ASoC: SOF: Intel: hda: reduce verbosity of boot error logs
...
Previous commits reduced the verbosity of errors during boot
iterations, but there are still a couple remaining which generate
false positives. Errors should only be logged when after last attempt
to download firmware failed.
Duplicating logs and assigning them different levels based on the
iteration number isn't really elegant, use macro as suggested by
Guennadi.
Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.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/20200917105633.2579047-9-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-09-17 15:53:21 +01:00
Pierre-Louis Bossart
52e4d0ae62
ASoC: SOF: Intel: hda-loader: s/master/primary
...
Use inclusive language for DSP cores.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com >
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200910164125.2033062-5-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-09-11 15:29:32 +01:00
Ranjani Sridharan
fde1065528
ASoC: SOF: Intel: remove the HDA_DSP_CORE_MASK() macro
...
Remove the HDA_DSP_CORE_MASK() macro and use BIT() and GENMASK()
macros directly for more clarity.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Keyon Jie <yang.jie@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200910164125.2033062-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-09-11 15:29:31 +01:00
Ranjani Sridharan
914fab3b43
ASoC: SOF: Intel: hda: modify core_power_up/down op
...
Modify the core_power_up/down ops for HDA platforms to restrict
the core_mask to the ones allowed by chip->cores_mask. This is needed
because on some HDA platforms not all cores can be powered up/down
by the host and this must be handled internally in the FW.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Keyon Jie <yang.jie@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200910164125.2033062-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-09-11 15:29:30 +01:00
Ranjani Sridharan
64b969177c
ASoC: SOF: rename cores_mask to host_managed_cores_mask
...
Rename the cores_mask in struct sof_intel_dsp_desc to
host_managed_cores_mask to be more indicative of the fact that
only these cores can be powered up/down by the host.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Rander Wang <rander.wang@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Keyon Jie <yang.jie@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200910164125.2033062-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-09-11 15:29:29 +01:00
Ranjani Sridharan
01d42d5a0a
ASoC: SOF: Intel: hda: Simplify error handling during FW boot
...
Modify cl_stream_prepare() to return a pointer to the prepared stream
if successful or ERR_PTR() otherwise. This would simplify the error
paths in hda_dsp_cl_boot_firmware() and hda_dsp_cl_boot_firmware_iccmax()
to perform the stream cleanup after FW boot. This change also renders
the function get_stream_with_tag() redundant.
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200826184532.1612070-9-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-27 14:22:24 +01:00
Ranjani Sridharan
8b98491a6b
ASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms
...
Separate the dsp ops for TGL ops to specify the use of ICCMAX
FW boot sequence in the run op. All other ops are identical.
Also separate the TGL descriptors into a separate file to make
it easier to follow.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200826184532.1612070-8-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-27 14:22:23 +01:00
Ranjani Sridharan
acf705a425
ASoC: SOF: Intel: hda: Define FW boot sequence with ICCMAX
...
Define the FW boot sequence for platforms that are recommended
to use ICCMAX. This function uses the existing prepare and cleanup
functions for creating a specially crafted capture stream before
powering up the DSP cores.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200826184532.1612070-7-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-27 14:22:22 +01:00
Ranjani Sridharan
d43e381390
ASoC: SOF: Intel: hda: define macro for code loader stream format
...
This will be used for the ICCMAX stream as well.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200826184532.1612070-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-27 14:22:21 +01:00
Ranjani Sridharan
c07fa3fcbd
ASoC: SOF: Intel: hda: modify the signature of get_stream_with_tag()
...
Modify the signature of get_stream_with_tag() to add the direction
as an argument to extend it for using with capture streams.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200826184532.1612070-5-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-27 14:22:20 +01:00
Ranjani Sridharan
aca961f196
ASoC: SOF: Intel: hda: Add helper function to program ICCMAX stream
...
For some platforms, the recommended HW sequence for FW boot involves
starting a specially crafted capture stream before powering
on the DSP cores. Add a helper function to define the minimal
recommended stream programming sequence for this stream.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200826184532.1612070-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-27 14:22:19 +01:00
Yong Zhi
0ff06df0be
ASoC: SOF: Intel: hda: Remove unused parameters in cl_dsp_init()
...
cl_dsp_init() doesn't use the fwdata and fwsize parameters.
Remove it, and update caller accordingly.
Signed-off-by: Yong Zhi <yong.zhi@intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200826184532.1612070-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-27 14:22:18 +01:00
Ranjani Sridharan
29c8e4398f
ASoC: SOF: Intel: hda: add extended rom status dump to error log
...
Dump the extended ROM status information to the error logs
to aid with remote support. The analysis of these logs requires
access to non-public technical information.
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Jaska Uimonen <jaska.uimonen@intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200825235040.1586478-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-26 13:19:15 +01:00
Jaska Uimonen
3dca35e35b
ASoC: SOF: intel: hda: support also devices with 1 and 3 dmics
...
Currently the dmic check code supports only devices with 2 or 4 dmics.
With other dmic counts the function will return 0. Lately we've seen
devices with only 1 dmic thus enable also configurations with 1, and
possibly 3, dmics. Add also topology postfix -1ch and -3ch for new dmic
configuration.
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200825235040.1586478-4-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-26 13:19:13 +01:00
Rander Wang
6c63c954e1
ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work
...
When hda_codec_probe() doesn't initialize audio component, we disable
the codec and keep going. However,the resources are not released. The
child_count of SOF device is increased in snd_hdac_ext_bus_device_init
but is not decrease in error case, so SOF can't get suspended.
snd_hdac_ext_bus_device_exit will be invoked in HDA framework if it
gets a error. Now copy this behavior to release resources and decrease
SOF device child_count to release SOF device.
Signed-off-by: Rander Wang <rander.wang@intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200825235040.1586478-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-26 13:19:12 +01:00
Ranjani Sridharan
53ec753137
ASoC: SOF: Intel: hda: report error only for the last ROM init iteration
...
The FW boot sequence includes multiple attempts for ROM init.
When it does take more than one attempt, we should not log the
errors encountered during the failed attempts and only log them
during the final iteration.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Link: https://lore.kernel.org/r/20200825235040.1586478-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-26 13:19:11 +01:00
Pierre-Louis Bossart
135ab457e7
ASoC: Intel: use consistent HDAudio spelling in comments/docs
...
We use HDaudio and HDAudio, pick one to make searches easier.
No functionality change
Reported-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20200824200912.46852-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-25 20:39:39 +01:00
Sathyanarayana Nujella
5253a73d56
ASoC: SOF: Add topology filename override based on dmi data match
...
Add topology filename override based on system DMI data matching,
typically to account for a different hardware layout.
In ACPI based systems, the tplg_filename is pre-defined in an ACPI
machine table. When a DMI quirk is detected, the
sof_pdata->tplg_filename is not set with the hard-coded ACPI value,
and instead is set with the DMI-specific filename.
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com >
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20200821195603.215535-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-24 13:41:35 +01:00
Gustavo A. R. Silva
df561f6688
treewide: Use fallthrough pseudo-keyword
...
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.
[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
2020-08-23 17:36:59 -05:00
Pierre-Louis Bossart
a115ab9b8b
ASoC: SOF: Intel: add build support for SoundWire
...
Select SoundWire capabilities on newer Intel platforms, starting with
CannonLake/CoffeeLake/CometLake.
As done for HDaudio, the SoundWire link is an opt-in capability. We
explicitly test for ACPI to avoid warnings on unmet dependencies on
the SoundWire side.
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/20200819124429.3785-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-21 11:59:07 +01:00
Pierre-Louis Bossart
1eb629363a
ASoC: SOF: Intel: hda: import SOUNDWIRE_INIT namespace
...
Make sure the SoundWire driver can be loaded
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/20200819124404.3734-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-20 20:30:32 +01:00
Mark Brown
9af73c31f4
Merge series "ASoC: SOF/Intel: fix cppcheck warnings" from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
...
A small set of fixes to reduce the number of warnings.
Pierre-Louis Bossart (5):
ASOC: SOF: Intel: hda-codec: move unused label to correct position
ASoC: SOF: Intel: hda-codec: move variable used conditionally
ASoC: Intel: rename shadowed variable for all broadwell boards
ASoC: Intel: bytcht_cx2072x: simplify return handling
ASoC: Intel: sof_sdw: clarify operator precedence
sound/soc/intel/boards/bdw-rt5650.c | 10 +++++-----
sound/soc/intel/boards/bdw-rt5677.c | 8 ++++----
sound/soc/intel/boards/broadwell.c | 8 ++++----
sound/soc/intel/boards/bytcht_cx2072x.c | 2 +-
sound/soc/intel/boards/sof_sdw.c | 2 +-
sound/soc/sof/intel/hda-codec.c | 7 ++++++-
6 files changed, 21 insertions(+), 16 deletions(-)
--
2.25.1
2020-08-18 14:52:49 +01:00
Randy Dunlap
8932f0cb20
ASoC: SOF: delete repeated words in comments
...
Drop the repeated words {that, the} in comments.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Cc: Liam Girdwood <lgirdwood@gmail.com >
Cc: Mark Brown <broonie@kernel.org >
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200808012156.10827-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-18 14:52:42 +01:00
Pierre-Louis Bossart
2e3e0bc378
ASoC: SOF: Intel: hda-codec: move variable used conditionally
...
Cppcheck reports the following warning:
sound/soc/sof/intel/hda-codec.c:122:20: style: Unused variable: codec
[unusedVariable]
struct hda_codec *codec;
^
Move declaration inside a conditionally-compiled block.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20200813175839.59422-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-17 15:42:57 +01:00
Pierre-Louis Bossart
11ec0edc64
ASOC: SOF: Intel: hda-codec: move unused label to correct position
...
Cppcheck reports the following warning:
sound/soc/sof/intel/hda-codec.c:191:1: style: Label 'error' is not
used. [unusedLabel]
This label is indeed only used conditionally, move it where it's
actually used.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/20200813175839.59422-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-08-17 15:42:56 +01:00
Marcin Rajwa
79560b8aeb
ASoC: SOF: Intel: disable traces when switching to S0Ix D0I3
...
We should always disable DMA trace on S0Ix. When staying at S0-D0I3,
we should enable DMA trace while both DMA Trace debug is enabled and
hda_enable_trace_D0I3_S0 is set. This commit corrects the existed
logic errors about that.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com >
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200727183613.1419005-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-07-28 16:22:35 +01:00
Marcin Rajwa
195f101980
ASoC: SOF: Intel: fix the suspend procedure to support s0ix entry
...
This patch fixes the suspend & resume procedure to allow entry into the
low power states with some streams being active as a wake source - wake on
voice is a perfect example. The current implementation does not stop
the CORB/RIRB DMA and does not power down the HDA links. With firmware's
help, the platform has been able to still enter s0ix state on older
platforms, but the sequence is still incorrect, and the additional
driver actions are needed to ensure correct s0ix behaviour.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com >
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com >
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200727183613.1419005-2-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-07-28 16:22:34 +01:00
Kuninori Morimoto
1205300af9
ASoC: sof: use asoc_substream_to_rtd()
...
Now we can use asoc_substream_to_rtd() macro,
let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com >
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/87o8ob0yun.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-07-23 19:07:24 +01:00
Pierre-Louis Bossart
4228668eb9
ASoC: Intel: SOF: merge COMETLAKE_LP and COMETLAKE_H
...
We already have two configurations for CometLake, and a third one
coming. On other platforms, we used a single Kconfig option, so we
should follow the same trend by merging the two cases in a backwards
compatible way.
The backwards compatibility is handled by overloading the COMETLAKE_LP
kconfig as COMETLAKE. In practice we've never seen a case where
COMETLAKE_H is not selected along with COMETLAKE_LP, so keeping one
of the two is enough.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Link: https://lore.kernel.org/r/20200617164755.18104-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-17 20:01:00 +01:00
Brent Lu
40e2c46589
ASoC: SOF: Intel: hda: Clear RIRB status before reading WP
...
Port commit 6d011d5057
("ALSA: hda: Clear RIRB status before reading
WP") from legacy HDA driver to fix the get response timeout issue.
Current SOF driver does not suffer from this issue because sync write
is enabled in hda_init. The issue will come back if the sync write is
disabled for some reason.
Signed-off-by: Brent Lu <brent.lu@intel.com >
Reviewed-by: Takashi Iwai <tiwai@suse.de >
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Link: https://lore.kernel.org/r/1591959048-15813-1-git-send-email-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-06-15 15:18:34 +01:00
Kai Vehmanen
89d73ccab2
ASoC: SOF: Intel: hda: fix generic hda codec support
...
Add support for using generic codec driver with SOF. Generic driver
is used if:
- snd_sof_intel_hda_common.hda_model="generic" is set, or
- fallback if no other codec driver is found
The implementation is aligned with snd-hda-intel driver, and fixes audio
support for systems like Acer Swift 3 SF314-57G, on which this issue was
originally reported.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Hui Wang <hui.wang@canonical.com >
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com >
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
BugLink: https://github.com/thesofproject/linux/issues/1807
BugLink: https://bugs.launchpad.net/bugs/1877757
Link: https://lore.kernel.org/r/20200529160358.12134-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org >
2020-05-29 18:18:02 +01:00