aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-02-19ASoC: intel: skl: Fix possible buffer overflow in debug outputsTakashi Iwai1-14/+14
The debugfs output of intel skl driver writes strings with multiple snprintf() calls with the fixed size. This was supposed to avoid the buffer overflow but actually it still would, because snprintf() returns the expected size to be output, not the actual output size. Fix it by replacing snprintf() calls with scnprintf(). Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config") Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200218111737.14193-3-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: intel: skl: Fix pin debug printsTakashi Iwai1-1/+3
skl_print_pins() loops over all given pins but it overwrites the text at the very same position while increasing the returned length. Fix this to show the all pin contents properly. Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config") Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20200218111737.14193-2-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-27ASoC: Intel: consistent HDMI codec probing codeGuennadi Liakhovetski5-35/+37
Multiple Intel ASoC machine drivers repeat the same pattern in their .late_probe() methods: they first check whether the common HDMI codec driver is used, if not, they proceed by linking the legacy HDMI driver to each HDMI port. While doing that they use some inconsistent code: 1. after the loop they check, whether the list contained at least one element and if not, they return an error. However, the earlier code to use the common HDMI driver uses the first element of the same list without checking. To fix this we move the check to the top of the function. 2. some of those .late_probe() implementations execute code, only needed for the common HDMI driver, before checking, whether the driver is used. Move the code to after the check. 3. Some of those functions also perform a redundant initialisation of the "err" variable. This patch fixes those issues. 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/20200124213625.30186-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-27ASoC: intel: soc-acpi-intel-icl-match: fix rt715 ADRBard Liao1-1/+1
Fix the part id of rt715 (typo with zero in the wrong place) Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200124213625.30186-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-17ASoC: Intel: cht_bsw_rt5645: Remove unnecessary string buffers and snprintf callsDamian van Soelen1-22/+4
The snprintf calls filling cht_rt5645_cpu_dai_name / cht_rt5645_codec_aif_name always fill them with the same string ("ssp0-port" resp "rt5645-aif2") so instead of keeping these buffers around and making cpus->dai_name / codecs->dai_name point to this, simply update the *->dai_name pointers to directly point to a string constant containing the desired string. Signed-off-by: Damian van Soelen <dj.vsoelen@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200115164619.101705-5-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-17ASoC: Intel: bytcr_rt5651: Remove unnecessary string buffers and snprintf callsJordy Ubink1-20/+4
The snprintf calls filling byt_rt56*_codec_aif_name/byt_rt56*_cpu_dai_name always fill them with the same string ("rt56*-aif2" resp. ssp0-port"). So instead of keeping these buffers around and making codecs->dai_name / cpus->dai_name point to them, simply update the *->dai_name pointers to directly point to a string constant containing the desired string. Signed-off-by: Jordy Ubink <jordyubink@hotmail.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200115164619.101705-4-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-17ASoC: Intel: bytcr_rt5640: Remove unnecessary string buffers and snprintf callsNariman Etemadi1-22/+4
The snprintf calls filling byt_rt56*_codec_aif_name/byt_rt56*_cpu_dai_name always fill them with the same string ("rt56*-aif2" resp. ssp0-port"). So instead of keeping these buffers around and making codecs->dai_name / cpus->dai_name point to them, simply update the *->dai_name pointers to directly point to a string constant containing the desired string. Signed-off-by: Nariman Etemadi <narimantos@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200115164619.101705-3-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-17ASoC: Intel: bytcr_rt5640: Remove code duplication in byt_rt5640_codec_fixupErik Bussing1-45/+23
The 16 and 24 bit paths in byt_rt5640_codec_fixup are mostly identical, introduce a local bits variable to address the only difference and move the common bits out of the if ... else ... . Signed-off-by: Erik Bussing <eabbussing@outlook.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200115164619.101705-2-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: bytcr_rt5651: switch to using devm_fwnode_gpiod_get()Dmitry Torokhov1-8/+10
devm_fwnode_get_index_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20200103011754.GA260926@dtor-ws Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: bytcr_rt5651: remove unused variablePierre-Louis Bossart1-8/+0
Fix GCC warning with W=1 sound/soc/intel//boards/bytcr_rt5651.c:659:40: warning: ‘byt_rt5651_dai_params’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: bytcr_rt5640: remove unused variablePierre-Louis Bossart1-8/+0
Fix GCC warning with W=1 sound/soc/intel//boards/bytcr_rt5640.c:936:40: warning: ‘byt_rt5640_dai_params’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: bytcht_es8316: removed unused variablePierre-Louis Bossart1-8/+0
fix GCC warning with W=1 sound/soc/intel//boards/bytcht_es8316.c:237:40: warning: ‘byt_cht_es8316_dai_params’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: skl_rt286: rename shadowed variablePierre-Louis Bossart1-5/+5
Fix cppcheck warning: [sound/soc/intel/boards/skl_rt286.c:171] -> [sound/soc/intel/boards/skl_rt286.c:214]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/skl_rt286.c:171] -> [sound/soc/intel/boards/skl_rt286.c:250]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: skl_nau88l25_ssm4567: rename shadowed variablePierre-Louis Bossart1-5/+5
Fix cppcheck warning [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:277] -> [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:320]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:277] -> [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:337]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: skl_nau88l25_max98357a: rename shadowed variablePierre-Louis Bossart1-5/+5
Fix cppcheck warning: [sound/soc/intel/boards/skl_nau88l25_max98357a.c:257] -> [sound/soc/intel/boards/skl_nau88l25_max98357a.c:142]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/skl_nau88l25_max98357a.c:257] -> [sound/soc/intel/boards/skl_nau88l25_max98357a.c:318]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASOC: Intel: kbl_rt5663_rt5514_max98927: remove useless initializationPierre-Louis Bossart1-1/+1
Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c:764]: (style) Variable 'ret' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: kbl_rt5663_rt5514_max98927: rename shadowed variablePierre-Louis Bossart1-4/+4
Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c:293] -> [sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c:336]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: kbl_rt5663_max98927: rename shadowed variablePierre-Louis Bossart1-5/+5
Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5663_max98927.c:358] -> [sound/soc/intel/boards/kbl_rt5663_max98927.c:401]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/kbl_rt5663_max98927.c:358] -> [sound/soc/intel/boards/kbl_rt5663_max98927.c:457]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: kbl_rt5660: rename shadowed variablePierre-Louis Bossart1-2/+2
Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5660.c:282] -> [sound/soc/intel/boards/kbl_rt5660.c:141]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: kbl_da7219_max98927: remove unnecessary initializationPierre-Louis Bossart1-2/+2
Fix cppcheck warning [sound/soc/intel/boards/kbl_da7219_max98927.c:179]: (style) Variable 'ret' is assigned a value that is never used. [sound/soc/intel/boards/kbl_da7219_max98927.c:1098]: (style) Variable 'i' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: kbl_da7219_max98927: rename shadowed variablePierre-Louis Bossart1-6/+6
Fix cppcheck warning: [sound/soc/intel/boards/kbl_da7219_max98927.c:432] -> [sound/soc/intel/boards/kbl_da7219_max98927.c:282]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/kbl_da7219_max98927.c:432] -> [sound/soc/intel/boards/kbl_da7219_max98927.c:494]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: kbl_da7219_max98927: test return value on route addPierre-Louis Bossart1-0/+3
Fix cppcheck warning: [sound/soc/intel/boards/kbl_da7219_max98927.c:340] -> [sound/soc/intel/boards/kbl_da7219_max98927.c:348]: (style) Variable 'ret' is reassigned a value before the old one has been used. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: kbl_da7219_max98357a: rename shadowed variablePierre-Louis Bossart1-5/+5
Fix cppcheck warning: [sound/soc/intel/boards/kbl_da7219_max98357a.c:257] -> [sound/soc/intel/boards/kbl_da7219_max98357a.c:144]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/kbl_da7219_max98357a.c:257] -> [sound/soc/intel/boards/kbl_da7219_max98357a.c:308]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: glk_rt5682_max98357a: removed unused variablesPierre-Louis Bossart1-10/+0
Fix GCC warning with W=1 sound/soc/intel/boards/glk_rt5682_max98357a.c:256:48: warning: ‘constraints_channels’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: glk_rt5682_max98357a: rename shadowed variablePierre-Louis Bossart1-4/+4
[sound/soc/intel/boards/glk_rt5682_max98357a.c:252] -> [sound/soc/intel/boards/glk_rt5682_max98357a.c:121]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/glk_rt5682_max98357a.c:252] -> [sound/soc/intel/boards/glk_rt5682_max98357a.c:275]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: bxt_rt298: rename shadowed variablePierre-Louis Bossart1-4/+4
Fix cppcheck warning: [sound/soc/intel/boards/bxt_rt298.c:291] -> [sound/soc/intel/boards/bxt_rt298.c:209]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/bxt_rt298.c:291] -> [sound/soc/intel/boards/bxt_rt298.c:258]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-14ASoC: Intel: bxt_da7219_max98357a: rename shadowed variablePierre-Louis Bossart1-5/+5
Fix cppcheck warning: [sound/soc/intel/boards/bxt_da7219_max98357a.c:265] -> [sound/soc/intel/boards/bxt_da7219_max98357a.c:164]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/bxt_da7219_max98357a.c:265] -> [sound/soc/intel/boards/bxt_da7219_max98357a.c:316]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200113210428.27457-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13ASoC: Intel: common: add match tables for TGL w/ SoundWirePierre-Louis Bossart1-2/+49
RT711 is in SoundWire mode on link0. RT1308 is either on SSP2 or on SoundWire link1 (depending on hardware reworks). Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200110222530.30303-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWireRander Wang3-0/+99
The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link1. For now we only have definitions for CML. CNL and CFL are just placeholders. Signed-off-by: Rander Wang <rander.wang@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200110222530.30303-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13ASoC: Intel: common: add match tables for ICL w/ SoundWireBard Liao1-0/+98
The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200110222530.30303-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13ASoC: Intel: bdw-rt5650: change cpu_dai and platform components for SOFPierre-Louis Bossart1-1/+9
The legacy driver uses dummy cpu_dai and platform, SOF requires actual values to bind. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200110235751.3404-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13ASoC: Intel: broadwell: change cpu_dai and platform components for SOFPan Xiuli1-1/+9
The legacy driver uses dummy cpu_dai and platform, SOF requires actual values to bind. 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/20200110235751.3404-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13ASoC: Intel: bdw-rt5677: change cpu_dai and platform components for SOFPierre-Louis Bossart1-1/+9
The legacy driver uses dummy cpu_dai and platform, SOF requires actual values to bind. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200110235751.3404-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-13ASoC: Intel: bdw-rt5677: fix Kconfig dependenciesPierre-Louis Bossart1-0/+3
The existing machine driver depends on SPI Master capabilities, but the Kconfig does not model this dependency and the SPI controller needs to be selected as well. Without this patch the machine driver probe would fail with the spi-RT5677AA:00 component never registered by the ACPI/LPSS subsystem. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200110235751.3404-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-10Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.6Mark Brown2-2/+2
2020-01-06ASoC: Intel: sof_rt5682: Ignore the speaker amp when there isn't one.Sam McNally1-1/+8
Some members of the Google_Hatch family include a rt5682 jack codec, but no speaker amplifier. This uses the same driver (sof_rt5682) as a combination of rt5682 jack codec and max98357a speaker amplifier. Within the sof_rt5682 driver, these cases are not currently distinguishable, relying on a DMI quirk to decide the configuration. This causes an incorrect configuration when only the rt5682 is present on a Google_Hatch device. For CML, the jack codec is used as the primary key when matching, with a possible speaker amplifier described in quirk_data. The two cases of interest are the second and third 10EC5682 entries in snd_soc_acpi_intel_cml_machines[]. The second entry matches the combination of rt5682 and max98357a, resulting in the quirk_data field in the snd_soc_acpi_mach being non-null, pointing at max98357a_spk_codecs, the snd_soc_acpi_codecs for the matched speaker amplifier. The third entry matches just the rt5682, resulting in a null quirk_data. The sof_rt5682 driver's DMI data matching identifies that a speaker amplifier is present for all Google_Hatch family devices. Detect cases where there is no speaker amplifier by checking for a null quirk_data in the snd_soc_acpi_mach and remove the speaker amplifier bit in that case. Signed-off-by: Sam McNally <sammc@chromium.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200103124921.v3.1.Ib87c4a7fbb3fc818ea12198e291b87dc2d5bc8c2@changeid Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-06ASoC: Intel: bytcht_es8316: Fix Irbis NB41 netbook quirkHans de Goede1-1/+2
When a quirk for the Irbis NB41 netbook was added, to override the defaults for this device, I forgot to add/keep the BYT_CHT_ES8316_SSP0 part of the defaults, completely breaking audio on this netbook. This commit adds the BYT_CHT_ES8316_SSP0 flag to the Irbis NB41 netbook quirk, making audio work again. Cc: stable@vger.kernel.org Cc: russianneuromancer@ya.ru Fixes: aa2ba991c420 ("ASoC: Intel: bytcht_es8316: Add quirk for Irbis NB41 netbook") Reported-and-tested-by: russianneuromancer@ya.ru 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/20200106113903.279394-1-hdegoede@redhat.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-03ASoC: Intel: boards: hda_dsp_common: use NULL pointer assignment, not 0Pierre-Louis Bossart1-1/+1
Fix Sparse warning: hda_dsp_common.c:66:37: warning: Using plain integer as NULL pointer Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200102195952.9465-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-03ASoC: Intel: boards: Fix compile-testing RT1011/RT5682Arnd Bergmann1-1/+0
On non-x86, the new driver results in a build failure: sound/soc/intel/boards/cml_rt1011_rt5682.c:14:10: fatal error: asm/cpu_device_id.h: No such file or directory The asm/cpu_device_id.h header is not actually needed here, so don't include it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200102135322.1841053-1-arnd@arndb.de Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-25ASoC: Intel: kbl_da7219_max98357a: remove unused variable 'constraints_16000' and 'ch_mono'YueHaibing1-13/+0
sound/soc/intel/boards/kbl_da7219_max98357a.c:343:48: warning: constraints_16000 defined but not used [-Wunused-const-variable=] sound/soc/intel/boards/kbl_da7219_max98357a.c:348:27: warning: ch_mono defined but not used [-Wunused-const-variable=] They are never used, so can be removed. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20191224140237.36732-1-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-18ASoC: intel: Add Broadwell rt5650 machine driverBen Zhang4-0/+340
Add machine driver for Broadwell + rt5650. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Mac Chiang <mac.chiang@intel.com> Signed-off-by: Jon Flatley <jflat@chromium.org> Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191218143937.122665-1-cujomalainey@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-18ASoC: Intel: boards: fix incorrect HDMI Kconfig dependencyKai Vehmanen1-5/+5
Fix typo in Kconfig dependencies. The correct dependency for HDMI is SND_SOC_SOF_HDA_AUDIO_CODEC. Reported-by: Yong Zhi <yong.zhi@intel.com> Fixes: e3d8f8ae5b1e ("ASoC: Intel: boards: make common HDMI driver the default for SOF") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191218002616.7652-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-18ASoC: Intel: Add machine driver for da7219_max98373Yong Zhi4-0/+399
This patch adds sof_da7219_max98373 machine driver. Tested on JasperLake platform with SOF only. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Vani Ganji <vani.ganji@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191218002616.7652-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-18ASoC: Intel: cml_rt1011_rt5682: fix codec_conf by removing legacy stylePierre-Louis Bossart1-4/+4
Now that the legacy style is removed, we have to use the new macros for the codec configuration. This change was missed in the initial series. Reported-by: Randy Dunlap <rdunlap@infradead.org> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Fixes: ee8f537fd8b71c ("ASoC: soc-core: remove legacy style of codec_conf") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20191217165649.12091-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-17ASoC: intel: skylake: Remove superfluous bus opsTakashi Iwai1-6/+1
The bus_core_ops values set in skl driver are same as the default values, so we can drop it and pass NULL to snd_hdac_ext_bus_init() instead. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20191212191747.19995-1-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16ASoC: intel: skl_nau88l25_ssm4567: use snd_soc_dai_link_component for codec_confKuninori Morimoto1-2/+2
We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87eex959jm.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16ASoC: intel: kbl_rt5663_rt5514_max98927: use snd_soc_dai_link_component for codec_confKuninori Morimoto1-2/+2
We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87fthp59jr.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16ASoC: intel: kbl_rt5663_max98927: use snd_soc_dai_link_component for codec_confKuninori Morimoto1-2/+2
We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87h82559jw.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16ASoC: intel: kbl_da7219_max98927: use snd_soc_dai_link_component for codec_confKuninori Morimoto1-4/+4
We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87imml59k2.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-11ASoC: intel: skylake: Use managed buffer allocationTakashi Iwai1-20/+6
Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. The pcm_construct ops contains only the superfluous call of snd_pcm_lib_preallocate_free_for_all(), so dropped, too. Cc: Cezary Rojewski <cezary.rojewski@intel.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com> Cc: Jie Yang <yang.jie@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20191210142614.19405-24-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>