Skip to content

Commit 7dc78c7

Browse files
committed
Merge tag 'sound-6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "As usual in a late stage, we received a fair amount of fixes for ASoC, and it became bigger than wished. But all fixes are rather device- specific, and they look pretty safe to apply. A major par of changes are series of fixes for ASoC meson and SOF drivers as well as for Realtek and Cirrus codecs. In addition, recent emu10k1 regression fixes and usual HD-audio quirks are included" * tag 'sound-6.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (46 commits) ALSA: hda/realtek: Fix build error without CONFIG_PM ALSA: hda/realtek: Fix conflicting PCI SSID 17aa:386f for Lenovo Legion models ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318 ALSA: hda: intel-sdw-acpi: fix usage of device_get_named_child_node() ALSA: hda: intel-dsp-config: harden I2C/I2S codec detection ASoC: cs35l56: fix usages of device_get_named_child_node() ASoC: da7219-aad: fix usage of device_get_named_child_node() ASoC: meson: cards: select SND_DYNAMIC_MINORS ASoC: meson: axg-tdm: add continuous clock support ASoC: meson: axg-tdm-interface: manage formatters in trigger ASoC: meson: axg-card: make links nonatomic ASoC: meson: axg-fifo: use threaded irq to check periods ALSA: hda/realtek: Fix mute led of HP Laptop 15-da3001TU ALSA: emu10k1: make E-MU FPGA writes potentially more reliable ALSA: emu10k1: fix E-MU dock initialization ALSA: emu10k1: use mutex for E-MU FPGA access locking ALSA: emu10k1: move the whole GPIO event handling to the workqueue ALSA: emu10k1: factor out snd_emu1010_load_dock_firmware() ALSA: emu10k1: fix E-MU card dock presence monitoring ASoC: rt715-sdca: volume step modification ...
2 parents b5a6660 + fdb3f29 commit 7dc78c7

Some content is hidden

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

44 files changed

+704
-241
lines changed

Documentation/devicetree/bindings/sound/rt5645.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ Optional properties:
2020
a GPIO spec for the external headphone detect pin. If jd-mode = 0,
2121
we will get the JD status by getting the value of hp-detect-gpios.
2222

23+
- cbj-sleeve-gpios:
24+
a GPIO spec to control the external combo jack circuit to tie the sleeve/ring2
25+
contacts to the ground or floating. It could avoid some electric noise from the
26+
active speaker jacks.
27+
2328
- realtek,in2-differential
2429
Boolean. Indicate MIC2 input are differential, rather than single-ended.
2530

@@ -68,6 +73,7 @@ codec: rt5650@1a {
6873
compatible = "realtek,rt5650";
6974
reg = <0x1a>;
7075
hp-detect-gpios = <&gpio 19 0>;
76+
cbj-sleeve-gpios = <&gpio 20 0>;
7177
interrupt-parent = <&gpio>;
7278
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
7379
realtek,dmic-en = "true";

drivers/base/regmap/regmap.c

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2838,6 +2838,43 @@ int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val)
28382838
}
28392839
EXPORT_SYMBOL_GPL(regmap_read);
28402840

2841+
/**
2842+
* regmap_read_bypassed() - Read a value from a single register direct
2843+
* from the device, bypassing the cache
2844+
*
2845+
* @map: Register map to read from
2846+
* @reg: Register to be read from
2847+
* @val: Pointer to store read value
2848+
*
2849+
* A value of zero will be returned on success, a negative errno will
2850+
* be returned in error cases.
2851+
*/
2852+
int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned int *val)
2853+
{
2854+
int ret;
2855+
bool bypass, cache_only;
2856+
2857+
if (!IS_ALIGNED(reg, map->reg_stride))
2858+
return -EINVAL;
2859+
2860+
map->lock(map->lock_arg);
2861+
2862+
bypass = map->cache_bypass;
2863+
cache_only = map->cache_only;
2864+
map->cache_bypass = true;
2865+
map->cache_only = false;
2866+
2867+
ret = _regmap_read(map, reg, val);
2868+
2869+
map->cache_bypass = bypass;
2870+
map->cache_only = cache_only;
2871+
2872+
map->unlock(map->lock_arg);
2873+
2874+
return ret;
2875+
}
2876+
EXPORT_SYMBOL_GPL(regmap_read_bypassed);
2877+
28412878
/**
28422879
* regmap_raw_read() - Read raw data from the device
28432880
*

include/linux/regmap.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,7 @@ int regmap_multi_reg_write_bypassed(struct regmap *map,
12301230
int regmap_raw_write_async(struct regmap *map, unsigned int reg,
12311231
const void *val, size_t val_len);
12321232
int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val);
1233+
int regmap_read_bypassed(struct regmap *map, unsigned int reg, unsigned int *val);
12331234
int regmap_raw_read(struct regmap *map, unsigned int reg,
12341235
void *val, size_t val_len);
12351236
int regmap_noinc_read(struct regmap *map, unsigned int reg,
@@ -1739,6 +1740,13 @@ static inline int regmap_read(struct regmap *map, unsigned int reg,
17391740
return -EINVAL;
17401741
}
17411742

1743+
static inline int regmap_read_bypassed(struct regmap *map, unsigned int reg,
1744+
unsigned int *val)
1745+
{
1746+
WARN_ONCE(1, "regmap API is disabled");
1747+
return -EINVAL;
1748+
}
1749+
17421750
static inline int regmap_raw_read(struct regmap *map, unsigned int reg,
17431751
void *val, size_t val_len)
17441752
{

include/sound/cs35l56.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ struct cs35l56_base {
267267
bool fw_patched;
268268
bool secured;
269269
bool can_hibernate;
270+
bool fw_owns_asp1;
270271
bool cal_data_valid;
271272
s8 cal_index;
272273
struct cirrus_amp_cal_data cal_data;
@@ -283,6 +284,7 @@ extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC];
283284
extern const unsigned int cs35l56_tx_input_values[CS35L56_NUM_INPUT_SRC];
284285

285286
int cs35l56_set_patch(struct cs35l56_base *cs35l56_base);
287+
int cs35l56_init_asp1_regs_for_driver_control(struct cs35l56_base *cs35l56_base);
286288
int cs35l56_force_sync_asp1_registers_from_cache(struct cs35l56_base *cs35l56_base);
287289
int cs35l56_mbox_send(struct cs35l56_base *cs35l56_base, unsigned int command);
288290
int cs35l56_firmware_shutdown(struct cs35l56_base *cs35l56_base);

include/sound/emu10k1.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,8 +1684,8 @@ struct snd_emu1010 {
16841684
unsigned int clock_fallback;
16851685
unsigned int optical_in; /* 0:SPDIF, 1:ADAT */
16861686
unsigned int optical_out; /* 0:SPDIF, 1:ADAT */
1687-
struct work_struct firmware_work;
1688-
struct work_struct clock_work;
1687+
struct work_struct work;
1688+
struct mutex lock;
16891689
};
16901690

