mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 21:52:04 +00:00
ASoC: Fixes for v6.4
A lot of routine driver specific fixes here, nothing in the core though there are a couple of fixes for the generic cards. There's also a few new quirks for x86 platforms. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmR/LuwACgkQJNaLcl1U h9DUZgf/a6hZMe3KVyW86Migg2Gwo4rpuG5KyFHXsOQnOwJCom+UdzGP8C+Hwugt lLXB9WqQ6rJPpnGFRfbVx7GXHhbxwWrQYUnkoZVXFDAB9xe5IYil7xnQxVl/R7Nr 2SIS0y8X8ckbqy4oGoAUUco4y2jRNF8RBXw4ksZzdALGcZ6/zwayDxC0aPMxtPco hVJarYa5bRZR3lcxrr9jf5DQP6OFX8gYu3C5e11q6m2OC5B8f22i62vpQ1h44eS2 amHoamFNvVN3sso+ZCE1wWgZa5rYCuNB1Q7q9ZoZFiW/VEeDK2SVsmUso2xDnD3a 8amA62PV2zokmxquyDIn5lwrXuJmMA== =iAoe -----END PGP SIGNATURE----- Merge tag 'asoc-fix-v6.4-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.4 A lot of routine driver specific fixes here, nothing in the core though there are a couple of fixes for the generic cards. There's also a few new quirks for x86 platforms.
This commit is contained in:
commit
08c9aa7c58
@ -211,8 +211,7 @@ static int create_acp63_platform_devs(struct pci_dev *pci, struct acp63_dev_data
|
||||
case ACP63_PDM_DEV_MASK:
|
||||
adata->pdm_dev_index = 0;
|
||||
acp63_fill_platform_dev_info(&pdevinfo[0], parent, NULL, "acp_ps_pdm_dma",
|
||||
0, adata->res, 1, &adata->acp_lock,
|
||||
sizeof(adata->acp_lock));
|
||||
0, adata->res, 1, NULL, 0);
|
||||
acp63_fill_platform_dev_info(&pdevinfo[1], parent, NULL, "dmic-codec",
|
||||
0, NULL, 0, NULL, 0);
|
||||
acp63_fill_platform_dev_info(&pdevinfo[2], parent, NULL, "acp_ps_mach",
|
||||
|
@ -361,12 +361,12 @@ static int acp63_pdm_audio_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
struct pdm_dev_data *adata;
|
||||
struct acp63_dev_data *acp_data;
|
||||
struct device *parent;
|
||||
int status;
|
||||
|
||||
if (!pdev->dev.platform_data) {
|
||||
dev_err(&pdev->dev, "platform_data not retrieved\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
parent = pdev->dev.parent;
|
||||
acp_data = dev_get_drvdata(parent);
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
|
||||
@ -382,7 +382,7 @@ static int acp63_pdm_audio_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
adata->capture_stream = NULL;
|
||||
adata->acp_lock = pdev->dev.platform_data;
|
||||
adata->acp_lock = &acp_data->acp_lock;
|
||||
dev_set_drvdata(&pdev->dev, adata);
|
||||
status = devm_snd_soc_register_component(&pdev->dev,
|
||||
&acp63_pdm_component,
|
||||
|
@ -171,6 +171,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21CL"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21EF"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
|
@ -704,9 +704,6 @@ static int cs35l56_sdw_dai_hw_free(struct snd_pcm_substream *substream,
|
||||
static int cs35l56_sdw_dai_set_stream(struct snd_soc_dai *dai,
|
||||
void *sdw_stream, int direction)
|
||||
{
|
||||
if (!sdw_stream)
|
||||
return 0;
|
||||
|
||||
snd_soc_dai_dma_data_set(dai, direction, sdw_stream);
|
||||
|
||||
return 0;
|
||||
|
@ -211,7 +211,7 @@ static int max98363_io_init(struct sdw_slave *slave)
|
||||
}
|
||||
|
||||
#define MAX98363_RATES SNDRV_PCM_RATE_8000_192000
|
||||
#define MAX98363_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
|
||||
#define MAX98363_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
|
||||
|
||||
static int max98363_sdw_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params,
|
||||
@ -246,7 +246,7 @@ static int max98363_sdw_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
stream_config.frame_rate = params_rate(params);
|
||||
stream_config.bps = snd_pcm_format_width(params_format(params));
|
||||
stream_config.direction = direction;
|
||||
stream_config.ch_count = params_channels(params);
|
||||
stream_config.ch_count = 1;
|
||||
|
||||
if (stream_config.ch_count > runtime->hw.channels_max) {
|
||||
stream_config.ch_count = runtime->hw.channels_max;
|
||||
|
@ -1903,6 +1903,30 @@ static const struct dmi_system_id nau8824_quirk_table[] = {
|
||||
},
|
||||
.driver_data = (void *)(NAU8824_MONO_SPEAKER),
|
||||
},
|
||||
{
|
||||
/* Positivo CW14Q01P */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "CW14Q01P"),
|
||||
},
|
||||
.driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH),
|
||||
},
|
||||
{
|
||||
/* Positivo K1424G */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "K1424G"),
|
||||
},
|
||||
.driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH),
|
||||
},
|
||||
{
|
||||
/* Positivo N14ZP74G */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "N14ZP74G"),
|
||||
},
|
||||
.driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH),
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -1190,7 +1190,6 @@ static const struct regmap_config wcd938x_regmap_config = {
|
||||
.readable_reg = wcd938x_readable_register,
|
||||
.writeable_reg = wcd938x_writeable_register,
|
||||
.volatile_reg = wcd938x_volatile_register,
|
||||
.can_multi_write = true,
|
||||
};
|
||||
|
||||
static const struct sdw_slave_ops wcd9380_slave_ops = {
|
||||
|
@ -645,7 +645,6 @@ static struct regmap_config wsa881x_regmap_config = {
|
||||
.readable_reg = wsa881x_readable_register,
|
||||
.reg_format_endian = REGMAP_ENDIAN_NATIVE,
|
||||
.val_format_endian = REGMAP_ENDIAN_NATIVE,
|
||||
.can_multi_write = true,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -946,7 +946,6 @@ static struct regmap_config wsa883x_regmap_config = {
|
||||
.writeable_reg = wsa883x_writeable_register,
|
||||
.reg_format_endian = REGMAP_ENDIAN_NATIVE,
|
||||
.val_format_endian = REGMAP_ENDIAN_NATIVE,
|
||||
.can_multi_write = true,
|
||||
.use_single_read = true,
|
||||
};
|
||||
|
||||
|
@ -491,14 +491,21 @@ static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
|
||||
regmap_update_bits(sai->regmap, reg, FSL_SAI_CR2_MSEL_MASK,
|
||||
FSL_SAI_CR2_MSEL(sai->mclk_id[tx]));
|
||||
|
||||
if (savediv == 1)
|
||||
if (savediv == 1) {
|
||||
regmap_update_bits(sai->regmap, reg,
|
||||
FSL_SAI_CR2_DIV_MASK | FSL_SAI_CR2_BYP,
|
||||
FSL_SAI_CR2_BYP);
|
||||
else
|
||||
if (fsl_sai_dir_is_synced(sai, adir))
|
||||
regmap_update_bits(sai->regmap, FSL_SAI_xCR2(tx, ofs),
|
||||
FSL_SAI_CR2_BCI, FSL_SAI_CR2_BCI);
|
||||
else
|
||||
regmap_update_bits(sai->regmap, FSL_SAI_xCR2(tx, ofs),
|
||||
FSL_SAI_CR2_BCI, 0);
|
||||
} else {
|
||||
regmap_update_bits(sai->regmap, reg,
|
||||
FSL_SAI_CR2_DIV_MASK | FSL_SAI_CR2_BYP,
|
||||
savediv / 2 - 1);
|
||||
}
|
||||
|
||||
if (sai->soc_data->max_register >= FSL_SAI_MCTL) {
|
||||
/* SAI is in master mode at this point, so enable MCLK */
|
||||
|
@ -116,6 +116,7 @@
|
||||
|
||||
/* SAI Transmit and Receive Configuration 2 Register */
|
||||
#define FSL_SAI_CR2_SYNC BIT(30)
|
||||
#define FSL_SAI_CR2_BCI BIT(28)
|
||||
#define FSL_SAI_CR2_MSEL_MASK (0x3 << 26)
|
||||
#define FSL_SAI_CR2_MSEL_BUS 0
|
||||
#define FSL_SAI_CR2_MSEL_MCLK1 BIT(26)
|
||||
|
@ -314,7 +314,7 @@ int asoc_simple_startup(struct snd_pcm_substream *substream)
|
||||
}
|
||||
ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE,
|
||||
fixed_rate, fixed_rate);
|
||||
if (ret)
|
||||
if (ret < 0)
|
||||
goto codec_err;
|
||||
}
|
||||
|
||||
|
@ -416,6 +416,7 @@ static int __simple_for_each_link(struct asoc_simple_priv *priv,
|
||||
|
||||
if (ret < 0) {
|
||||
of_node_put(codec);
|
||||
of_node_put(plat);
|
||||
of_node_put(np);
|
||||
goto error;
|
||||
}
|
||||
|
@ -418,13 +418,6 @@ int mt8188_afe_init_clock(struct mtk_base_afe *afe)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mt8188_afe_deinit_clock(void *priv)
|
||||
{
|
||||
struct mtk_base_afe *afe = priv;
|
||||
|
||||
mt8188_audsys_clk_unregister(afe);
|
||||
}
|
||||
|
||||
int mt8188_afe_enable_clk(struct mtk_base_afe *afe, struct clk *clk)
|
||||
{
|
||||
int ret;
|
||||
|
@ -100,7 +100,6 @@ int mt8188_afe_get_mclk_source_clk_id(int sel);
|
||||
int mt8188_afe_get_mclk_source_rate(struct mtk_base_afe *afe, int apll);
|
||||
int mt8188_afe_get_default_mclk_source_by_rate(int rate);
|
||||
int mt8188_afe_init_clock(struct mtk_base_afe *afe);
|
||||
void mt8188_afe_deinit_clock(void *priv);
|
||||
int mt8188_afe_enable_clk(struct mtk_base_afe *afe, struct clk *clk);
|
||||
void mt8188_afe_disable_clk(struct mtk_base_afe *afe, struct clk *clk);
|
||||
int mt8188_afe_set_clk_rate(struct mtk_base_afe *afe, struct clk *clk,
|
||||
|
@ -3185,10 +3185,6 @@ static int mt8188_afe_pcm_dev_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret, "init clock error");
|
||||
|
||||
ret = devm_add_action_or_reset(dev, mt8188_afe_deinit_clock, (void *)afe);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
spin_lock_init(&afe_priv->afe_ctrl_lock);
|
||||
|
||||
mutex_init(&afe->irq_alloc_lock);
|
||||
|
@ -138,6 +138,29 @@ static const struct afe_gate aud_clks[CLK_AUD_NR_CLK] = {
|
||||
GATE_AUD6(CLK_AUD_GASRC11, "aud_gasrc11", "top_asm_h", 11),
|
||||
};
|
||||
|
||||
static void mt8188_audsys_clk_unregister(void *data)
|
||||
{
|
||||
struct mtk_base_afe *afe = data;
|
||||
struct mt8188_afe_private *afe_priv = afe->platform_priv;
|
||||
struct clk *clk;
|
||||
struct clk_lookup *cl;
|
||||
int i;
|
||||
|
||||
if (!afe_priv)
|
||||
return;
|
||||
|
||||
for (i = 0; i < CLK_AUD_NR_CLK; i++) {
|
||||
cl = afe_priv->lookup[i];
|
||||
if (!cl)
|
||||
continue;
|
||||
|
||||
clk = cl->clk;
|
||||
clk_unregister_gate(clk);
|
||||
|
||||
clkdev_drop(cl);
|
||||
}
|
||||
}
|
||||
|
||||
int mt8188_audsys_clk_register(struct mtk_base_afe *afe)
|
||||
{
|
||||
struct mt8188_afe_private *afe_priv = afe->platform_priv;
|
||||
@ -179,27 +202,5 @@ int mt8188_audsys_clk_register(struct mtk_base_afe *afe)
|
||||
afe_priv->lookup[i] = cl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mt8188_audsys_clk_unregister(struct mtk_base_afe *afe)
|
||||
{
|
||||
struct mt8188_afe_private *afe_priv = afe->platform_priv;
|
||||
struct clk *clk;
|
||||
struct clk_lookup *cl;
|
||||
int i;
|
||||
|
||||
if (!afe_priv)
|
||||
return;
|
||||
|
||||
for (i = 0; i < CLK_AUD_NR_CLK; i++) {
|
||||
cl = afe_priv->lookup[i];
|
||||
if (!cl)
|
||||
continue;
|
||||
|
||||
clk = cl->clk;
|
||||
clk_unregister_gate(clk);
|
||||
|
||||
clkdev_drop(cl);
|
||||
}
|
||||
return devm_add_action_or_reset(afe->dev, mt8188_audsys_clk_unregister, afe);
|
||||
}
|
||||
|
@ -10,6 +10,5 @@
|
||||
#define _MT8188_AUDSYS_CLK_H_
|
||||
|
||||
int mt8188_audsys_clk_register(struct mtk_base_afe *afe);
|
||||
void mt8188_audsys_clk_unregister(struct mtk_base_afe *afe);
|
||||
|
||||
#endif
|
||||
|
@ -410,11 +410,6 @@ int mt8195_afe_init_clock(struct mtk_base_afe *afe)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mt8195_afe_deinit_clock(struct mtk_base_afe *afe)
|
||||
{
|
||||
mt8195_audsys_clk_unregister(afe);
|
||||
}
|
||||
|
||||
int mt8195_afe_enable_clk(struct mtk_base_afe *afe, struct clk *clk)
|
||||
{
|
||||
int ret;
|
||||
|
@ -101,7 +101,6 @@ int mt8195_afe_get_mclk_source_clk_id(int sel);
|
||||
int mt8195_afe_get_mclk_source_rate(struct mtk_base_afe *afe, int apll);
|
||||
int mt8195_afe_get_default_mclk_source_by_rate(int rate);
|
||||
int mt8195_afe_init_clock(struct mtk_base_afe *afe);
|
||||
void mt8195_afe_deinit_clock(struct mtk_base_afe *afe);
|
||||
int mt8195_afe_enable_clk(struct mtk_base_afe *afe, struct clk *clk);
|
||||
void mt8195_afe_disable_clk(struct mtk_base_afe *afe, struct clk *clk);
|
||||
int mt8195_afe_prepare_clk(struct mtk_base_afe *afe, struct clk *clk);
|
||||
|
@ -3255,15 +3255,11 @@ err_pm_put:
|
||||
|
||||
static void mt8195_afe_pcm_dev_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct mtk_base_afe *afe = platform_get_drvdata(pdev);
|
||||
|
||||
snd_soc_unregister_component(&pdev->dev);
|
||||
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
if (!pm_runtime_status_suspended(&pdev->dev))
|
||||
mt8195_afe_runtime_suspend(&pdev->dev);
|
||||
|
||||
mt8195_afe_deinit_clock(afe);
|
||||
}
|
||||
|
||||
static const struct of_device_id mt8195_afe_pcm_dt_match[] = {
|
||||
|
@ -148,6 +148,29 @@ static const struct afe_gate aud_clks[CLK_AUD_NR_CLK] = {
|
||||
GATE_AUD6(CLK_AUD_GASRC19, "aud_gasrc19", "top_asm_h", 19),
|
||||
};
|
||||
|
||||
static void mt8195_audsys_clk_unregister(void *data)
|
||||
{
|
||||
struct mtk_base_afe *afe = data;
|
||||
struct mt8195_afe_private *afe_priv = afe->platform_priv;
|
||||
struct clk *clk;
|
||||
struct clk_lookup *cl;
|
||||
int i;
|
||||
|
||||
if (!afe_priv)
|
||||
return;
|
||||
|
||||
for (i = 0; i < CLK_AUD_NR_CLK; i++) {
|
||||
cl = afe_priv->lookup[i];
|
||||
if (!cl)
|
||||
continue;
|
||||
|
||||
clk = cl->clk;
|
||||
clk_unregister_gate(clk);
|
||||
|
||||
clkdev_drop(cl);
|
||||
}
|
||||
}
|
||||
|
||||
int mt8195_audsys_clk_register(struct mtk_base_afe *afe)
|
||||
{
|
||||
struct mt8195_afe_private *afe_priv = afe->platform_priv;
|
||||
@ -188,27 +211,5 @@ int mt8195_audsys_clk_register(struct mtk_base_afe *afe)
|
||||
afe_priv->lookup[i] = cl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mt8195_audsys_clk_unregister(struct mtk_base_afe *afe)
|
||||
{
|
||||
struct mt8195_afe_private *afe_priv = afe->platform_priv;
|
||||
struct clk *clk;
|
||||
struct clk_lookup *cl;
|
||||
int i;
|
||||
|
||||
if (!afe_priv)
|
||||
return;
|
||||
|
||||
for (i = 0; i < CLK_AUD_NR_CLK; i++) {
|
||||
cl = afe_priv->lookup[i];
|
||||
if (!cl)
|
||||
continue;
|
||||
|
||||
clk = cl->clk;
|
||||
clk_unregister_gate(clk);
|
||||
|
||||
clkdev_drop(cl);
|
||||
}
|
||||
return devm_add_action_or_reset(afe->dev, mt8195_audsys_clk_unregister, afe);
|
||||
}
|
||||
|
@ -10,6 +10,5 @@
|
||||
#define _MT8195_AUDSYS_CLK_H_
|
||||
|
||||
int mt8195_audsys_clk_register(struct mtk_base_afe *afe);
|
||||
void mt8195_audsys_clk_unregister(struct mtk_base_afe *afe);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user