mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
ASoC: Merge up fixes
Merge the fixes branch up so we can apply further AMD work.
This commit is contained in:
@@ -416,6 +416,7 @@ TripleX Chung <xxx.phy@gmail.com> <triplex@zh-kernel.org>
|
||||
TripleX Chung <xxx.phy@gmail.com> <zhongyu@18mail.cn>
|
||||
Tsuneo Yoshioka <Tsuneo.Yoshioka@f-secure.com>
|
||||
Tycho Andersen <tycho@tycho.pizza> <tycho@tycho.ws>
|
||||
Tzung-Bi Shih <tzungbi@kernel.org> <tzungbi@google.com>
|
||||
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
|
||||
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
||||
Uwe Kleine-König <ukleinek@strlen.de>
|
||||
|
||||
@@ -8,7 +8,7 @@ title: Audio codec controlled by ChromeOS EC
|
||||
|
||||
maintainers:
|
||||
- Cheng-Yi Chiang <cychiang@chromium.org>
|
||||
- Tzung-Bi Shih <tzungbi@google.com>
|
||||
- Tzung-Bi Shih <tzungbi@kernel.org>
|
||||
|
||||
description: |
|
||||
Google's ChromeOS EC codec is a digital mic codec provided by the
|
||||
|
||||
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Realtek rt1015p codec devicetree bindings
|
||||
|
||||
maintainers:
|
||||
- Tzung-Bi Shih <tzungbi@google.com>
|
||||
- Tzung-Bi Shih <tzungbi@kernel.org>
|
||||
|
||||
description: |
|
||||
Rt1015p is a rt1015 variant which does not support I2C and
|
||||
|
||||
+1
-1
@@ -4911,7 +4911,7 @@ F: drivers/platform/chrome/
|
||||
|
||||
CHROMEOS EC CODEC DRIVER
|
||||
M: Cheng-Yi Chiang <cychiang@chromium.org>
|
||||
M: Tzung-Bi Shih <tzungbi@google.com>
|
||||
M: Tzung-Bi Shih <tzungbi@kernel.org>
|
||||
R: Guenter Roeck <groeck@chromium.org>
|
||||
L: chrome-platform@lists.linux.dev
|
||||
S: Maintained
|
||||
|
||||
@@ -84,8 +84,8 @@ enum sof_ipc_dai_type {
|
||||
SOF_DAI_AMD_BT, /**< AMD ACP BT*/
|
||||
SOF_DAI_AMD_SP, /**< AMD ACP SP */
|
||||
SOF_DAI_AMD_DMIC, /**< AMD ACP DMIC */
|
||||
SOF_DAI_AMD_HS, /**< Amd HS */
|
||||
SOF_DAI_MEDIATEK_AFE, /**< Mediatek AFE */
|
||||
SOF_DAI_AMD_HS, /**< Amd HS */
|
||||
};
|
||||
|
||||
/* general purpose DAI configuration */
|
||||
|
||||
@@ -36,6 +36,10 @@ enum sof_ipc_ext_data {
|
||||
SOF_IPC_EXT_USER_ABI_INFO = 4,
|
||||
};
|
||||
|
||||
/* Build u32 number in format MMmmmppp */
|
||||
#define SOF_FW_VER(MAJOR, MINOR, PATCH) ((uint32_t)( \
|
||||
((MAJOR) << 24) | ((MINOR) << 12) | (PATCH)))
|
||||
|
||||
/* FW version - SOF_IPC_GLB_VERSION */
|
||||
struct sof_ipc_fw_version {
|
||||
struct sof_ipc_hdr hdr;
|
||||
|
||||
@@ -320,6 +320,11 @@ static const struct config_entry config_table[] = {
|
||||
{}
|
||||
}
|
||||
},
|
||||
{
|
||||
.flags = FLAG_SOF,
|
||||
.device = 0x34c8,
|
||||
.codec_hid = &essx_83x6,
|
||||
},
|
||||
{
|
||||
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
|
||||
.device = 0x34c8,
|
||||
|
||||
@@ -206,6 +206,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
|
||||
}
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
|
||||
0, 0xA0, 96, adc_att_tlv),
|
||||
SOC_DOUBLE_R_SX_TLV("PGA Volume",
|
||||
CS42L51_ALC_PGA_CTL, CS42L51_ALC_PGB_CTL,
|
||||
0, 0x19, 30, pga_tlv),
|
||||
0, 0x1A, 30, pga_tlv),
|
||||
SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),
|
||||
SOC_SINGLE("Auto-Mute Switch", CS42L51_DAC_CTL, 2, 1, 0),
|
||||
SOC_SINGLE("Soft Ramp Switch", CS42L51_DAC_CTL, 1, 1, 0),
|
||||
|
||||
@@ -14,7 +14,7 @@ enum {
|
||||
HDAC_HDMI_1_DAI_ID,
|
||||
HDAC_HDMI_2_DAI_ID,
|
||||
HDAC_HDMI_3_DAI_ID,
|
||||
HDAC_LAST_DAI_ID = HDAC_HDMI_3_DAI_ID,
|
||||
HDAC_DAI_ID_NUM
|
||||
};
|
||||
|
||||
struct hdac_hda_pcm {
|
||||
@@ -24,7 +24,7 @@ struct hdac_hda_pcm {
|
||||
|
||||
struct hdac_hda_priv {
|
||||
struct hda_codec *codec;
|
||||
struct hdac_hda_pcm pcm[HDAC_LAST_DAI_ID];
|
||||
struct hdac_hda_pcm pcm[HDAC_DAI_ID_NUM];
|
||||
bool need_display_power;
|
||||
};
|
||||
|
||||
|
||||
@@ -549,6 +549,10 @@ static int max98373_i2c_probe(struct i2c_client *i2c)
|
||||
max98373->cache = devm_kcalloc(&i2c->dev, max98373->cache_num,
|
||||
sizeof(*max98373->cache),
|
||||
GFP_KERNEL);
|
||||
if (!max98373->cache) {
|
||||
ret = -ENOMEM;
|
||||
return ret;
|
||||
}
|
||||
|
||||
for (i = 0; i < max98373->cache_num; i++)
|
||||
max98373->cache[i].reg = max98373_i2c_cache_reg[i];
|
||||
|
||||
@@ -298,13 +298,14 @@ static int rt5514_spi_pcm_new(struct snd_soc_component *component,
|
||||
}
|
||||
|
||||
static const struct snd_soc_component_driver rt5514_spi_component = {
|
||||
.name = DRV_NAME,
|
||||
.probe = rt5514_spi_pcm_probe,
|
||||
.open = rt5514_spi_pcm_open,
|
||||
.hw_params = rt5514_spi_hw_params,
|
||||
.hw_free = rt5514_spi_hw_free,
|
||||
.pointer = rt5514_spi_pcm_pointer,
|
||||
.pcm_construct = rt5514_spi_pcm_new,
|
||||
.name = DRV_NAME,
|
||||
.probe = rt5514_spi_pcm_probe,
|
||||
.open = rt5514_spi_pcm_open,
|
||||
.hw_params = rt5514_spi_hw_params,
|
||||
.hw_free = rt5514_spi_hw_free,
|
||||
.pointer = rt5514_spi_pcm_pointer,
|
||||
.pcm_construct = rt5514_spi_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -396,15 +396,16 @@ static int rt5677_spi_pcm_probe(struct snd_soc_component *component)
|
||||
}
|
||||
|
||||
static const struct snd_soc_component_driver rt5677_spi_dai_component = {
|
||||
.name = DRV_NAME,
|
||||
.probe = rt5677_spi_pcm_probe,
|
||||
.open = rt5677_spi_pcm_open,
|
||||
.close = rt5677_spi_pcm_close,
|
||||
.hw_params = rt5677_spi_hw_params,
|
||||
.hw_free = rt5677_spi_hw_free,
|
||||
.prepare = rt5677_spi_prepare,
|
||||
.pointer = rt5677_spi_pcm_pointer,
|
||||
.pcm_construct = rt5677_spi_pcm_new,
|
||||
.name = DRV_NAME,
|
||||
.probe = rt5677_spi_pcm_probe,
|
||||
.open = rt5677_spi_pcm_open,
|
||||
.close = rt5677_spi_pcm_close,
|
||||
.hw_params = rt5677_spi_hw_params,
|
||||
.hw_free = rt5677_spi_hw_free,
|
||||
.prepare = rt5677_spi_prepare,
|
||||
.pointer = rt5677_spi_pcm_pointer,
|
||||
.pcm_construct = rt5677_spi_pcm_new,
|
||||
.legacy_dai_naming = 1,
|
||||
};
|
||||
|
||||
/* Select a suitable transfer command for the next transfer to ensure
|
||||
|
||||
@@ -230,7 +230,7 @@ static int rt711_sdca_read_prop(struct sdw_slave *slave)
|
||||
}
|
||||
|
||||
/* set the timeout values */
|
||||
prop->clk_stop_timeout = 20;
|
||||
prop->clk_stop_timeout = 700;
|
||||
|
||||
/* wake-up event */
|
||||
prop->wake_capable = 1;
|
||||
|
||||
@@ -1794,6 +1794,7 @@ static void sgtl5000_i2c_remove(struct i2c_client *client)
|
||||
{
|
||||
struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);
|
||||
|
||||
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_CLK_CTRL, SGTL5000_CHIP_CLK_CTRL_DEFAULT);
|
||||
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_DIG_POWER, SGTL5000_DIG_POWER_DEFAULT);
|
||||
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, SGTL5000_ANA_POWER_DEFAULT);
|
||||
|
||||
|
||||
@@ -438,20 +438,13 @@ static int tas2764_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
if (tx_mask == 0 || rx_mask != 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (slots == 1) {
|
||||
if (tx_mask != 1)
|
||||
return -EINVAL;
|
||||
left_slot = 0;
|
||||
right_slot = 0;
|
||||
left_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << left_slot);
|
||||
if (tx_mask == 0) {
|
||||
right_slot = left_slot;
|
||||
} else {
|
||||
left_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << left_slot);
|
||||
if (tx_mask == 0) {
|
||||
right_slot = left_slot;
|
||||
} else {
|
||||
right_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << right_slot);
|
||||
}
|
||||
right_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << right_slot);
|
||||
}
|
||||
|
||||
if (tx_mask != 0 || left_slot >= slots || right_slot >= slots)
|
||||
|
||||
@@ -395,21 +395,13 @@ static int tas2770_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
if (tx_mask == 0 || rx_mask != 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (slots == 1) {
|
||||
if (tx_mask != 1)
|
||||
return -EINVAL;
|
||||
|
||||
left_slot = 0;
|
||||
right_slot = 0;
|
||||
left_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << left_slot);
|
||||
if (tx_mask == 0) {
|
||||
right_slot = left_slot;
|
||||
} else {
|
||||
left_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << left_slot);
|
||||
if (tx_mask == 0) {
|
||||
right_slot = left_slot;
|
||||
} else {
|
||||
right_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << right_slot);
|
||||
}
|
||||
right_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << right_slot);
|
||||
}
|
||||
|
||||
if (tx_mask != 0 || left_slot >= slots || right_slot >= slots)
|
||||
|
||||
@@ -380,20 +380,13 @@ static int tas2780_set_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
if (tx_mask == 0 || rx_mask != 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (slots == 1) {
|
||||
if (tx_mask != 1)
|
||||
return -EINVAL;
|
||||
left_slot = 0;
|
||||
right_slot = 0;
|
||||
left_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << left_slot);
|
||||
if (tx_mask == 0) {
|
||||
right_slot = left_slot;
|
||||
} else {
|
||||
left_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << left_slot);
|
||||
if (tx_mask == 0) {
|
||||
right_slot = left_slot;
|
||||
} else {
|
||||
right_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << right_slot);
|
||||
}
|
||||
right_slot = __ffs(tx_mask);
|
||||
tx_mask &= ~(1 << right_slot);
|
||||
}
|
||||
|
||||
if (tx_mask != 0 || left_slot >= slots || right_slot >= slots)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <dt-bindings/sound/tlv320adc3xxx.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/io.h>
|
||||
@@ -1025,7 +1026,9 @@ static const struct gpio_chip adc3xxx_gpio_chip = {
|
||||
|
||||
static void adc3xxx_free_gpio(struct adc3xxx *adc3xxx)
|
||||
{
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
gpiochip_remove(&adc3xxx->gpio_chip);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void adc3xxx_init_gpio(struct adc3xxx *adc3xxx)
|
||||
|
||||
@@ -2503,6 +2503,14 @@ static void wm8962_configure_bclk(struct snd_soc_component *component)
|
||||
snd_soc_component_update_bits(component, WM8962_CLOCKING2,
|
||||
WM8962_SYSCLK_ENA_MASK, WM8962_SYSCLK_ENA);
|
||||
|
||||
/* DSPCLK_DIV field in WM8962_CLOCKING1 register is used to generate
|
||||
* correct frequency of LRCLK and BCLK. Sometimes the read-only value
|
||||
* can't be updated timely after enabling SYSCLK. This results in wrong
|
||||
* calculation values. Delay is introduced here to wait for newest
|
||||
* value from register. The time of the delay should be at least
|
||||
* 500~1000us according to test.
|
||||
*/
|
||||
usleep_range(500, 1000);
|
||||
dspclk = snd_soc_component_read(component, WM8962_CLOCKING1);
|
||||
|
||||
if (snd_soc_component_get_bias_level(component) != SND_SOC_BIAS_ON)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user