ASoC: Merge up fixes
Merge branch 'for-7.0' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-7.1 to get fixes into our development branch and resolve interactions with the match tables.master
commit
5a306bef59
|
|
@ -33,6 +33,7 @@ properties:
|
|||
- const: rockchip,rk3066-spdif
|
||||
- items:
|
||||
- enum:
|
||||
- rockchip,rk3576-spdif
|
||||
- rockchip,rk3588-spdif
|
||||
- const: rockchip,rk3568-spdif
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ allOf:
|
|||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
const: st,stm32mph7-sai
|
||||
const: st,stm32h7-sai
|
||||
then:
|
||||
properties:
|
||||
clocks:
|
||||
|
|
|
|||
|
|
@ -23,6 +23,16 @@
|
|||
|
||||
static int acp_quirk_data;
|
||||
|
||||
static const struct dmi_system_id acp70_acpi_flag_override_table[] = {
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HN7306EA"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct config_entry config_table[] = {
|
||||
{
|
||||
.flags = FLAG_AMD_SOF,
|
||||
|
|
@ -186,8 +196,11 @@ int snd_amd_acp_find_config(struct pci_dev *pci)
|
|||
*/
|
||||
if (!pci->revision)
|
||||
return 0;
|
||||
else if (pci->revision >= ACP_7_0_REV)
|
||||
else if (pci->revision >= ACP_7_0_REV) {
|
||||
if (dmi_check_system(acp70_acpi_flag_override_table))
|
||||
return 0;
|
||||
return snd_amd_acp_acpi_find_config(pci);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(config_table); i++, table++) {
|
||||
if (table->device != device)
|
||||
|
|
|
|||
|
|
@ -111,6 +111,14 @@ static const struct dmi_system_id soc_sdw_quirk_table[] = {
|
|||
},
|
||||
.driver_data = (void *)(ASOC_SDW_CODEC_SPKR),
|
||||
},
|
||||
{
|
||||
.callback = soc_sdw_quirk_cb,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HN7306EA"),
|
||||
},
|
||||
.driver_data = (void *)(ASOC_SDW_ACP_DMIC),
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,28 @@ static const struct snd_soc_acpi_endpoint jack_amp_g1_dmic_endpoints[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_endpoint jack_dmic_endpoints[] = {
|
||||
/* Jack Endpoint */
|
||||
{
|
||||
.num = 0,
|
||||
.aggregated = 0,
|
||||
.group_position = 0,
|
||||
.group_id = 0,
|
||||
},
|
||||
/* DMIC Endpoint */
|
||||
{
|
||||
/*
|
||||
* rt721 endpoint #2 maps to AIF3 (internal DMIC capture).
|
||||
* Endpoint #1 is AIF2 amp path and is handled by external amps
|
||||
* on this platform.
|
||||
*/
|
||||
.num = 2,
|
||||
.aggregated = 0,
|
||||
.group_position = 0,
|
||||
.group_id = 0,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device rt712_vb_1_group1_adr[] = {
|
||||
{
|
||||
.adr = 0x000130025D071201ull,
|
||||
|
|
@ -563,6 +585,40 @@ static const struct snd_soc_acpi_link_adr acp70_rt1320_l0_rt722_l1[] = {
|
|||
{}
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_adr_device rt721_l1u0_tas2783x2_l1u8b_adr[] = {
|
||||
{
|
||||
.adr = 0x000130025D072101ull,
|
||||
/*
|
||||
* On this platform speakers are provided by two TAS2783 amps.
|
||||
* Keep rt721 as UAJ + DMIC only.
|
||||
*/
|
||||
.num_endpoints = ARRAY_SIZE(jack_dmic_endpoints),
|
||||
.endpoints = jack_dmic_endpoints,
|
||||
.name_prefix = "rt721",
|
||||
},
|
||||
{
|
||||
.adr = 0x0001380102000001ull,
|
||||
.num_endpoints = 1,
|
||||
.endpoints = &spk_l_endpoint,
|
||||
.name_prefix = "tas2783-1",
|
||||
},
|
||||
{
|
||||
.adr = 0x00013B0102000001ull,
|
||||
.num_endpoints = 1,
|
||||
.endpoints = &spk_r_endpoint,
|
||||
.name_prefix = "tas2783-2",
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_acpi_link_adr acp70_rt721_l1u0_tas2783x2_l1u8b[] = {
|
||||
{
|
||||
.mask = BIT(1),
|
||||
.num_adr = ARRAY_SIZE(rt721_l1u0_tas2783x2_l1u8b_adr),
|
||||
.adr_d = rt721_l1u0_tas2783x2_l1u8b_adr,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = {
|
||||
{
|
||||
.link_mask = BIT(0) | BIT(1),
|
||||
|
|
@ -650,6 +706,11 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_sdw_machines[] = {
|
|||
.machine_check = snd_soc_acpi_amd_sdca_is_device_rt712_vb,
|
||||
.drv_name = "amd_sdw",
|
||||
},
|
||||
{
|
||||
.link_mask = BIT(1),
|
||||
.links = acp70_rt721_l1u0_tas2783x2_l1u8b,
|
||||
.drv_name = "amd_sdw",
|
||||
},
|
||||
{},
|
||||
};
|
||||
EXPORT_SYMBOL(snd_soc_acpi_amd_acp70_sdw_machines);
|
||||
|
|
|
|||
|
|
@ -724,6 +724,20 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "PM1503CDA"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "BM1403CDA"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "BM1403CDA"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
|
|
@ -731,6 +745,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7VF"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7VE"),
|
||||
}
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1759,8 +1759,10 @@ static void sma1307_setting_loaded(struct sma1307_priv *sma1307, const char *fil
|
|||
sma1307->set.mode_size * 2 * sizeof(int),
|
||||
GFP_KERNEL);
|
||||
if (!sma1307->set.mode_set[i]) {
|
||||
for (int j = 0; j < i; j++)
|
||||
kfree(sma1307->set.mode_set[j]);
|
||||
for (int j = 0; j < i; j++) {
|
||||
devm_kfree(sma1307->dev, sma1307->set.mode_set[j]);
|
||||
sma1307->set.mode_set[j] = NULL;
|
||||
}
|
||||
sma1307->set.status = false;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2550,6 +2550,9 @@ static void tasdev_load_calibrated_data(struct tasdevice_priv *priv, int i)
|
|||
int k = i * (cali_data->cali_dat_sz_per_dev + 1);
|
||||
int rc;
|
||||
|
||||
if (!data || !cali_data->total_sz)
|
||||
return;
|
||||
|
||||
if (data[k] != i) {
|
||||
dev_err(priv->dev, "%s: no cal-data for dev %d from usr-spc\n",
|
||||
__func__, i);
|
||||
|
|
|
|||
|
|
@ -2172,7 +2172,7 @@ static int wcd934x_init_dmic(struct snd_soc_component *comp)
|
|||
u32 def_dmic_rate, dmic_clk_drv;
|
||||
int ret;
|
||||
|
||||
ret = wcd_dt_parse_mbhc_data(comp->dev, &wcd->mbhc_cfg);
|
||||
ret = wcd_dt_parse_micbias_info(&wcd->common);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -710,6 +710,8 @@ static int imx_card_parse_of(struct imx_card_data *data)
|
|||
link->ops = &imx_aif_ops;
|
||||
}
|
||||
|
||||
playback_only = false;
|
||||
capture_only = false;
|
||||
graph_util_parse_link_direction(np, &playback_only, &capture_only);
|
||||
link->playback_only = playback_only;
|
||||
link->capture_only = capture_only;
|
||||
|
|
|
|||
|
|
@ -1202,9 +1202,9 @@ void graph_util_parse_link_direction(struct device_node *np,
|
|||
bool is_playback_only = of_property_read_bool(np, "playback-only");
|
||||
bool is_capture_only = of_property_read_bool(np, "capture-only");
|
||||
|
||||
if (np && playback_only)
|
||||
if (playback_only && is_playback_only)
|
||||
*playback_only = is_playback_only;
|
||||
if (np && capture_only)
|
||||
if (capture_only && is_capture_only)
|
||||
*capture_only = is_capture_only;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(graph_util_parse_link_direction);
|
||||
|
|
|
|||
|
|
@ -281,7 +281,15 @@ static int catpt_acpi_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(cdev->pci_ba))
|
||||
return PTR_ERR(cdev->pci_ba);
|
||||
|
||||
/* alloc buffer for storing DRAM context during dx transitions */
|
||||
/*
|
||||
* As per design HOST is responsible for preserving firmware's runtime
|
||||
* context during D0 -> D3 -> D0 transitions. Addresses used for DMA
|
||||
* to/from HOST memory shall be outside the reserved range of 0xFFFxxxxx.
|
||||
*/
|
||||
ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
cdev->dxbuf_vaddr = dmam_alloc_coherent(dev, catpt_dram_size(cdev),
|
||||
&cdev->dxbuf_paddr, GFP_KERNEL);
|
||||
if (!cdev->dxbuf_vaddr)
|
||||
|
|
|
|||
|
|
@ -125,9 +125,6 @@ int catpt_dmac_probe(struct catpt_dev *cdev)
|
|||
dmac->dev = cdev->dev;
|
||||
dmac->irq = cdev->irq;
|
||||
|
||||
ret = dma_coerce_mask_and_coherent(cdev->dev, DMA_BIT_MASK(31));
|
||||
if (ret)
|
||||
return ret;
|
||||
/*
|
||||
* Caller is responsible for putting device in D0 to allow
|
||||
* for I/O and memory access before probing DW.
|
||||
|
|
|
|||
|
|
@ -736,7 +736,7 @@ static int sof_parse_token_sets(struct snd_soc_component *scomp,
|
|||
asize = le32_to_cpu(array->size);
|
||||
|
||||
/* validate asize */
|
||||
if (asize < 0) { /* FIXME: A zero-size array makes no sense */
|
||||
if (asize < sizeof(*array)) {
|
||||
dev_err(scomp->dev, "error: invalid array size 0x%x\n",
|
||||
asize);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue