From: Mark Brown Date: Thu, 18 Jan 2018 11:56:11 +0000 (+0000) Subject: Merge remote-tracking branches 'asoc/topic/rl6231', 'asoc/topic/rt5514', 'asoc/topic... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bb4f1a6c66125d3b1fae3ed704a4aa7ba56f7104;p=linux.git Merge remote-tracking branches 'asoc/topic/rl6231', 'asoc/topic/rt5514', 'asoc/topic/rt5645' and 'asoc/topic/samsung' into asoc-next --- bb4f1a6c66125d3b1fae3ed704a4aa7ba56f7104 diff --cc sound/soc/codecs/rt5514-spi.c index 64bf26cec20d5,2df91db765acd,b90d6d5d7ff81,2df91db765acd,2df91db765acd..2144edca97b09 --- a/sound/soc/codecs/rt5514-spi.c +++ b/sound/soc/codecs/rt5514-spi.c @@@@@@ -461,43 -459,42 -451,6 -459,42 -459,42 +462,43 @@@@@@ static int rt5514_spi_probe(struct spi_ return 0; } + static int __maybe_unused rt5514_suspend(struct device *dev) + { + int irq = to_spi_device(dev)->irq; + + if (device_may_wakeup(dev)) + enable_irq_wake(irq); + + return 0; + } + + static int __maybe_unused rt5514_resume(struct device *dev) + { + struct snd_soc_platform *platform = snd_soc_lookup_platform(dev); + struct rt5514_dsp *rt5514_dsp = + snd_soc_platform_get_drvdata(platform); + int irq = to_spi_device(dev)->irq; + u8 buf[8]; + + if (device_may_wakeup(dev)) + disable_irq_wake(irq); + - -- if (rt5514_dsp->substream) { - -- rt5514_spi_burst_read(RT5514_IRQ_CTRL, (u8 *)&buf, sizeof(buf)); - -- if (buf[0] & RT5514_IRQ_STATUS_BIT) - -- rt5514_schedule_copy(rt5514_dsp); ++++ if (rt5514_dsp) { ++++ if (rt5514_dsp->substream) { ++++ rt5514_spi_burst_read(RT5514_IRQ_CTRL, (u8 *)&buf, ++++ sizeof(buf)); ++++ if (buf[0] & RT5514_IRQ_STATUS_BIT) ++++ rt5514_schedule_copy(rt5514_dsp); ++++ } + } + + return 0; + } + + static const struct dev_pm_ops rt5514_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(rt5514_suspend, rt5514_resume) + }; + static const struct of_device_id rt5514_of_match[] = { { .compatible = "realtek,rt5514", }, {}, diff --cc sound/soc/codecs/rt5645.c index edc152c8a1fe7,f020d2d1eef4a,6a7778a44853a,5292fca2f54f4,f020d2d1eef4a..8f140c8b93acd --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@@@@@ -3600,33 -3600,33 -3589,33 -3691,8 -3600,33 +3691,8 @@@@@@ static const struct dmi_system_id dmi_p .matches = { DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), }, +++ + .driver_data = (void *)&intel_braswell_platform_data, }, --- - { } --- -}; --- - --- -static const struct rt5645_platform_data buddy_platform_data = { --- - .dmic1_data_pin = RT5645_DMIC_DATA_GPIO5, --- - .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, --- - .jd_mode = 3, --- - .level_trigger_irq = true, --- -}; --- - -- -static const struct dmi_system_id dmi_platform_intel_broadwell[] = { - static struct dmi_system_id dmi_platform_intel_broadwell[] = { --- - { --- - .ident = "Chrome Buddy", --- - .matches = { --- - DMI_MATCH(DMI_PRODUCT_NAME, "Buddy"), --- - }, --- - }, --- - { } --- -}; --- - --- -static const struct rt5645_platform_data gpd_win_platform_data = { --- - .jd_mode = 3, --- - .inv_jd1_1 = true, --- -}; --- - --- -static const struct dmi_system_id dmi_platform_gpd_win[] = { { /* * Match for the GPDwin which unfortunately uses somewhat @@@@@@ -3644,33 -3644,33 -3633,33 -3710,16 -3644,33 +3710,16 @@@@@@ DMI_MATCH(DMI_BOARD_SERIAL, "Default string"), DMI_MATCH(DMI_PRODUCT_NAME, "Default string"), }, +++ + .driver_data = (void *)&gpd_win_platform_data, }, --- - {} --- -}; --- - -- -static const struct rt5645_platform_data general_platform_data2 = { - static struct rt5645_platform_data general_platform_data2 = { --- - .dmic1_data_pin = RT5645_DMIC_DATA_IN2N, --- - .dmic2_data_pin = RT5645_DMIC2_DISABLE, --- - .jd_mode = 3, --- - .inv_jd1_1 = true, --- -}; --- - -- -static const struct dmi_system_id dmi_platform_asus_t100ha[] = { - static struct dmi_system_id dmi_platform_asus_t100ha[] = { { .ident = "ASUS T100HAN", .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), DMI_MATCH(DMI_PRODUCT_NAME, "T100HAN"), }, +++ + .driver_data = (void *)&asus_t100ha_platform_data, }, --- - { } --- -}; --- - -- -static const struct rt5645_platform_data minix_z83_4_platform_data = { - static struct rt5645_platform_data minix_z83_4_platform_data = { --- - .jd_mode = 3, --- -}; --- - -- -static const struct dmi_system_id dmi_platform_minix_z83_4[] = { - static struct dmi_system_id dmi_platform_minix_z83_4[] = { { .ident = "MINIX Z83-4", .matches = { @@@@@@ -3820,11 -3820,9 -3803,6 -3877,11 -3820,9 +3877,11 @@@@@@ static int rt5645_i2c_probe(struct i2c_ regmap_write(rt5645->regmap, RT5645_RESET, 0); + regmap_read(regmap, RT5645_VENDOR_ID, &val); + rt5645->v_id = val & 0xff; + ++ + regmap_write(rt5645->regmap, RT5645_AD_DA_MIXER, 0x8080); ++ + ret = regmap_register_patch(rt5645->regmap, init_list, ARRAY_SIZE(init_list)); if (ret != 0) diff --cc sound/soc/intel/boards/cht_bsw_rt5645.c index 976ea6bf9539c,18d129caa974f,5bcde01d15e68,f898ee140cdcc,18d129caa974f..31641aab62cd1 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@@@@@ -566,8 -566,8 -589,8 -573,8 -566,8 +573,8 @@@@@@ static int snd_cht_mc_probe(struct plat } /* fixup codec name based on HID */ - -- i2c_name = snd_soc_acpi_find_name_from_hid(mach->id); - i2c_name = sst_acpi_find_name_from_hid(mach->id); - if (i2c_name != NULL) { ++++ i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1); + if (i2c_name) { snprintf(cht_rt5645_codec_name, sizeof(cht_rt5645_codec_name), "%s%s", "i2c-", i2c_name); cht_dailink[dai_index].codec_name = cht_rt5645_codec_name;