mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-04-13 09:59:31 +00:00
ASoC: Fixes for v6.14
A bunch of fixes that came in during the merge window, plus a few new device IDs. The i.MX changes are a little large since they add some new quirk data as well as device IDs, and the audio graph card change for picking the correct endpoint for links is large due to updating a number of call sites. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmeaJV8ACgkQJNaLcl1U h9ACMgf/RsFePc3B8WcQMDx9jPbC/4+4BMi81lqdQyeC92KT2d5tKqGeBe+kD/MZ 7xW+celVls6GM8Qt87su4cihXMPrIVnxAo9udYwt2GmAwlEdFgWYR2uEYecDzZb6 6X5qqn5vcxDShHoa51NM6mHRzRlNEEcuRa61Ie8TbR9UF5PgpDNnfxj3cVYonTbV YCXqJH76YtRfO5kDLtvMqk6l9ayiYKGrxmr7XnzMdS4tgg5ERynujxDKMXExxGtj qBw18fw+8CpOAssVyzGXih2nlESRvHiaaIjRqAZcM9Bxr/mC+w3U3YXbP5CSjk90 xw4pVpwgRODHK9h2UH4VCdsGK6Lk4Q== =NUFQ -----END PGP SIGNATURE----- Merge tag 'asoc-fix-v6.14-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.14 A bunch of fixes that came in during the merge window, plus a few new device IDs. The i.MX changes are a little large since they add some new quirk data as well as device IDs, and the audio graph card change for picking the correct endpoint for links is large due to updating a number of call sites.
This commit is contained in:
commit
86d0d3ee07
22 changed files with 205 additions and 68 deletions
|
@ -1091,6 +1091,7 @@ properties:
|
|||
- dmo,imx8mp-data-modul-edm-sbc # i.MX8MP eDM SBC
|
||||
- emcraft,imx8mp-navqp # i.MX8MP Emcraft Systems NavQ+ Kit
|
||||
- fsl,imx8mp-evk # i.MX8MP EVK Board
|
||||
- fsl,imx8mp-evk-revb4 # i.MX8MP EVK Rev B4 Board
|
||||
- gateworks,imx8mp-gw71xx-2x # i.MX8MP Gateworks Board
|
||||
- gateworks,imx8mp-gw72xx-2x # i.MX8MP Gateworks Board
|
||||
- gateworks,imx8mp-gw73xx-2x # i.MX8MP Gateworks Board
|
||||
|
@ -1262,6 +1263,7 @@ properties:
|
|||
items:
|
||||
- enum:
|
||||
- fsl,imx8qm-mek # i.MX8QM MEK Board
|
||||
- fsl,imx8qm-mek-revd # i.MX8QM MEK Rev D Board
|
||||
- toradex,apalis-imx8 # Apalis iMX8 Modules
|
||||
- toradex,apalis-imx8-v1.1 # Apalis iMX8 V1.1 Modules
|
||||
- const: fsl,imx8qm
|
||||
|
@ -1290,6 +1292,7 @@ properties:
|
|||
- enum:
|
||||
- einfochips,imx8qxp-ai_ml # i.MX8QXP AI_ML Board
|
||||
- fsl,imx8qxp-mek # i.MX8QXP MEK Board
|
||||
- fsl,imx8qxp-mek-wcpu # i.MX8QXP MEK WCPU Board
|
||||
- const: fsl,imx8qxp
|
||||
|
||||
- description: i.MX8DXL based Boards
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
$id: http://devicetree.org/schemas/sound/ti,pcm1681.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Texas Instruments PCM1681 8-channel PWM Processor
|
||||
title: Texas Instruments PCM1681 8-channel Digital-to-Analog Converter
|
||||
|
||||
maintainers:
|
||||
- Shenghao Ding <shenghao-ding@ti.com>
|
||||
|
|
|
@ -6,15 +6,13 @@ config FW_CS_DSP
|
|||
|
||||
config FW_CS_DSP_KUNIT_TEST_UTILS
|
||||
tristate
|
||||
depends on KUNIT
|
||||
select REGMAP
|
||||
depends on KUNIT && REGMAP
|
||||
select FW_CS_DSP
|
||||
|
||||
config FW_CS_DSP_KUNIT_TEST
|
||||
tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS
|
||||
depends on KUNIT
|
||||
depends on KUNIT && REGMAP
|
||||
default KUNIT_ALL_TESTS
|
||||
select REGMAP
|
||||
select FW_CS_DSP
|
||||
select FW_CS_DSP_KUNIT_TEST_UTILS
|
||||
help
|
||||
|
|
|
@ -181,6 +181,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
|
|||
break;
|
||||
default:
|
||||
dev_err(dev, "Unknown chip revision %d\n", chip->acp_rev);
|
||||
spin_unlock_irq(&adata->acp_lock);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -304,6 +304,34 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "83AS"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
|
|
|
@ -2203,6 +2203,8 @@ static int da7213_i2c_probe(struct i2c_client *i2c)
|
|||
return ret;
|
||||
}
|
||||
|
||||
mutex_init(&da7213->ctrl_lock);
|
||||
|
||||
pm_runtime_set_autosuspend_delay(&i2c->dev, 100);
|
||||
pm_runtime_use_autosuspend(&i2c->dev);
|
||||
pm_runtime_set_active(&i2c->dev);
|
||||
|
|
|
@ -101,7 +101,7 @@ static const struct snd_kcontrol_new es8316_snd_controls[] = {
|
|||
SOC_DOUBLE_R_TLV("DAC Playback Volume", ES8316_DAC_VOLL,
|
||||
ES8316_DAC_VOLR, 0, 0xc0, 1, dac_vol_tlv),
|
||||
SOC_SINGLE("DAC Soft Ramp Switch", ES8316_DAC_SET1, 4, 1, 1),
|
||||
SOC_SINGLE("DAC Soft Ramp Rate", ES8316_DAC_SET1, 2, 4, 0),
|
||||
SOC_SINGLE("DAC Soft Ramp Rate", ES8316_DAC_SET1, 2, 3, 0),
|
||||
SOC_SINGLE("DAC Notch Filter Switch", ES8316_DAC_SET2, 6, 1, 0),
|
||||
SOC_SINGLE("DAC Double Fs Switch", ES8316_DAC_SET2, 7, 1, 0),
|
||||
SOC_SINGLE("DAC Stereo Enhancement", ES8316_DAC_SET3, 0, 7, 0),
|
||||
|
|
|
@ -911,7 +911,7 @@ static void es8326_jack_detect_handler(struct work_struct *work)
|
|||
regmap_write(es8326->regmap, ES8326_INT_SOURCE,
|
||||
(ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON));
|
||||
regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x1f);
|
||||
regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x08);
|
||||
regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x0d);
|
||||
queue_delayed_work(system_wq, &es8326->jack_detect_work,
|
||||
msecs_to_jiffies(400));
|
||||
es8326->hp = 1;
|
||||
|
@ -1023,7 +1023,7 @@ static void es8326_init(struct snd_soc_component *component)
|
|||
struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component);
|
||||
|
||||
regmap_write(es8326->regmap, ES8326_RESET, 0x1f);
|
||||
regmap_write(es8326->regmap, ES8326_VMIDSEL, 0x0E);
|
||||
regmap_write(es8326->regmap, ES8326_VMIDSEL, 0x3E);
|
||||
regmap_write(es8326->regmap, ES8326_ANA_LP, 0xf0);
|
||||
usleep_range(10000, 15000);
|
||||
regmap_write(es8326->regmap, ES8326_HPJACK_TIMER, 0xd9);
|
||||
|
|
|
@ -1091,8 +1091,7 @@ static int rt5514_set_bias_level(struct snd_soc_component *component,
|
|||
static int rt5514_probe(struct snd_soc_component *component)
|
||||
{
|
||||
struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component);
|
||||
struct platform_device *pdev = container_of(component->dev,
|
||||
struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(component->dev);
|
||||
|
||||
rt5514->mclk = devm_clk_get_optional(component->dev, "mclk");
|
||||
if (IS_ERR(rt5514->mclk))
|
||||
|
|
|
@ -6,6 +6,7 @@ comment "Common SoC Audio options for Freescale CPUs:"
|
|||
config SND_SOC_FSL_ASRC
|
||||
tristate "Asynchronous Sample Rate Converter (ASRC) module support"
|
||||
depends on HAS_DMA
|
||||
select DMA_SHARED_BUFFER
|
||||
select REGMAP_MMIO
|
||||
select SND_SOC_GENERIC_DMAENGINE_PCM
|
||||
select SND_COMPRESS_ACCEL
|
||||
|
|
|
@ -183,7 +183,7 @@ static int asrc_dmaconfig(struct fsl_asrc_pair *pair,
|
|||
}
|
||||
|
||||
/* main function of converter */
|
||||
static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task_runtime *task)
|
||||
static int asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task_runtime *task)
|
||||
{
|
||||
struct fsl_asrc *asrc = pair->asrc;
|
||||
struct device *dev = &asrc->pdev->dev;
|
||||
|
@ -193,7 +193,7 @@ static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_tas
|
|||
unsigned int out_dma_len;
|
||||
unsigned int width;
|
||||
u32 fifo_addr;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
/* set ratio mod */
|
||||
if (asrc->m2m_set_ratio_mod) {
|
||||
|
@ -215,6 +215,7 @@ static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_tas
|
|||
in_buf_len > ASRC_M2M_BUFFER_SIZE ||
|
||||
in_buf_len % (width * pair->channels / 8)) {
|
||||
dev_err(dev, "out buffer size is error: [%d]\n", in_buf_len);
|
||||
ret = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
@ -245,6 +246,7 @@ static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_tas
|
|||
}
|
||||
} else if (out_dma_len > ASRC_M2M_BUFFER_SIZE) {
|
||||
dev_err(dev, "cap buffer size error\n");
|
||||
ret = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
@ -263,12 +265,14 @@ static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_tas
|
|||
|
||||
if (!wait_for_completion_interruptible_timeout(&pair->complete[IN], 10 * HZ)) {
|
||||
dev_err(dev, "out DMA task timeout\n");
|
||||
ret = -ETIMEDOUT;
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (out_dma_len > 0) {
|
||||
if (!wait_for_completion_interruptible_timeout(&pair->complete[OUT], 10 * HZ)) {
|
||||
dev_err(dev, "cap DMA task timeout\n");
|
||||
ret = -ETIMEDOUT;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
@ -278,7 +282,7 @@ static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_tas
|
|||
/* update payload length for capture */
|
||||
task->output_size = out_dma_len;
|
||||
end:
|
||||
return;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fsl_asrc_m2m_comp_open(struct snd_compr_stream *stream)
|
||||
|
@ -525,9 +529,7 @@ static int fsl_asrc_m2m_comp_task_start(struct snd_compr_stream *stream,
|
|||
struct snd_compr_runtime *runtime = stream->runtime;
|
||||
struct fsl_asrc_pair *pair = runtime->private_data;
|
||||
|
||||
asrc_m2m_device_run(pair, task);
|
||||
|
||||
return 0;
|
||||
return asrc_m2m_device_run(pair, task);
|
||||
}
|
||||
|
||||
static int fsl_asrc_m2m_comp_task_stop(struct snd_compr_stream *stream,
|
||||
|
@ -633,7 +635,7 @@ int fsl_asrc_m2m_suspend(struct fsl_asrc *asrc)
|
|||
|
||||
for (i = 0; i < PAIR_CTX_NUM; i++) {
|
||||
pair = asrc->pair[i];
|
||||
if (!pair)
|
||||
if (!pair || !pair->dma_buffer[IN].area || !pair->dma_buffer[OUT].area)
|
||||
continue;
|
||||
if (!completion_done(&pair->complete[IN])) {
|
||||
if (pair->dma_chan[IN])
|
||||
|
|
|
@ -648,23 +648,23 @@ multi_err:
|
|||
|
||||
static int graph_parse_node_single(struct simple_util_priv *priv,
|
||||
enum graph_type gtype,
|
||||
struct device_node *port,
|
||||
struct device_node *ep,
|
||||
struct link_info *li, int is_cpu)
|
||||
{
|
||||
struct device_node *ep __free(device_node) = of_graph_get_next_port_endpoint(port, NULL);
|
||||
|
||||
return __graph_parse_node(priv, gtype, ep, li, is_cpu, 0);
|
||||
}
|
||||
|
||||
static int graph_parse_node(struct simple_util_priv *priv,
|
||||
enum graph_type gtype,
|
||||
struct device_node *port,
|
||||
struct device_node *ep,
|
||||
struct link_info *li, int is_cpu)
|
||||
{
|
||||
struct device_node *port __free(device_node) = ep_to_port(ep);
|
||||
|
||||
if (graph_lnk_is_multi(port))
|
||||
return graph_parse_node_multi(priv, gtype, port, li, is_cpu);
|
||||
else
|
||||
return graph_parse_node_single(priv, gtype, port, li, is_cpu);
|
||||
return graph_parse_node_single(priv, gtype, ep, li, is_cpu);
|
||||
}
|
||||
|
||||
static void graph_parse_daifmt(struct device_node *node, unsigned int *daifmt)
|
||||
|
@ -722,14 +722,15 @@ static unsigned int graph_parse_bitframe(struct device_node *ep)
|
|||
|
||||
static void graph_link_init(struct simple_util_priv *priv,
|
||||
struct device_node *lnk,
|
||||
struct device_node *port_cpu,
|
||||
struct device_node *port_codec,
|
||||
struct device_node *ep_cpu,
|
||||
struct device_node *ep_codec,
|
||||
struct link_info *li,
|
||||
int is_cpu_node)
|
||||
{
|
||||
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
|
||||
struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link);
|
||||
struct device_node *ep_cpu, *ep_codec;
|
||||
struct device_node *port_cpu = ep_to_port(ep_cpu);
|
||||
struct device_node *port_codec = ep_to_port(ep_codec);
|
||||
struct device_node *multi_cpu_port = NULL, *multi_codec_port = NULL;
|
||||
struct snd_soc_dai_link_component *dlc;
|
||||
unsigned int daifmt = 0;
|
||||
|
@ -739,25 +740,23 @@ static void graph_link_init(struct simple_util_priv *priv,
|
|||
int multi_cpu_port_idx = 1, multi_codec_port_idx = 1;
|
||||
int i;
|
||||
|
||||
of_node_get(port_cpu);
|
||||
if (graph_lnk_is_multi(port_cpu)) {
|
||||
multi_cpu_port = port_cpu;
|
||||
ep_cpu = graph_get_next_multi_ep(&multi_cpu_port, multi_cpu_port_idx++);
|
||||
of_node_put(port_cpu);
|
||||
port_cpu = ep_to_port(ep_cpu);
|
||||
} else {
|
||||
ep_cpu = of_graph_get_next_port_endpoint(port_cpu, NULL);
|
||||
of_node_get(ep_cpu);
|
||||
}
|
||||
struct device_node *ports_cpu __free(device_node) = port_to_ports(port_cpu);
|
||||
|
||||
of_node_get(port_codec);
|
||||
if (graph_lnk_is_multi(port_codec)) {
|
||||
multi_codec_port = port_codec;
|
||||
ep_codec = graph_get_next_multi_ep(&multi_codec_port, multi_codec_port_idx++);
|
||||
of_node_put(port_codec);
|
||||
port_codec = ep_to_port(ep_codec);
|
||||
} else {
|
||||
ep_codec = of_graph_get_next_port_endpoint(port_codec, NULL);
|
||||
of_node_get(ep_codec);
|
||||
}
|
||||
struct device_node *ports_codec __free(device_node) = port_to_ports(port_codec);
|
||||
|
||||
|
@ -833,7 +832,7 @@ int audio_graph2_link_normal(struct simple_util_priv *priv,
|
|||
{
|
||||
struct device_node *cpu_port = lnk;
|
||||
struct device_node *cpu_ep __free(device_node) = of_graph_get_next_port_endpoint(cpu_port, NULL);
|
||||
struct device_node *codec_port __free(device_node) = of_graph_get_remote_port(cpu_ep);
|
||||
struct device_node *codec_ep __free(device_node) = of_graph_get_remote_endpoint(cpu_ep);
|
||||
int ret;
|
||||
|
||||
/*
|
||||
|
@ -841,18 +840,18 @@ int audio_graph2_link_normal(struct simple_util_priv *priv,
|
|||
* see
|
||||
* __graph_parse_node() :: DAI Naming
|
||||
*/
|
||||
ret = graph_parse_node(priv, GRAPH_NORMAL, codec_port, li, 0);
|
||||
ret = graph_parse_node(priv, GRAPH_NORMAL, codec_ep, li, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* call CPU, and set DAI Name
|
||||
*/
|
||||
ret = graph_parse_node(priv, GRAPH_NORMAL, cpu_port, li, 1);
|
||||
ret = graph_parse_node(priv, GRAPH_NORMAL, cpu_ep, li, 1);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
graph_link_init(priv, lnk, cpu_port, codec_port, li, 1);
|
||||
graph_link_init(priv, lnk, cpu_ep, codec_ep, li, 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -864,15 +863,15 @@ int audio_graph2_link_dpcm(struct simple_util_priv *priv,
|
|||
{
|
||||
struct device_node *ep __free(device_node) = of_graph_get_next_port_endpoint(lnk, NULL);
|
||||
struct device_node *rep __free(device_node) = of_graph_get_remote_endpoint(ep);
|
||||
struct device_node *cpu_port = NULL;
|
||||
struct device_node *codec_port = NULL;
|
||||
struct device_node *cpu_ep = NULL;
|
||||
struct device_node *codec_ep = NULL;
|
||||
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
|
||||
struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link);
|
||||
int is_cpu = graph_util_is_ports0(lnk);
|
||||
int ret;
|
||||
|
||||
if (is_cpu) {
|
||||
cpu_port = of_graph_get_remote_port(ep); /* rport */
|
||||
cpu_ep = rep;
|
||||
|
||||
/*
|
||||
* dpcm {
|
||||
|
@ -901,12 +900,12 @@ int audio_graph2_link_dpcm(struct simple_util_priv *priv,
|
|||
dai_link->dynamic = 1;
|
||||
dai_link->dpcm_merged_format = 1;
|
||||
|
||||
ret = graph_parse_node(priv, GRAPH_DPCM, cpu_port, li, 1);
|
||||
ret = graph_parse_node(priv, GRAPH_DPCM, cpu_ep, li, 1);
|
||||
if (ret)
|
||||
goto err;
|
||||
return ret;
|
||||
|
||||
} else {
|
||||
codec_port = of_graph_get_remote_port(ep); /* rport */
|
||||
codec_ep = rep;
|
||||
|
||||
/*
|
||||
* dpcm {
|
||||
|
@ -937,18 +936,15 @@ int audio_graph2_link_dpcm(struct simple_util_priv *priv,
|
|||
dai_link->no_pcm = 1;
|
||||
dai_link->be_hw_params_fixup = simple_util_be_hw_params_fixup;
|
||||
|
||||
ret = graph_parse_node(priv, GRAPH_DPCM, codec_port, li, 0);
|
||||
ret = graph_parse_node(priv, GRAPH_DPCM, codec_ep, li, 0);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
return ret;
|
||||
}
|
||||
|
||||
graph_parse_convert(ep, dai_props); /* at node of <dpcm> */
|
||||
graph_parse_convert(rep, dai_props); /* at node of <CPU/Codec> */
|
||||
|
||||
graph_link_init(priv, lnk, cpu_port, codec_port, li, is_cpu);
|
||||
err:
|
||||
of_node_put(cpu_port);
|
||||
of_node_put(codec_port);
|
||||
graph_link_init(priv, lnk, cpu_ep, codec_ep, li, is_cpu);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1013,26 +1009,26 @@ int audio_graph2_link_c2c(struct simple_util_priv *priv,
|
|||
struct device_node *ep0 __free(device_node) = of_graph_get_next_port_endpoint(port0, NULL);
|
||||
struct device_node *ep1 __free(device_node) = of_graph_get_next_port_endpoint(port1, NULL);
|
||||
|
||||
struct device_node *codec0_port __free(device_node) = of_graph_get_remote_port(ep0);
|
||||
struct device_node *codec1_port __free(device_node) = of_graph_get_remote_port(ep1);
|
||||
struct device_node *codec0_ep __free(device_node) = of_graph_get_remote_endpoint(ep0);
|
||||
struct device_node *codec1_ep __free(device_node) = of_graph_get_remote_endpoint(ep1);
|
||||
|
||||
/*
|
||||
* call Codec first.
|
||||
* see
|
||||
* __graph_parse_node() :: DAI Naming
|
||||
*/
|
||||
ret = graph_parse_node(priv, GRAPH_C2C, codec1_port, li, 0);
|
||||
ret = graph_parse_node(priv, GRAPH_C2C, codec1_ep, li, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* call CPU, and set DAI Name
|
||||
*/
|
||||
ret = graph_parse_node(priv, GRAPH_C2C, codec0_port, li, 1);
|
||||
ret = graph_parse_node(priv, GRAPH_C2C, codec0_ep, li, 1);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
graph_link_init(priv, lnk, codec0_port, codec1_port, li, 1);
|
||||
graph_link_init(priv, lnk, codec0_ep, codec1_ep, li, 1);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1132,7 +1132,22 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
|
|||
BYT_RT5640_SSP0_AIF2 |
|
||||
BYT_RT5640_MCLK_EN),
|
||||
},
|
||||
{ /* Vexia Edu Atla 10 tablet */
|
||||
{
|
||||
/* Vexia Edu Atla 10 tablet 5V version */
|
||||
.matches = {
|
||||
/* Having all 3 of these not set is somewhat unique */
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "To be filled by O.E.M."),
|
||||
/* Above strings are too generic, also match on BIOS date */
|
||||
DMI_MATCH(DMI_BIOS_DATE, "05/14/2015"),
|
||||
},
|
||||
.driver_data = (void *)(BYTCR_INPUT_DEFAULTS |
|
||||
BYT_RT5640_JD_NOT_INV |
|
||||
BYT_RT5640_SSP0_AIF1 |
|
||||
BYT_RT5640_MCLK_EN),
|
||||
},
|
||||
{ /* Vexia Edu Atla 10 tablet 9V version */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
|
||||
|
|
|
@ -67,7 +67,7 @@ config SND_SH7760_AC97
|
|||
|
||||
config SND_SIU_MIGOR
|
||||
tristate "SIU sound support on Migo-R"
|
||||
depends on SH_MIGOR && I2C
|
||||
depends on SH_MIGOR && I2C && DMADEVICES
|
||||
select SND_SOC_SH4_SIU
|
||||
select SND_SOC_WM8978
|
||||
help
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#define DRV_NAME "rockchip-i2s-tdm"
|
||||
|
||||
#define DEFAULT_MCLK_FS 256
|
||||
#define CH_GRP_MAX 4 /* The max channel 8 / 2 */
|
||||
#define MULTIPLEX_CH_MAX 10
|
||||
|
||||
|
@ -70,6 +69,8 @@ struct rk_i2s_tdm_dev {
|
|||
bool has_playback;
|
||||
bool has_capture;
|
||||
struct snd_soc_dai_driver *dai;
|
||||
unsigned int mclk_rx_freq;
|
||||
unsigned int mclk_tx_freq;
|
||||
};
|
||||
|
||||
static int to_ch_num(unsigned int val)
|
||||
|
@ -617,6 +618,27 @@ static int rockchip_i2s_trcm_mode(struct snd_pcm_substream *substream,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int rockchip_i2s_tdm_set_sysclk(struct snd_soc_dai *cpu_dai, int stream,
|
||||
unsigned int freq, int dir)
|
||||
{
|
||||
struct rk_i2s_tdm_dev *i2s_tdm = to_info(cpu_dai);
|
||||
|
||||
if (i2s_tdm->clk_trcm) {
|
||||
i2s_tdm->mclk_tx_freq = freq;
|
||||
i2s_tdm->mclk_rx_freq = freq;
|
||||
} else {
|
||||
if (stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
i2s_tdm->mclk_tx_freq = freq;
|
||||
else
|
||||
i2s_tdm->mclk_rx_freq = freq;
|
||||
}
|
||||
|
||||
dev_dbg(i2s_tdm->dev, "The target mclk_%s freq is: %d\n",
|
||||
stream ? "rx" : "tx", freq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rockchip_i2s_tdm_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params,
|
||||
struct snd_soc_dai *dai)
|
||||
|
@ -631,15 +653,19 @@ static int rockchip_i2s_tdm_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
if (i2s_tdm->clk_trcm == TRCM_TX) {
|
||||
mclk = i2s_tdm->mclk_tx;
|
||||
mclk_rate = i2s_tdm->mclk_tx_freq;
|
||||
} else if (i2s_tdm->clk_trcm == TRCM_RX) {
|
||||
mclk = i2s_tdm->mclk_rx;
|
||||
mclk_rate = i2s_tdm->mclk_rx_freq;
|
||||
} else if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
mclk = i2s_tdm->mclk_tx;
|
||||
mclk_rate = i2s_tdm->mclk_tx_freq;
|
||||
} else {
|
||||
mclk = i2s_tdm->mclk_rx;
|
||||
mclk_rate = i2s_tdm->mclk_rx_freq;
|
||||
}
|
||||
|
||||
err = clk_set_rate(mclk, DEFAULT_MCLK_FS * params_rate(params));
|
||||
err = clk_set_rate(mclk, mclk_rate);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -799,6 +825,7 @@ static const struct snd_soc_dai_ops rockchip_i2s_tdm_dai_ops = {
|
|||
.hw_params = rockchip_i2s_tdm_hw_params,
|
||||
.set_bclk_ratio = rockchip_i2s_tdm_set_bclk_ratio,
|
||||
.set_fmt = rockchip_i2s_tdm_set_fmt,
|
||||
.set_sysclk = rockchip_i2s_tdm_set_sysclk,
|
||||
.set_tdm_slot = rockchip_dai_tdm_slot,
|
||||
.trigger = rockchip_i2s_tdm_trigger,
|
||||
};
|
||||
|
|
|
@ -175,8 +175,7 @@ static int imx8_run(struct snd_sof_dev *sdev)
|
|||
|
||||
static int imx8_probe(struct snd_sof_dev *sdev)
|
||||
{
|
||||
struct platform_device *pdev =
|
||||
container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *res_node;
|
||||
struct resource *mmio;
|
||||
|
@ -606,11 +605,32 @@ static struct snd_sof_of_mach sof_imx8_machs[] = {
|
|||
.sof_tplg_filename = "sof-imx8-wm8960.tplg",
|
||||
.drv_name = "asoc-audio-graph-card2",
|
||||
},
|
||||
{
|
||||
.compatible = "fsl,imx8qxp-mek-wcpu",
|
||||
.sof_tplg_filename = "sof-imx8-wm8962.tplg",
|
||||
.drv_name = "asoc-audio-graph-card2",
|
||||
},
|
||||
{
|
||||
.compatible = "fsl,imx8qm-mek",
|
||||
.sof_tplg_filename = "sof-imx8-wm8960.tplg",
|
||||
.drv_name = "asoc-audio-graph-card2",
|
||||
},
|
||||
{
|
||||
.compatible = "fsl,imx8qm-mek-revd",
|
||||
.sof_tplg_filename = "sof-imx8-wm8962.tplg",
|
||||
.drv_name = "asoc-audio-graph-card2",
|
||||
},
|
||||
{
|
||||
.compatible = "fsl,imx8qxp-mek-bb",
|
||||
.sof_tplg_filename = "sof-imx8-cs42888.tplg",
|
||||
.drv_name = "asoc-audio-graph-card2",
|
||||
},
|
||||
{
|
||||
.compatible = "fsl,imx8qm-mek-bb",
|
||||
.sof_tplg_filename = "sof-imx8-cs42888.tplg",
|
||||
.drv_name = "asoc-audio-graph-card2",
|
||||
},
|
||||
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -144,8 +144,7 @@ static int imx8m_reset(struct snd_sof_dev *sdev)
|
|||
|
||||
static int imx8m_probe(struct snd_sof_dev *sdev)
|
||||
{
|
||||
struct platform_device *pdev =
|
||||
container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *res_node;
|
||||
struct resource *mmio;
|
||||
|
@ -294,6 +293,17 @@ static struct snd_soc_dai_driver imx8m_dai[] = {
|
|||
.channels_max = 32,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "sai2",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
.capture = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "sai3",
|
||||
.playback = {
|
||||
|
@ -305,6 +315,39 @@ static struct snd_soc_dai_driver imx8m_dai[] = {
|
|||
.channels_max = 32,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "sai5",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
.capture = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "sai6",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
.capture = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "sai7",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
.capture = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 32,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "micfil",
|
||||
.capture = {
|
||||
|
@ -471,6 +514,11 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = {
|
|||
};
|
||||
|
||||
static struct snd_sof_of_mach sof_imx8mp_machs[] = {
|
||||
{
|
||||
.compatible = "fsl,imx8mp-evk-revb4",
|
||||
.sof_tplg_filename = "sof-imx8mp-wm8962.tplg",
|
||||
.drv_name = "asoc-audio-graph-card2",
|
||||
},
|
||||
{
|
||||
.compatible = "fsl,imx8mp-evk",
|
||||
.sof_tplg_filename = "sof-imx8mp-wm8960.tplg",
|
||||
|
|
|
@ -155,8 +155,7 @@ static int imx8ulp_reset(struct snd_sof_dev *sdev)
|
|||
|
||||
static int imx8ulp_probe(struct snd_sof_dev *sdev)
|
||||
{
|
||||
struct platform_device *pdev =
|
||||
container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *res_node;
|
||||
struct resource *mmio;
|
||||
|
|
|
@ -410,8 +410,7 @@ static int bdw_probe(struct snd_sof_dev *sdev)
|
|||
{
|
||||
struct snd_sof_pdata *pdata = sdev->pdata;
|
||||
const struct sof_dev_desc *desc = pdata->desc;
|
||||
struct platform_device *pdev =
|
||||
container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
const struct sof_intel_dsp_desc *chip;
|
||||
struct resource *mmio;
|
||||
u32 base, size;
|
||||
|
|
|
@ -109,8 +109,7 @@ static int byt_acpi_probe(struct snd_sof_dev *sdev)
|
|||
{
|
||||
struct snd_sof_pdata *pdata = sdev->pdata;
|
||||
const struct sof_dev_desc *desc = pdata->desc;
|
||||
struct platform_device *pdev =
|
||||
container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
const struct sof_intel_dsp_desc *chip;
|
||||
struct resource *mmio;
|
||||
u32 base, size;
|
||||
|
|
|
@ -238,7 +238,7 @@ static int mt8186_run(struct snd_sof_dev *sdev)
|
|||
|
||||
static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
|
||||
{
|
||||
struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
struct adsp_priv *priv;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ static int mt8195_run(struct snd_sof_dev *sdev)
|
|||
|
||||
static int mt8195_dsp_probe(struct snd_sof_dev *sdev)
|
||||
{
|
||||
struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
struct adsp_priv *priv;
|
||||
int ret;
|
||||
|
||||
|
@ -341,7 +341,7 @@ static int mt8195_dsp_shutdown(struct snd_sof_dev *sdev)
|
|||
|
||||
static void mt8195_dsp_remove(struct snd_sof_dev *sdev)
|
||||
{
|
||||
struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
struct adsp_priv *priv = sdev->pdata->hw_pdata;
|
||||
|
||||
platform_device_unregister(priv->ipc_dev);
|
||||
|
@ -351,7 +351,7 @@ static void mt8195_dsp_remove(struct snd_sof_dev *sdev)
|
|||
|
||||
static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
|
||||
{
|
||||
struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev);
|
||||
struct platform_device *pdev = to_platform_device(sdev->dev);
|
||||
int ret;
|
||||
u32 reset_sw, dbg_pc;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue