Skip to content

Commit 988355b

Browse files
committed
Merge remote-tracking branch 'takashi/for-next' into sound/upstream-20250502
2 parents efd3ba1 + 9fa6a69 commit 988355b

74 files changed

Lines changed: 1134 additions & 3461 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5654,7 +5654,6 @@ F: include/sound/cs*
56545654
F: sound/pci/hda/cirrus*
56555655
F: sound/pci/hda/cs*
56565656
F: sound/pci/hda/hda_component*
5657-
F: sound/pci/hda/hda_cs_dsp_ctl.*
56585657
F: sound/soc/codecs/cs*
56595658

56605659
CIRRUS LOGIC HAPTIC DRIVERS

include/sound/tas2781-comlib-i2c.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
//
3+
// ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier
4+
//
5+
// Copyright (C) 2025 Texas Instruments Incorporated
6+
// https://www.ti.com
7+
//
8+
// The TAS2563/TAS2781 driver implements a flexible and configurable
9+
// algo coefficient setting for one, two, or even multiple
10+
// TAS2563/TAS2781 chips.
11+
//
12+
// Author: Shenghao Ding <shenghao-ding@ti.com>
13+
//
14+
15+
#ifndef __TAS2781_COMLIB_I2C_H__
16+
#define __TAS2781_COMLIB_I2C_H__
17+
18+
void tasdevice_reset(struct tasdevice_priv *tas_dev);
19+
int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
20+
struct module *module,
21+
void (*cont)(const struct firmware *fw, void *context));
22+
struct tasdevice_priv *tasdevice_kzalloc(struct i2c_client *i2c);
23+
int tasdevice_init(struct tasdevice_priv *tas_priv);
24+
int tasdev_chn_switch(struct tasdevice_priv *tas_priv,
25+
unsigned short chn);
26+
int tasdevice_dev_update_bits(
27+
struct tasdevice_priv *tasdevice, unsigned short chn,
28+
unsigned int reg, unsigned int mask, unsigned int value);
29+
int tasdevice_amp_putvol(struct tasdevice_priv *tas_priv,
30+
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
31+
int tasdevice_amp_getvol(struct tasdevice_priv *tas_priv,
32+
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
33+
int tasdevice_digital_getvol(struct tasdevice_priv *tas_priv,
34+
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
35+
int tasdevice_digital_putvol(struct tasdevice_priv *tas_priv,
36+
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
37+
#endif /* __TAS2781_COMLIB_I2C_H__ */

include/sound/tas2781.h

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
SNDRV_PCM_FMTBIT_S24_LE | \
3333
SNDRV_PCM_FMTBIT_S32_LE)
3434

35+
#define TASDEVICE_CRC8_POLYNOMIAL 0x4d
36+
3537
/* PAGE Control Register (available in page0 of each book) */
3638
#define TASDEVICE_PAGE_SELECT 0x00
3739
#define TASDEVICE_BOOKCTL_PAGE 0x00
@@ -193,6 +195,7 @@ struct tasdevice_priv {
193195
bool force_fwload_status;
194196
bool playback_started;
195197
bool isacpi;
198+
bool isspi;
196199
bool is_user_space_calidata;
197200
unsigned int global_addr;
198201

@@ -210,41 +213,31 @@ struct tasdevice_priv {
210213
int (*tasdevice_load_block)(struct tasdevice_priv *tas_priv,
211214
struct tasdev_blk *block);
212215

216+
int (*change_chn_book)(struct tasdevice_priv *tas_priv,
217+
unsigned short chn, int book);
218+
int (*update_bits)(struct tasdevice_priv *tas_priv,
219+
unsigned short chn, unsigned int reg, unsigned int mask,
220+
unsigned int value);
221+
int (*dev_read)(struct tasdevice_priv *tas_priv,
222+
unsigned short chn, unsigned int reg, unsigned int *value);
223+
int (*dev_bulk_read)(struct tasdevice_priv *tas_priv,
224+
unsigned short chn, unsigned int reg, unsigned char *p_data,
225+
unsigned int n_length);
213226
int (*save_calibration)(struct tasdevice_priv *tas_priv);
214227
void (*apply_calibration)(struct tasdevice_priv *tas_priv);
215228
};
216229

217-
void tasdevice_reset(struct tasdevice_priv *tas_dev);
218-
int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
219-
struct module *module,
220-
void (*cont)(const struct firmware *fw, void *context));
221-
struct tasdevice_priv *tasdevice_kzalloc(struct i2c_client *i2c);
222-
int tasdevice_init(struct tasdevice_priv *tas_priv);
223-
void tasdevice_remove(struct tasdevice_priv *tas_priv);
224-
int tasdevice_save_calibration(struct tasdevice_priv *tas_priv);
225-
void tasdevice_apply_calibration(struct tasdevice_priv *tas_priv);
226-
int tasdev_chn_switch(struct tasdevice_priv *tas_priv,
227-
unsigned short chn);
228230
int tasdevice_dev_read(struct tasdevice_priv *tas_priv,
229231
unsigned short chn, unsigned int reg, unsigned int *value);
232+
int tasdevice_dev_bulk_read(struct tasdevice_priv *tas_priv,
233+
unsigned short chn, unsigned int reg, unsigned char *p_data,
234+
unsigned int n_length);
230235
int tasdevice_dev_write(struct tasdevice_priv *tas_priv,
231236
unsigned short chn, unsigned int reg, unsigned int value);
232237
int tasdevice_dev_bulk_write(
233238
struct tasdevice_priv *tas_priv, unsigned short chn,
234239
unsigned int reg, unsigned char *p_data, unsigned int n_length);
235-
int tasdevice_dev_bulk_read(struct tasdevice_priv *tas_priv,
236-
unsigned short chn, unsigned int reg, unsigned char *p_data,
237-
unsigned int n_length);
238-
int tasdevice_dev_update_bits(
239-
struct tasdevice_priv *tasdevice, unsigned short chn,
240-
unsigned int reg, unsigned int mask, unsigned int value);
241-
int tasdevice_amp_putvol(struct tasdevice_priv *tas_priv,
242-
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
243-
int tasdevice_amp_getvol(struct tasdevice_priv *tas_priv,
244-
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
245-
int tasdevice_digital_putvol(struct tasdevice_priv *tas_priv,
246-
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
247-
int tasdevice_digital_getvol(struct tasdevice_priv *tas_priv,
248-
struct snd_ctl_elem_value *ucontrol, struct soc_mixer_control *mc);
249-
240+
void tasdevice_remove(struct tasdevice_priv *tas_priv);
241+
int tasdevice_save_calibration(struct tasdevice_priv *tas_priv);
242+
void tasdevice_apply_calibration(struct tasdevice_priv *tas_priv);
250243
#endif /* __TAS2781_H__ */

sound/core/pcm_memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size)
458458
substream->stream,
459459
size, dmab) < 0) {
460460
kfree(dmab);
461-
pr_debug("ALSA pcmC%dD%d%c,%d:%s: cannot preallocate for size %zu\n",
461+
pr_debug("ALSA pcmC%dD%d%c,%d:%s: cannot allocate for size %zu\n",
462462
substream->pcm->card->number, substream->pcm->device,
463463
substream->stream ? 'c' : 'p', substream->number,
464464
substream->pcm->name, size);

sound/pci/ad1889.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,11 @@ snd_ad1889_create(struct snd_card *card, struct pci_dev *pci)
810810
chip->irq = -1;
811811

812812
/* (1) PCI resource allocation */
813-
err = pcim_iomap_regions(pci, 1 << 0, card->driver);
814-
if (err < 0)
815-
return err;
813+
chip->iobase = pcim_iomap_region(pci, 0, card->driver);
814+
if (IS_ERR(chip->iobase))
815+
return PTR_ERR(chip->iobase);
816816

817817
chip->bar = pci_resource_start(pci, 0);
818-
chip->iobase = pcim_iomap_table(pci)[0];
819818

820819
pci_set_master(pci);
821820

sound/pci/ali5451/ali5451.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1989,7 +1989,7 @@ static int snd_ali_resources(struct snd_ali *codec)
19891989
int err;
19901990

19911991
dev_dbg(codec->card->dev, "resources allocation ...\n");
1992-
err = pci_request_regions(codec->pci, "ALI 5451");
1992+
err = pcim_request_all_regions(codec->pci, "ALI 5451");
19931993
if (err < 0)
19941994
return err;
19951995
codec->port = pci_resource_start(codec->pci, 0);

sound/pci/als300.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ static int snd_als300_create(struct snd_card *card,
617617
chip->chip_type = chip_type;
618618
spin_lock_init(&chip->reg_lock);
619619

620-
err = pci_request_regions(pci, "ALS300");
620+
err = pcim_request_all_regions(pci, "ALS300");
621621
if (err < 0)
622622
return err;
623623

sound/pci/als4000.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static int __snd_card_als4000_probe(struct pci_dev *pci,
836836
return -ENXIO;
837837
}
838838

839-
err = pci_request_regions(pci, "ALS4000");
839+
err = pcim_request_all_regions(pci, "ALS4000");
840840
if (err < 0)
841841
return err;
842842
iobase = pci_resource_start(pci, 0);

sound/pci/atiixp.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,11 +1544,10 @@ static int snd_atiixp_init(struct snd_card *card, struct pci_dev *pci)
15441544
chip->card = card;
15451545
chip->pci = pci;
15461546
chip->irq = -1;
1547-
err = pcim_iomap_regions(pci, 1 << 0, "ATI IXP AC97");
1548-
if (err < 0)
1549-
return err;
1547+
chip->remap_addr = pcim_iomap_region(pci, 0, "ATI IXP AC97");
1548+
if (IS_ERR(chip->remap_addr))
1549+
return PTR_ERR(chip->remap_addr);
15501550
chip->addr = pci_resource_start(pci, 0);
1551-
chip->remap_addr = pcim_iomap_table(pci)[0];
15521551

15531552
if (devm_request_irq(&pci->dev, pci->irq, snd_atiixp_interrupt,
15541553
IRQF_SHARED, KBUILD_MODNAME, chip)) {

sound/pci/atiixp_modem.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,11 +1174,10 @@ static int snd_atiixp_init(struct snd_card *card, struct pci_dev *pci)
11741174
chip->card = card;
11751175
chip->pci = pci;
11761176
chip->irq = -1;
1177-
err = pcim_iomap_regions(pci, 1 << 0, "ATI IXP MC97");
1178-
if (err < 0)
1179-
return err;
1177+
chip->remap_addr = pcim_iomap_region(pci, 0, "ATI IXP MC97");
1178+
if (IS_ERR(chip->remap_addr))
1179+
return PTR_ERR(chip->remap_addr);
11801180
chip->addr = pci_resource_start(pci, 0);
1181-
chip->remap_addr = pcim_iomap_table(pci)[0];
11821181

11831182
if (devm_request_irq(&pci->dev, pci->irq, snd_atiixp_interrupt,
11841183
IRQF_SHARED, KBUILD_MODNAME, chip)) {

0 commit comments

Comments
 (0)