aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/atom
AgeCommit message (Collapse)Author
2021-08-26ASoC: intel: atom: Fix breakage for PCM buffer address setupTakashi Iwai
[ Upstream commit 65ca89c2b12cca0d473f3dd54267568ad3af55cc ] The commit 2e6b836312a4 ("ASoC: intel: atom: Fix reference to PCM buffer address") changed the reference of PCM buffer address to substream->runtime->dma_addr as the buffer address may change dynamically. However, I forgot that the dma_addr field is still not set up for the CONTINUOUS buffer type (that this driver uses) yet in 5.14 and earlier kernels, and it resulted in garbage I/O. The problem will be fixed in 5.15, but we need to address it quickly for now. The fix is to deduce the address again from the DMA pointer with virt_to_phys(), but from the right one, substream->runtime->dma_area. Fixes: 2e6b836312a4 ("ASoC: intel: atom: Fix reference to PCM buffer address") Reported-and-tested-by: Hans de Goede <hdegoede@redhat.com> Cc: <stable@vger.kernel.org> Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/2048c6aa-2187-46bd-6772-36a4fb3c5aeb@redhat.com Link: https://lore.kernel.org/r/20210819152945.8510-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-08-26ASoC: intel: atom: Fix reference to PCM buffer addressTakashi Iwai
commit 2e6b836312a477d647a7920b56810a5a25f6c856 upstream. PCM buffers might be allocated dynamically when the buffer preallocation failed or a larger buffer is requested, and it's not guaranteed that substream->dma_buffer points to the actually used buffer. The address should be retrieved from runtime->dma_addr, instead of substream->dma_buffer (and shouldn't use virt_to_phys). Also, remove the line overriding runtime->dma_area superfluously, which was already set up at the PCM buffer allocation. Cc: Cezary Rojewski <cezary.rojewski@intel.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210728112353.6675-3-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16ASoC: intel: atom: Stop advertising non working S24LE supportHans de Goede
commit aa65bacdb70e549a81de03ec72338e1047842883 upstream. The SST firmware's media and deep-buffer inputs are hardcoded to S16LE, the corresponding DAIs don't have a hw_params callback and their prepare callback also does not take the format into account. So far the advertising of non working S24LE support has not caused issues because pulseaudio defaults to S16LE, but changing pulse-audio's config to use S24LE will result in broken sound. Pipewire is replacing pulse now and pipewire prefers S24LE over S16LE when available, causing the problem of the broken S24LE support to come to the surface now. Cc: stable@vger.kernel.org BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/866 Fixes: 098c2cd281409 ("ASoC: Intel: Atom: add 24-bit support for media playback and capture") Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210324132711.216152-2-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-26ASoC: intel: Fix memleak in sst_media_openDinghao Liu
[ Upstream commit 062fa09f44f4fb3776a23184d5d296b0c8872eb9 ] When power_up_sst() fails, stream needs to be freed just like when try_module_get() fails. However, current code is returning directly and ends up leaking memory. Fixes: 0121327c1a68b ("ASoC: Intel: mfld-pcm: add control for powering up/down dsp") Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200813084112.26205-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-02ASoC: Intel: atom: Take the drv->lock mutex before calling sst_send_slot_map()Hans de Goede
[ Upstream commit 81630dc042af998b9f58cd8e2c29dab9777ea176 ] sst_send_slot_map() uses sst_fill_and_send_cmd_unlocked() because in some places it is called with the drv->lock mutex already held. So it must always be called with the mutex locked. This commit adds missing locking in the sst_set_be_modules() code-path. Fixes: 24c8d14192cc ("ASoC: Intel: mrfld: add DSP core controls") 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/20200402185359.3424-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-24ASoC: Intel: mrfld: return error codes when an error occursColin Ian King
commit 3025571edd9df653e1ad649f0638368a39d1bbb5 upstream. Currently function sst_platform_get_resources always returns zero and error return codes set by the function are never returned. Fix this by returning the error return code in variable ret rather than the hard coded zero. Addresses-Coverity: ("Unused value") Fixes: f533a035e4da ("ASoC: Intel: mrfld - create separate module for pci part") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200208220720.36657-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-24ASoC: Intel: mrfld: fix incorrect check on p->sinkColin Ian King
commit f5e056e1e46fcbb5f74ce560792aeb7d57ce79e6 upstream. The check on p->sink looks bogus, I believe it should be p->source since the following code blocks are related to p->source. Fix this by replacing p->sink with p->source. Fixes: 24c8d14192cc ("ASoC: Intel: mrfld: add DSP core controls") Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Copy-paste error") Link: https://lore.kernel.org/r/20191119113640.166940-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-12ASoC: Intel: mrfld: fix uninitialized variable accessArnd Bergmann
[ Upstream commit 1539c7f23f256120f89f8b9ec53160790bce9ed2 ] Randconfig testing revealed a very old bug, with gcc-8: sound/soc/intel/atom/sst/sst_loader.c: In function 'sst_load_fw': sound/soc/intel/atom/sst/sst_loader.c:357:5: error: 'fw' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (fw == NULL) { ^ sound/soc/intel/atom/sst/sst_loader.c:354:25: note: 'fw' was declared here const struct firmware *fw; We must check the return code of request_firmware() before we look at the pointer result that may be uninitialized when the function fails. Fixes: 9012c9544eea ("ASoC: Intel: mrfld - Add DSP load and management") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-01-31ASoC: atom: fix a missing check of snd_pcm_lib_malloc_pagesKangjie Lu
commit 44fabd8cdaaa3acb80ad2bb3b5c61ae2136af661 upstream. snd_pcm_lib_malloc_pages() may fail, so let's check its status and return its error code upstream. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-12ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()'Christophe JAILLET
[ Upstream commit eaadb1caa966a91128297b754e90b7c92b350a00 ] In some error handling paths, an error code is assiegned to 'ret'. However, the function always return 0. Fix it and return the error code if such an error paths is taken. Fixes: 3d9ff34622ba ("ASoC: Intel: sst: add stream operations") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-17ASoC: Intel: Atom: make snd_pcm_hardware constBhumika Goyal
Make this const as it is only used in a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-16ASoC: Intel: constify snd_compr_codec_caps structuresJulia Lawall
These snd_compr_codec_caps structures are only copied into other structures, so they can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-14ASoC: Intel: make snd_soc_platform_driver constBhumika Goyal
Make these const as they are only passed as the 2nd argument to the function snd_soc_register_platform, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-04ASoC: Intel: constify pci_device_id.Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by <linux/pci.h> work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17ASoC: Intel: Atom: constify snd_soc_dai_ops structuresGustavo A. R. Silva
These structures are only stored in the ops field of a snd_soc_dai_driver structure. That field is declared const, so snd_soc_dai_ops structures that have this property can be declared as const also. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-16ASoC: intel: Use kvzalloc() for suspend buffersTakashi Iwai
Intel SST driver allocates lots of pages at suspend for saving the firmware states, and this may occasionally lead to the allocation error due to the high order, ending up with the suspend failure. Use kvzalloc() so that it can fall back to vmalloc() gracefully. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: Intel: add machine driver for BYT/CHT + ES8316Daniel Drake
Add new machine driver, tested with Weibu F3C MiniPC. Based heavily on code provided by David Yang @ Everest, and other machine drivers in the same directory. Signed-off-by: David Yang <yangxiaohua@everest-semi.com> [drake@endlessm.com: cleanups and modernization] Signed-off-by: Daniel Drake <drake@endlessm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never usedDouglas Anderson
In commit 9a075265c6dc ("ASoC: Intel: sst: Remove unused function sst_restore_shim64()"), we deleted the sst_restore_shim64() since it was never used. ...but a quick look at the code shows that we should also be able to remove the sst_save_shim64() function and the structure members we were storing data in. Once we delete sst_save_shim64() there are no longer any users of the 'sst_shim_regs64' structure. That means we can delete it completely and also avoid allocating memory for it. This saves a whopping 136 bytes of devm allocated memory. We also get the nice benefit of avoiding an error path in the init code. Note that the saving code that we're removing (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24ASoC: Move quirk to identify correct machine driverNaveen M
sst_acpi_mach has a quirk field to handle board specific quirks. Patch moves quirk call to sst_acpi_find_machine() instead of calling it in respective driver Signed-off-by: Naveen M <naveen.m@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24ASoC: Intel: Convert atom machine data to C99 styleNaveen M
C99 style struct initialization helps in readability as well as initialization of variables not specified as NULL. Patch modifies all atom machine data. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Naveen M <naveen.m@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24ASoC: Intel: sst: Remove unused function sst_restore_shim64()Matthias Kaehlcke
Looks like the function has never been used since it was added by commit b0d94acd634a ("ASoC: Intel: mrfld - add shim save restore"). Removing it fixes the following warning when building with clang: sound/soc/intel/atom/sst/sst.c:360:20: error: unused function 'sst_restore_shim64' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14ASoC: Intel: sst: fix spelling mistake: "allocationf" -> "allocation"Colin Ian King
Trivial fix to spelling mistake in dev_err message. Also replace "fail" with "failure". Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-14ASoC: intel: atom: localize variable without external linkageTakashi Sakamoto
A driver for Intel SST driver for old atom platform includes a variable which has no external linkage. These functions should have static qualifier. This commit adds the qualifier to localize the variable. This issue is detected by sparse: sst.c:261:1: warning: symbol 'dev_attr_firmware_version' was not declared. Should it be static? Cc: Sebastien Guiriec <sebastien.guiriec@intel.com> Cc: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-18ASoC: Intel: Atom: update Thinkpad 10 quirkPierre-Louis Bossart
There are multiple skews of the same Lenovo audio hardware based on the Realtek RT5670 codec. Manufacturer: LENOVO Product Name: 20C1CTO1WW Version: ThinkPad 10 Manufacturer: LENOVO Product Name: 20C3001VHH Version: ThinkPad 10 Manufacturer: LENOVO Product Name: 20C10024GE Version: ThinkPad Tablet B Manufacturer: LENOVO Product Name: 20359 Version: Lenovo Miix 2 10 For all these devices, the same quirk is used to force the machine driver to be based on RT5670 instead of RT5640 as indicated by the BIOS. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96691 Tested-by: Nicole Faerber <nicole.faerber@dpin.de> Tested-by: Viacheslav Ostroukh <v.dev@ostroukh.me> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-27ASoC: intel: Don't print FW version repeatedlyTakashi Iwai
Intel SST driver spews an info message "FW Versoin xxxx" at each time the device gets initialized. Since it's triggered at each PM (or even runtime PM), it appears so ofetn, and rather becomes annoying than useful. This patch suppresses the superfluous messages by checking the currently loaded FW version with the previously loaded one. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13ASoC: Intel: Enable bytcht_nocodec machine driverPierre-Louis Bossart
Make sure this machine driver is only used if enabled explicitly and if there is no information found in the SSDT. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13ASoC: Intel: Atom: enable BYT/CHT+DA7213 machine driverPierre-Louis Bossart
Add entries in HID table and reference to bytcht_da7213 driver Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31ASoC: Intel: add support for ALC3270 codecPierre-Louis Bossart
Use ACPI ID 10EC3270 to load machine driver for cht-bsw-rt5645 and add reference to 3270 to use the rt5645 mode Tested on Asus T100HA Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31ASoC: Intel: Baytrail: add quirk for Lenovo Thinkpad 10Pierre-Louis Bossart
the BIOS reports this codec as RT5640 but it's a rt5670. Use the quirk mechanism to use the cht_bsw_rt5672 machine driver Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31ASoC: Intel: Atom: add machine driver for baytrail-rt5645 hardwarePierre-Louis Bossart
Use machine driver initially defined for CherryTrail Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31ASoC: Intel: add support for Realtek 5651 on CherrytrailPierre-Louis Bossart
RT5651 is used on some Cherrytrail platforms, add the ACPI ID in machine table. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156191 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31ASoC: Intel: Atom: Add HP Pavilion x2 10-p000 machine entryAlexandrov Stansilav
Add machine entry for HP X2 Pavilion 10-p100. This notebook contains rt5640 codec, but with ACPI ID "10EC3276". Signed-off-by: Alexandrov Stansilav <neko@nya.ai> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31Merge branch 'fix/intel' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
2017-01-31ASoC: Intel: atom: fix frame polarityPierre-Louis Bossart
The current frame sync polarity definitions are inconsistent in the Atom/DPCM driver, fix to align with regular ASoC definitions and update code in platform and machine drivers for RT5640 and RT5651. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31ASoC: Intel: Atom: Configure media_loop1 and sprot_loop in stereoSebastien Guiriec
Most of the devices are using stereo speakers so media_loop1 and sprot_loop default mode should be stereo. As per default all the routing UCM configuration doesn't enable Post processing loops it is not impacting curent configurations. Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-17ASoC: Intel: rename SND_SST_MFLD_PLATFORM to SND_SST_ATOM_HIFI2_PLATFORMAndy Shevchenko
Rename SND_SST_MFLD_PLATFORM to SND_SST_ATOM_HIFI2_PLATFORM to make it clear that is not only about Medfield platform. The new name is derived from Intel Atom and HiFi2. HiFi2 is the DSP version, it's public information for Intel *Field/*Trail parts, see https://www.alsa-project.org/main/index.php/Firmware. By combining HiFi2 with Atom we get a unique non-ambiguous description of the core+DSP hardware for Intel Medfield through Intel Cherrytrail. Suggested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15ASoC: Intel: sst: remove unused ‘ret_val’Vinod Koul
In sst_media_close(), 'ret_val' is initialized and assigned as return value of stream ops close but never used. So remove it. ound/soc/intel/atom/sst-mfld-platform-pcm.c: In function ‘sst_media_close’: sound/soc/intel/atom/sst-mfld-platform-pcm.c:360:6: warning: variable ‘ret_val’ set but not used [-Wunused-but-set-variable] int ret_val = 0, str_id; Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15ASoC: Intel: sst: remove unused 'msg_high'Vinod Koul
In process_fw_async_msg(), a variable 'msg_high' is initialized but not used. So remove it. sound/soc/intel/atom/sst/sst_ipc.c: In function ‘process_fw_async_msg’: sound/soc/intel/atom/sst/sst_ipc.c:263:24: warning: variable ‘msg_high’ set but not used [-Wunused-but-set-variable] union ipc_header_high msg_high; Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15ASoC: Intel: sst: remove unused 'ops'Vinod Koul
In sst_free_stream(), a variable 'ops' is initialized but not used. So remove it. sound/soc/intel/atom/sst/sst_stream.c: In function ‘sst_free_stream’: sound/soc/intel/atom/sst/sst_stream.c:397:24: warning: variable ‘ops’ set but not used [-Wunused-but-set-variable] struct intel_sst_ops *ops; Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-12Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown
2016-12-12Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown
2016-12-05ASoC: Intel: atom: save FW versionSebastien Guiriec
After the boot of the SST FW the firmware version is send back to the driver. This patch is saving the FW version inside the driver. Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-05ASoC: Intel: atom: Add sysfs entry in order to store FW versionSebastien Guiriec
This patch is adding a sysfs entry in order to be able to get access to SST FW version. Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30ASoC: intel: Fix crash at suspend/resume without card registrationTakashi Iwai
When ASoC Intel SST Medfield driver is probed but without codec / card assigned, it causes an Oops and freezes the kernel at suspend/resume, PM: Suspending system (freeze) Suspending console(s) (use no_console_suspend to debug) BUG: unable to handle kernel NULL pointer dereference at 0000000000000018 IP: [<ffffffffc09d9409>] sst_soc_prepare+0x19/0xa0 [snd_soc_sst_mfld_platform] Oops: 0000 [#1] PREEMPT SMP CPU: 0 PID: 1552 Comm: systemd-sleep Tainted: G W 4.9.0-rc6-1.g5f5c2ad-default #1 Call Trace: [<ffffffffb45318f9>] dpm_prepare+0x209/0x460 [<ffffffffb4531b61>] dpm_suspend_start+0x11/0x60 [<ffffffffb40d3cc2>] suspend_devices_and_enter+0xb2/0x710 [<ffffffffb40d462e>] pm_suspend+0x30e/0x390 [<ffffffffb40d2eba>] state_store+0x8a/0x90 [<ffffffffb43c670f>] kobj_attr_store+0xf/0x20 [<ffffffffb42b0d97>] sysfs_kf_write+0x37/0x40 [<ffffffffb42b02bc>] kernfs_fop_write+0x11c/0x1b0 [<ffffffffb422be68>] __vfs_write+0x28/0x140 [<ffffffffb43728a8>] ? apparmor_file_permission+0x18/0x20 [<ffffffffb433b2ab>] ? security_file_permission+0x3b/0xc0 [<ffffffffb422d095>] vfs_write+0xb5/0x1a0 [<ffffffffb422e3d6>] SyS_write+0x46/0xa0 [<ffffffffb4719fbb>] entry_SYSCALL_64_fastpath+0x1e/0xad Add proper NULL checks in the PM code of mdfld driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
2016-11-30ASoC: Intel: Add missing 10EC5672 ACPI ID matching for Cherry TrailTakashi Iwai
Add the missing ACPI ID 10EC5672 for Cherry Trail, which bounds with cht-bsw-rt5672 driver. This combination was found on Dell Wyse 3040. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29ASoC: Intel: atom: Make some messages to debug levelTakashi Iwai
Intel sst driver spews lots of kernel messages in INFO level; typically, it gives a kernel message at each time it allocates or frees a stream, or at each time when a stream is started or stopped. This will piles up quickly, and it's almost useless for normal users, so let's hide them to KERN_DEBUG level. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown
2016-10-28ASoC: Intel: atom: Add debug information related to FW versionSebastien Guiriec
This patch is adding debug information related to SST FW version. Signed-off-by: Sebastien Guiriec <sebastien.guiriec@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-10-24ASoC: Intel: Atom: add terminate entry for dmi_system_id tablesWei Yongjun
Make sure dmi_system_id tables are NULL terminated. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>