mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-25 16:49:33 +10:00
Merge branch 'for-linus' into for-next
Sync with the pending 6.15 fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
commit
d18bbb7b8a
@ -223,7 +223,7 @@ struct hdac_driver {
|
||||
struct device_driver driver;
|
||||
int type;
|
||||
const struct hda_device_id *id_table;
|
||||
int (*match)(struct hdac_device *dev, struct hdac_driver *drv);
|
||||
int (*match)(struct hdac_device *dev, const struct hdac_driver *drv);
|
||||
void (*unsol_event)(struct hdac_device *dev, unsigned int event);
|
||||
|
||||
/* fields used by ext bus APIs */
|
||||
@ -235,7 +235,7 @@ struct hdac_driver {
|
||||
#define drv_to_hdac_driver(_drv) container_of(_drv, struct hdac_driver, driver)
|
||||
|
||||
const struct hda_device_id *
|
||||
hdac_get_device_id(struct hdac_device *hdev, struct hdac_driver *drv);
|
||||
hdac_get_device_id(struct hdac_device *hdev, const struct hdac_driver *drv);
|
||||
|
||||
/*
|
||||
* Bus verb operators
|
||||
|
@ -1402,6 +1402,8 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
|
||||
#define snd_pcm_lib_mmap_iomem NULL
|
||||
#endif
|
||||
|
||||
void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
|
||||
|
||||
/**
|
||||
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
|
||||
* @dma: DMA number
|
||||
|
@ -1074,8 +1074,7 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
|
||||
runtime->oss.params = 0;
|
||||
runtime->oss.prepare = 1;
|
||||
runtime->oss.buffer_used = 0;
|
||||
if (runtime->dma_area)
|
||||
snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
|
||||
snd_pcm_runtime_buffer_set_silence(runtime);
|
||||
|
||||
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
|
||||
|
||||
|
@ -723,6 +723,17 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
|
||||
atomic_inc(&runtime->buffer_accessing);
|
||||
}
|
||||
|
||||
/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
|
||||
void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
|
||||
{
|
||||
snd_pcm_buffer_access_lock(runtime);
|
||||
if (runtime->dma_area)
|
||||
snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
|
||||
bytes_to_samples(runtime, runtime->dma_bytes));
|
||||
snd_pcm_buffer_access_unlock(runtime);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
|
||||
#define is_oss_stream(substream) ((substream)->oss.oss)
|
||||
#else
|
||||
|
@ -43,7 +43,7 @@ MODULE_LICENSE("GPL");
|
||||
static int snd_seq_bus_match(struct device *dev, const struct device_driver *drv)
|
||||
{
|
||||
struct snd_seq_device *sdev = to_seq_dev(dev);
|
||||
struct snd_seq_driver *sdrv = to_seq_drv(drv);
|
||||
const struct snd_seq_driver *sdrv = to_seq_drv(drv);
|
||||
|
||||
return strcmp(sdrv->id, sdev->id) == 0 &&
|
||||
sdrv->argsize == sdev->argsize;
|
||||
|
@ -21,7 +21,7 @@ MODULE_LICENSE("GPL");
|
||||
* driver id_table and returns the matching device id entry.
|
||||
*/
|
||||
const struct hda_device_id *
|
||||
hdac_get_device_id(struct hdac_device *hdev, struct hdac_driver *drv)
|
||||
hdac_get_device_id(struct hdac_device *hdev, const struct hdac_driver *drv)
|
||||
{
|
||||
if (drv->id_table) {
|
||||
const struct hda_device_id *id = drv->id_table;
|
||||
@ -38,7 +38,7 @@ hdac_get_device_id(struct hdac_device *hdev, struct hdac_driver *drv)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(hdac_get_device_id);
|
||||
|
||||
static int hdac_codec_match(struct hdac_device *dev, struct hdac_driver *drv)
|
||||
static int hdac_codec_match(struct hdac_device *dev, const struct hdac_driver *drv)
|
||||
{
|
||||
if (hdac_get_device_id(dev, drv))
|
||||
return 1;
|
||||
@ -49,7 +49,7 @@ static int hdac_codec_match(struct hdac_device *dev, struct hdac_driver *drv)
|
||||
static int hda_bus_match(struct device *dev, const struct device_driver *drv)
|
||||
{
|
||||
struct hdac_device *hdev = dev_to_hdac_dev(dev);
|
||||
struct hdac_driver *hdrv = drv_to_hdac_driver(drv);
|
||||
const struct hdac_driver *hdrv = drv_to_hdac_driver(drv);
|
||||
|
||||
if (hdev->type != hdrv->type)
|
||||
return 0;
|
||||
|
@ -18,10 +18,10 @@
|
||||
/*
|
||||
* find a matching codec id
|
||||
*/
|
||||
static int hda_codec_match(struct hdac_device *dev, struct hdac_driver *drv)
|
||||
static int hda_codec_match(struct hdac_device *dev, const struct hdac_driver *drv)
|
||||
{
|
||||
struct hda_codec *codec = container_of(dev, struct hda_codec, core);
|
||||
struct hda_codec_driver *driver =
|
||||
const struct hda_codec_driver *driver =
|
||||
container_of(drv, struct hda_codec_driver, core);
|
||||
const struct hda_device_id *list;
|
||||
/* check probe_id instead of vendor_id if set */
|
||||
|
@ -6830,7 +6830,10 @@ static void alc256_fixup_chromebook(struct hda_codec *codec,
|
||||
|
||||
switch (action) {
|
||||
case HDA_FIXUP_ACT_PRE_PROBE:
|
||||
spec->gen.suppress_auto_mute = 1;
|
||||
if (codec->core.subsystem_id == 0x10280d76)
|
||||
spec->gen.suppress_auto_mute = 0;
|
||||
else
|
||||
spec->gen.suppress_auto_mute = 1;
|
||||
spec->gen.suppress_auto_mic = 1;
|
||||
spec->en_3kpull_low = false;
|
||||
break;
|
||||
@ -10892,9 +10895,12 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x103c, 0x8e1a, "HP ZBook Firefly 14 G12A", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e1b, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e1c, "HP EliteBook G12", ALC245_FIXUP_HP_ZBOOK_FIREFLY_G12A),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e1d, "HP ZBook X Gli 16 G12", ALC236_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e2c, "HP EliteBook 16 G12", ALC285_FIXUP_HP_GPIO_LED),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e36, "HP 14 Enstrom OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e37, "HP 16 Piston OmniBook X", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e3a, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e3b, "HP Agusta", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e60, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e61, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
SND_PCI_QUIRK(0x103c, 0x8e62, "HP Trekker ", ALC287_FIXUP_CS35L41_I2C_2),
|
||||
@ -11310,6 +11316,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
|
||||
SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
|
||||
SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TAS2781_I2C),
|
||||
SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TAS2781_I2C),
|
||||
|
@ -464,6 +464,28 @@ err:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int mca_fe_startup(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct mca_cluster *cl = mca_dai_to_cluster(dai);
|
||||
unsigned int mask, nchannels;
|
||||
|
||||
if (cl->tdm_slots) {
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
mask = cl->tdm_tx_mask;
|
||||
else
|
||||
mask = cl->tdm_rx_mask;
|
||||
|
||||
nchannels = hweight32(mask);
|
||||
} else {
|
||||
nchannels = 2;
|
||||
}
|
||||
|
||||
return snd_pcm_hw_constraint_minmax(substream->runtime,
|
||||
SNDRV_PCM_HW_PARAM_CHANNELS,
|
||||
1, nchannels);
|
||||
}
|
||||
|
||||
static int mca_fe_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
|
||||
unsigned int rx_mask, int slots, int slot_width)
|
||||
{
|
||||
@ -680,6 +702,7 @@ static int mca_fe_hw_params(struct snd_pcm_substream *substream,
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops mca_fe_ops = {
|
||||
.startup = mca_fe_startup,
|
||||
.set_fmt = mca_fe_set_fmt,
|
||||
.set_bclk_ratio = mca_set_bclk_ratio,
|
||||
.set_tdm_slot = mca_fe_set_tdm_slot,
|
||||
|
@ -228,6 +228,7 @@ config SND_SOC_MT8188
|
||||
config SND_SOC_MT8188_MT6359
|
||||
tristate "ASoC Audio driver for MT8188 with MT6359 and I2S codecs"
|
||||
depends on SND_SOC_MT8188 && MTK_PMIC_WRAP
|
||||
depends on SND_SOC_MT6359_ACCDET || !SND_SOC_MT6359_ACCDET
|
||||
depends on I2C
|
||||
select SND_SOC_MT6359
|
||||
select SND_SOC_HDMI_CODEC
|
||||
|
@ -91,6 +91,10 @@ static int sdm845_slim_snd_hw_params(struct snd_pcm_substream *substream,
|
||||
else
|
||||
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
|
||||
tx_ch, 0, NULL);
|
||||
if (ret != 0 && ret != -ENOTSUPP) {
|
||||
dev_err(rtd->dev, "failed to set cpu chan map, err:%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -76,7 +76,7 @@ void sof_hda_bus_init(struct snd_sof_dev *sdev, struct device *dev)
|
||||
|
||||
snd_hdac_ext_bus_init(bus, dev, &bus_core_ops, sof_hda_ext_ops);
|
||||
|
||||
if (chip && chip->hw_ip_version == SOF_INTEL_ACE_2_0)
|
||||
if (chip && chip->hw_ip_version >= SOF_INTEL_ACE_2_0)
|
||||
bus->use_pio_for_commands = true;
|
||||
#else
|
||||
snd_hdac_ext_bus_init(bus, dev, NULL, NULL);
|
||||
|
@ -1049,7 +1049,21 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev,
|
||||
if (!*mach && codec_num <= 2) {
|
||||
bool tplg_fixup = false;
|
||||
|
||||
hda_mach = snd_soc_acpi_intel_hda_machines;
|
||||
/*
|
||||
* make a local copy of the match array since we might
|
||||
* be modifying it
|
||||
*/
|
||||
hda_mach = devm_kmemdup_array(sdev->dev,
|
||||
snd_soc_acpi_intel_hda_machines,
|
||||
2, /* we have one entry + sentinel in the array */
|
||||
sizeof(snd_soc_acpi_intel_hda_machines[0]),
|
||||
GFP_KERNEL);
|
||||
if (!hda_mach) {
|
||||
dev_err(bus->dev,
|
||||
"%s: failed to duplicate the HDA match table\n",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
dev_info(bus->dev, "using HDA machine driver %s now\n",
|
||||
hda_mach->drv_name);
|
||||
|
@ -531,6 +531,14 @@ static int sof_ipc4_bytes_ext_put(struct snd_sof_control *scontrol,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Check header id */
|
||||
if (header.numid != SOF_CTRL_CMD_BINARY) {
|
||||
dev_err_ratelimited(scomp->dev,
|
||||
"Incorrect numid for bytes put %d\n",
|
||||
header.numid);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Verify the ABI header first */
|
||||
if (copy_from_user(&abi_hdr, tlvd->tlv, sizeof(abi_hdr)))
|
||||
return -EFAULT;
|
||||
@ -613,7 +621,8 @@ static int _sof_ipc4_bytes_ext_get(struct snd_sof_control *scontrol,
|
||||
if (data_size > size)
|
||||
return -ENOSPC;
|
||||
|
||||
header.numid = scontrol->comp_id;
|
||||
/* Set header id and length */
|
||||
header.numid = SOF_CTRL_CMD_BINARY;
|
||||
header.length = data_size;
|
||||
|
||||
if (copy_to_user(tlvd, &header, sizeof(struct snd_ctl_tlv)))
|
||||
|
@ -799,7 +799,8 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm
|
||||
|
||||
spcm->stream[stream].private = stream_priv;
|
||||
|
||||
if (!support_info)
|
||||
/* Delay reporting is only supported on playback */
|
||||
if (!support_info || stream == SNDRV_PCM_STREAM_CAPTURE)
|
||||
continue;
|
||||
|
||||
time_info = kzalloc(sizeof(*time_info), GFP_KERNEL);
|
||||
|
@ -1071,7 +1071,7 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp,
|
||||
struct snd_sof_dai *dai)
|
||||
{
|
||||
struct snd_soc_card *card = scomp->card;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
struct snd_soc_pcm_runtime *rtd, *full, *partial;
|
||||
struct snd_soc_dai *cpu_dai;
|
||||
int stream;
|
||||
int i;
|
||||
@ -1088,12 +1088,22 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp,
|
||||
else
|
||||
goto end;
|
||||
|
||||
full = NULL;
|
||||
partial = NULL;
|
||||
list_for_each_entry(rtd, &card->rtd_list, list) {
|
||||
/* does stream match DAI link ? */
|
||||
if (!rtd->dai_link->stream_name ||
|
||||
!strstr(rtd->dai_link->stream_name, w->sname))
|
||||
continue;
|
||||
if (rtd->dai_link->stream_name) {
|
||||
if (!strcmp(rtd->dai_link->stream_name, w->sname)) {
|
||||
full = rtd;
|
||||
break;
|
||||
} else if (strstr(rtd->dai_link->stream_name, w->sname)) {
|
||||
partial = rtd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rtd = full ? full : partial;
|
||||
if (rtd) {
|
||||
for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
|
||||
/*
|
||||
* Please create DAI widget in the right order
|
||||
|
Loading…
Reference in New Issue
Block a user