16911691
struct snd_emu10k1 {
@@ -1834,6 +1834,9 @@ unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, unsigned int reg,
18341834
void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data);
18351835
int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, unsigned int data);
18361836
int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
1837+
static inline void snd_emu1010_fpga_lock(struct snd_emu10k1 *emu) { mutex_lock(&emu->emu1010.lock); };
1838+
static inline void snd_emu1010_fpga_unlock(struct snd_emu10k1 *emu) { mutex_unlock(&emu->emu1010.lock); };
1839+
void snd_emu1010_fpga_write_lock(struct snd_emu10k1 *emu, u32 reg, u32 value);
18371840
void snd_emu1010_fpga_write(struct snd_emu10k1 *emu, u32 reg, u32 value);
18381841
void snd_emu1010_fpga_read(struct snd_emu10k1 *emu, u32 reg, u32 *value);
18391842
void snd_emu1010_fpga_link_dst_src_write(struct snd_emu10k1 *emu, u32 dst, u32 src);

sound/hda/intel-dsp-config.c

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,32 @@ static const struct config_entry *snd_intel_dsp_find_config
557557
if (table->codec_hid) {
558558
int i;
559559

560-
for (i = 0; i < table->codec_hid->num_codecs; i++)
561-
if (acpi_dev_present(table->codec_hid->codecs[i], NULL, -1))
560+
for (i = 0; i < table->codec_hid->num_codecs; i++) {
561+
struct nhlt_acpi_table *nhlt;
562+
bool ssp_found = false;
563+
564+
if (!acpi_dev_present(table->codec_hid->codecs[i], NULL, -1))
565+
continue;
566+
567+
nhlt = intel_nhlt_init(&pci->dev);
568+
if (!nhlt) {
569+
dev_warn(&pci->dev, "%s: NHLT table not found, skipped HID %s\n",
570+
__func__, table->codec_hid->codecs[i]);
571+
continue;
572+
}
573+
574+
if (intel_nhlt_has_endpoint_type(nhlt, NHLT_LINK_SSP) &&
575+
intel_nhlt_ssp_endpoint_mask(nhlt, NHLT_DEVICE_I2S))
576+
ssp_found = true;
577+
578+
intel_nhlt_free(nhlt);
579+
580+
if (ssp_found)
562581
break;
582+
583+
dev_warn(&pci->dev, "%s: no valid SSP found for HID %s, skipped\n",
584+
__func__, table->codec_hid->codecs[i]);
585+
}
563586
if (i == table->codec_hid->num_codecs)
564587
continue;
565588
}

sound/hda/intel-sdw-acpi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ static bool is_link_enabled(struct fwnode_handle *fw_node, u8 idx)
4545
"intel-quirk-mask",
4646
&quirk_mask);
4747

48+
fwnode_handle_put(link);
49+
4850
if (quirk_mask & SDW_INTEL_QUIRK_MASK_BUS_DISABLE)
4951
return false;
5052

sound/pci/emu10k1/emu10k1.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ static int snd_emu10k1_suspend(struct device *dev)
189189

190190
emu->suspend = 1;
191191

192-
cancel_work_sync(&emu->emu1010.firmware_work);
193-
cancel_work_sync(&emu->emu1010.clock_work);
192+
cancel_work_sync(&emu->emu1010.work);
194193

195194
snd_ac97_suspend(emu->ac97);
196195

0 commit comments

Comments
 (0)