ASoC: Intel: add bytcr-wm5102 machine driver (resend)
Subsystems (3)
PATCH 1/1 ASoC: Intel: add bytcr-wm5102 machine driver (resend)
From: Paulo Sergio Travaglia <[email protected]>
based on bytcr-rt5640 machine driver and android kernel source released by Lenovo [1]
This currently targets Baytrail Lenovo Yoga 2 Tablets (tested with 1051F)
- use arizona specific constants
- set clock to codecs using snd_soc_codec_set_sysclk
- map codec member from snd_soc_dai and set pll using snd_soc_codec_set_pll
NOTES:
A) Currently only routes to Headphones are supported (Speaker seems to need power/activation)
B) Requires ARIZONA/WM5102 codec (with some changes):
- Voltage regulator
- SPI detection through ACPI
- platform data (ldoena 405, reset 246 & irq_gpio 342)
[1] - https://goo.gl/J1TR6n
sound/soc/intel/Kconfig +13 -0
@@ -151,6 +151,19 @@ config SND_SOC_INTEL_BYTCR_RT5640_MACH Say Y if you have such a device. If unsure select "N". +config SND_SOC_INTEL_BYTCR_WM5102_MACH + tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with WM5102 codec" + depends on X86 && SPI && ACPI + select SND_SOC_WM5102 + select SND_SST_ATOM_HIFI2_PLATFORM + select SND_SST_IPC_ACPI + select SND_SOC_INTEL_SST_MATCH if ACPI + help + This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR + platforms with WM5102 audio codec. + Say Y if you have such a device. + If unsure select "N". + config SND_SOC_INTEL_BYTCR_RT5651_MACH tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec" depends on X86 && I2C && ACPI
sound/soc/intel/atom/sst/sst_acpi.c +11 -0
@@ -244,6 +244,13 @@ static int is_byt_cr(struct device *dev, bool *bytcr) {int status =0 ; +/* Lenovo Yoga2 exception - acpi_ipc_irq_index is the 1st index, +but iosf_mbi_read (bios_status) returns 0 for bits 26:27 */ +if (dmi_match (DMI_SYS_VENDOR ,"LENOVO" ) &&dmi_match (DMI_PRODUCT_VERSION ,"1051F" )) { + *bytcr = true; +return status; + } +if (IS_ENABLED (CONFIG_IOSF_MBI )) {static const struct x86_cpu_id cpu_ids[] = { { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
@@ -492,6 +499,10 @@ static struct sst_acpi_mach sst_acpi_bytcr[] = { &byt_rvp_platform_data }, {"INTCCFFD" ,"bytcr_rt5640" ,"intel/fw_sst_0f28.bin" ,"bytcr_rt5640" ,NULL , &byt_rvp_platform_data }, + {"WM510204", "bytcr_wm5102", "intel/fw_sst_0f28.bin", "bytcr_wm5102", NULL, + &byt_rvp_platform_data }, + {"WM510205", "bytcr_wm5102", "intel/fw_sst_0f28.bin", "bytcr_wm5102", NULL, + &byt_rvp_platform_data }, {"10EC5651", "bytcr_rt5651", "intel/fw_sst_0f28.bin", "bytcr_rt5651", NULL, &byt_rvp_platform_data }, {"DLGS7212", "bytcht_da7213", "intel/fw_sst_0f28.bin", "bytcht_da7213", NULL,
sound/soc/intel/boards/Makefile +2 -0
@@ -6,6 +6,7 @@ snd-soc-sst-broadwell-objs := broadwell.o snd-soc-sst-bxt-da7219_max98357a-objs := bxt_da7219_max98357a.o snd-soc-sst-bxt-rt298-objs := bxt_rt298.o snd-soc-sst-bytcr-rt5640-objs := bytcr_rt5640.o +snd-soc-sst-bytcr-wm5102-objs := bytcr_wm5102.o snd-soc-sst-bytcr-rt5651-objs := bytcr_rt5651.o snd-soc-sst-cht-bsw-rt5672-objs := cht_bsw_rt5672.o snd-soc-sst-cht-bsw-rt5645-objs := cht_bsw_rt5645.o
@@ -24,6 +25,7 @@ obj-$(CONFIG_SND_SOC_INTEL_BXT_RT298_MACH) += snd-soc-sst-bxt-rt298.o obj-$(CONFIG_SND_SOC_INTEL_BROADWELL_MACH) += snd-soc-sst-broadwell.o obj-$(CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH) += snd-soc-sst-bdw-rt5677-mach.o obj-$(CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH) += snd-soc-sst-bytcr-rt5640.o +obj-$(CONFIG_SND_SOC_INTEL_BYTCR_WM5102_MACH) += snd-soc-sst-bytcr-wm5102.o obj-$(CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH) += snd-soc-sst-bytcr-rt5651.o obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH) += snd-soc-sst-cht-bsw-rt5672.o obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH) += snd-soc-sst-cht-bsw-rt5645.o
sound/soc/intel/boards/bytcr_wm5102.c new file +769 -0
769 lines not on this page · raw message
Signature · 1 line
2.7.4