- 27 6月, 2018 6 次提交
-
-
由 Hans de Goede 提交于
The initial bytcr_rt5651 machine driver commit mapped IN2 as the headset mic. In retrospect this is not correct as all known boards have the headset mic on IN3. This commit fixes the original DMIC mapping to correctly have the headset mic on IN3. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
The initial bytcr_rt5651 machine driver commit mapped IN2 as the headset mic. In retrospect this is not correct as all known boards have the headset mic on IN3. To workaround this special IN?_HS_IN3 mappings were added. This commit fixes the original IN1 mapping to correctly have the headset mic on IN3, moves all users of the IN1_HS_IN3 mapping over to the fixed IN1_MAP and drops the now no longer needed IN1_HS_IN3 mapping. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
BYT_RT5651_IN2_MAP was introduced in commit 39712db8 ("SoC: intel: byt: Introduce new custom IN2 map"), uses in commit 2fe30129 ("ASoC: intel: byt: Enable IN2 map quirk for a KIANO laptop"), only to be replaced by a new BYT_RT5651_IN1_IN2_MAP quirk in commit ea261bd0 ("ASoC: intel: byt: Introduce new map for dual mics") quickly afterwards, because the KIANO laptop has 2 internal mics on IN1 and IN2 and the headset mic is not in IN1 where the BYT_RT5651_IN2_MAP maps it, but on IN3. Now that the KIANO quirk entry uses BYT_RT5651_IN1_IN2_MAP, there are no users of BYT_RT5651_IN2_MAP left. This makes sense since the headset mic seems to always be connected to IN3, so BYT_RT5651_IN2_MAP is not useful. To deal with BYT_RT5651_IN2_MAP wrongly mapping the headset mic to IN1, BYT_RT5651_IN2_HS_IN3_MAP was added in commit f026e063 ("ASoC: Intel: bytcr_rt5651: Add new IN2_HS_IN3 input map and a quirk using it"). This was based on the assumption then some devices have the internal mic connected to IN2 only. Further testing has shown that this is wrong and the internal mic is always connected to IN1 and sometimes to both IN1 and IN2. TL;DR: Both BYT_RT5651_IN2_MAP and BYT_RT5651_IN2_HS_IN3_MAP are based on on wrong assumptions from the past and are no longer useful now, so they can both be removed. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Fix the quirk logging code not logging the IN1_IN2_MAP quirk. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Further testing on all 6 model x86 tablets with a rt5651 which I have access to for testing has shown that their single (mono) microphone is connected to both IN1 *and* IN2. The previous default mapping of IN2 was based on testing on the same 6 tablets, where the internal mic works fine with a mapping of IN2. But it works fine too with a mapping of IN1. This commit changes the default input mapping to to use IN1 instead of IN2, to match the mapping used for the other mono devices in the DMI quirk table. So that we need less different mappings. The same change is made to the Chuwi Vi8 Plus quirks, which is one of the 6 models tested. This is a preparation patch for simplifying the maps in a follow-up commit. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Almost all boards use the mclk and use the same jack-detect settings, add a BYT_RT5651_DEFAULT_QUIRKS define for this. This shaves of some lines and makes it easier to see which settings are unique to a certain model. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 31 5月, 2018 1 次提交
-
-
由 Hans de Goede 提交于
Many X86 devices using a BYT SoC + RT5651 codec are cheap devices with generic DMI strings, causing snd_soc_set_dmi_name() to fail to set a long_name, making it impossible for userspace to have a correct UCM profile which knowns which input is connected to the internal mic, which input is connected to the hsmic (for correct jack-based switching) and which inputs are unused. Our quirks already specify which inputs the internal and headset mic are connected to. This commit sets a long_name based on the quirks so that userspace can have UCM profiles doing the right thing based on the long_name. Note that if we ever encounter the need for a special UCM profile for some device we can add a quirk to set a specific long_name for the device, Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 03 5月, 2018 1 次提交
-
-
由 Colin Ian King 提交于
Currently, the check that ret_val is not -ENOENT is always true and the quirk bit BYT_RY5651_MCLK_EN is never being cleared because ret_val is always zero at this point from a previous assignment earlier on. I believe that ret_val should actually be assigned to the return from devm_clk_get() as this can return -ENOENT (from a deeper call to clk_get_sys) and that was the original intention to check this. Detected by CoverityScan, CID#1460228 ("Logically dead code") Fixes: 02c0a3b3 ("ASoC: Intel: bytcr_rt5651: add MCLK, quirks and cleanups") Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 4月, 2018 1 次提交
-
-
由 Vinod Koul 提交于
In snd_byt_rt5651_mc_probe which is not atomic context, we use GFP_ATOMIC flag with memory allocation, fix that by using GFP_KERNEL. Signed-off-by: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 3月, 2018 1 次提交
-
-
由 Kuninori Morimoto 提交于
commit aeec6cc0 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") is using codec->dev, but codec is replaced to component. Let's use component Fixes: aeec6cc0 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 07 3月, 2018 13 次提交
-
-
由 Hans de Goede 提交于
When the BYT_RT5651_MCLK_EN quirk is set, we disable the MCLK from byt_rt5651_init(), we need to select the RCCLK as sysclk before doing this to make sure that jack-detect works directly after boot. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Change the default quirk settings to enable jack-detect, analog mics. The old default input mapping of DMIC for non Bay Trail CR devices seems like a poor default as I'm not aware of any Intel SST + rt5651 using devices with a DMIC. All Cherry Trail devices using the bytcr_rt5651 machine driver seem to be modelled after BYT-CR devices, And the only non CR Bay Trail devices with a rt5651 codec I'm aware of are the Minnow boards for which we already have board specific quirks. So it seems better to me to use the BYT-CR defaults everywhere. This e.g. makes the Chuwi Hi8 Pro (CWI513) work ootb without needing a quirk. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Add a quirk setting up jack-detect and input routing for the VIOS LTH17 laptop. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Despite its name being prefixed with bytcr, before this commit the bytcr_rt5651 machine driver could not work with Bay Trail CR boards, as those only have SSP0 and it only supported SSP0-AIF1 setups. This commit adds support for this, autodetecting AIF1 vs AIF2 based on BIOS tables. While at it also add support for SSP2-AIF2 setups, as that requires only minimal extra code on top of the code adding SSP0-AIF1 / SSP0-AIF2 support. Note this code is all copy-pasted from bytcr_rt5640.c. I've looked into merging the 2 machine drivers into 1 to avoid copy-pasting, but there are enough subtile differences to make this hard *and* with all the quirks the machine driver already is full with if (variant-foo) then ... else ... constructs adding more of these is going to make the code unreadable. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Add a new IN2_HS_IN3 input map and add a quirk for the input mapping and jack-detect source for the Chuwi Vi8 Plus tablet, which uses this new map. Note the Chuwi Vi8 Plus lists an extra GPIO in its codecs ACPI resources which needs to be driven high to enable the external speaker amplifier, this is not supported yet and will be fixed in a future patch. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
All the mappings are named for where the internal mic is routed and in that sense the newly added in3_map really is the same as in1_map, what makes it different is that it maps the headset mic at IN3 rather then at IN2. Rename in3_map to in1_hs_in3_map to better reflect what it actually does. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Drop the snd_soc_dai_set_bclk_ratio() call, the rt5651 dai does not have a set_bclk_ratio() op, so it is a nop (and returns -EINVAL). Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
When platform_clock_control() first selects PLL1 as sysclk the PLL_CTRL registers have not been setup yet and we effectively have an invalid clock configuration until byt_rt5651_aif1_hw_params() gets called. Add a new byt_rt5651_prepare_and_enable_pll1() helper and use that from both platform_clock_control() and byt_rt5651_aif1_hw_params() to fix this. Tested-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Add support for setting the micbias OVCD limits device-properties through quirks. And set the limits for this to 2000uA with a scale-factor of 0.75 for the KIANO SlimNote 14.2 device, which is the only device on which jack-detection is currently enabled. Tested-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Only create the jack if we have a valid jack-detect source and properly check the snd_soc_component_set_jack() return value. Tested-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
Before this commit it was possible to set the DMIC_EN quirk in the machine driver, but it would never be passed to the codec driver so it was a nop. This commit adds code to actually pass the quirk to the codec driver. Since the DMIC_EN quirk was ignored before, this commit removes it from the default quirk settings, to avoid this causing an unexpected functional change. If we really want the DMIC_EN behavior anywhere it should be specifically enabled by follow up commits. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
This commit add support for a new BYT_RT5651_JDSRC quirk, sets this quirk for the KIANO SlimNote 14.2 laptop and uses the new "realtek, jack-detect-source" property to pass this info to the codec driver. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Hans de Goede 提交于
If we cannot find the codec ACPI-dev, then the snd-soc-core will not be able to find the codec either and snd_soc_register_card() will just keep exiting with -EPROBE_DEFER, filling the log with errors each time the probe gets retried. Instead simply log an error from the machine driver and exit with -ENODEV. Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 3月, 2018 1 次提交
-
-
由 Hans de Goede 提交于
Use the standard component set_jack callback instead of defining a codec private API for this. Tested-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 2月, 2018 1 次提交
-
-
由 Kuninori Morimoto 提交于
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 1月, 2018 2 次提交
-
-
由 Andy Shevchenko 提交于
Instead of home grown snd_soc_acpi_find_name_from_hid() use acpi_dev_get_first_match_name(). Tested-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
Remove hard-codec [16] array size, replace with clearer description and dependency on ACPI_ID_LEN No functionality change Suggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-By: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 1月, 2018 4 次提交
-
-
由 Pierre-Louis Bossart 提交于
Add the DAPM widgets and routes. Tested with MinnowMax Turbot + rt5651 eval board with Speaker (LineOut) -> LineIn loopback Thanks to Bard Liao @ Realtek for providing the 0dB settings "IN Capture Volume" = 23 "ADC Capture Volume" = 47 "OUT Playback Volume" = 31 "DAC1 Playback Volume" = 175 Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-By: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
Define DMI quirk for rt5651 eval board connected to MinnowBoard Turbot. The only difference with a MinnowBoard MAX is that the MCLK pin is enabled on the LSE connector Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: NKeqiao.Zhang <Keqiao.zhang@intel.com> Acked-By: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Keyon Jie 提交于
On Minnowboard Max with Realtek rt5651 eval board, the IN3P is connected to Headset Mic. Here add and select it for Minnowboard Max. Signed-off-by: NKeyon Jie <yang.jie@linux.intel.com> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-By: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
The current code doesn't enable the MCLK which reduces audio quality (PLL driven from BLCK), fix the quirk Tested-by: NCarlo Caione <carlo@caione.org> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-By: NVinod Koul <vinod.koul@intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 11月, 2017 2 次提交
-
-
由 Carlo Caione 提交于
This laptop has actually two different analog mics, no just one. Fix the quirk to reflect the correct configuration. Signed-off-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Carlo Caione 提交于
The RT5651 codec has 3 analog inputs. Some laptops have two different internal analog microphones on the external case. Add a new custom quirk mapping the two internal mics on IN1P / IN2P, leaving the headset mic on IN3P. Signed-off-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 26 10月, 2017 2 次提交
-
-
由 Carlo Caione 提交于
This cherry-trails laptop has the internal mic connected to the IN2 input pins. Enable the quirk to correctly map the routes. Signed-off-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Carlo Caione 提交于
Introduce an headset jack in the machine driver and register it to the codec driver. Signed-off-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 10月, 2017 2 次提交
-
-
由 Pierre-Louis Bossart 提交于
ACPI support is not specific to the Intel/SST driver. Move the enumeration and matching code which is not hardware-dependent to sound/soc and rename relevant sst_acpi_ structures and functions with snd_soc_acpi_ prefix soc-acpi.h is protected by a #ifndef __LINUX_SND_SOC_ACPI_H for consistency with all other SoC .h files: grep -L __LINUX include/sound/soc* | wc -l 0 grep __LINUX include/sound/soc* | wc -l 14 Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Carlo Caione 提交于
Introduce a new custom dapm routes map to quirk platforms with the internal mic connected to IN2P. Signed-off-by: NCarlo Caione <carlo@endlessm.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 18 10月, 2017 3 次提交
-
-
由 Pierre-Louis Bossart 提交于
The hard-coded compressed dailinks are not supported using publicly-available firmwares, which creates unnecessary user confusion [1]. Even if the firmware was available, the mainline code does not have the required .dynamic=1 and .dpcm_playback=1 fields so probably never worked as is, and last and they conflict with topology-defined streams. Remove them and move on. This can be re-enabled with SOF later in a more flexible manner. [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2017-August/124868.htmlSigned-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
For some reason the Atom/HiFi2 machine drivers use an id=1 instead of zero as done on all other platforms. This gets in the way of topology-based matching, realign for consistency. This should not have any functional impact on existing solutions with don't rely on topology. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
Remove duplicate code with a common helper in all Intel machine drivers. Suggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Suggested-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-