Skip to content

Commit 0e65612

Browse files
committed
Merge remote-tracking branch 'takashi/for-next' into sound/upstream-20251111
2 parents e4dbcab + 4b1b92b commit 0e65612

12 files changed

Lines changed: 96 additions & 17 deletions

File tree

sound/ac97_bus.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ static bool snd_ac97_check_id(struct snd_ac97 *ac97, unsigned int id,
4646
* @id_mask: Mask that is applied to the device ID before comparing to @id
4747
*
4848
* This function resets the AC'97 device. If @try_warm is true the function
49-
* first performs a warm reset. If the warm reset is successful the function
50-
* returns 1. Otherwise or if @try_warm is false the function issues cold reset
51-
* followed by a warm reset. If this is successful the function returns 0,
52-
* otherwise a negative error code. If @id is 0 any valid device ID will be
53-
* accepted, otherwise only the ID that matches @id and @id_mask is accepted.
49+
* first performs a warm reset. If @try_warm is false the function issues
50+
* cold reset followed by a warm reset. If @id is 0 any valid device ID
51+
* will be accepted, otherwise only the ID that matches @id and @id_mask
52+
* is accepted.
53+
* Returns:
54+
* * %1 - if warm reset is successful
55+
* * %0 - if cold reset and warm reset is successful
56+
* * %-ENODEV - if @id and @id_mask not matching
5457
*/
5558
int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id,
5659
unsigned int id_mask)

sound/firewire/dice/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
snd-dice-y := dice-transaction.o dice-stream.o dice-proc.o dice-midi.o \
33
dice-pcm.o dice-hwdep.o dice.o dice-tcelectronic.o \
44
dice-alesis.o dice-extension.o dice-mytek.o dice-presonus.o \
5-
dice-harman.o dice-focusrite.o dice-weiss.o
5+
dice-harman.o dice-focusrite.o dice-weiss.o dice-teac.o
66
obj-$(CONFIG_SND_DICE) += snd-dice.o

sound/firewire/dice/dice-teac.c

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
// dice-teac.c - a part of driver for DICE based devices
3+
//
4+
// Copyright (c) 2025 Takashi Sakamoto
5+
6+
#include "dice.h"
7+
8+
int snd_dice_detect_teac_formats(struct snd_dice *dice)
9+
{
10+
__be32 reg;
11+
u32 data;
12+
int err;
13+
14+
err = snd_dice_transaction_read_tx(dice, TX_NUMBER, &reg, sizeof(reg));
15+
if (err < 0)
16+
return err;
17+
18+
dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16;
19+
dice->tx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16;
20+
dice->tx_midi_ports[0] = 1;
21+
22+
data = be32_to_cpu(reg);
23+
if (data > 1) {
24+
dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16;
25+
dice->tx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16;
26+
}
27+
28+
err = snd_dice_transaction_read_rx(dice, RX_NUMBER, &reg, sizeof(reg));
29+
if (err < 0)
30+
return err;
31+
32+
dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_LOW] = 16;
33+
dice->rx_pcm_chs[0][SND_DICE_RATE_MODE_MIDDLE] = 16;
34+
dice->rx_midi_ports[0] = 1;
35+
36+
data = be32_to_cpu(reg);
37+
if (data > 1) {
38+
dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_LOW] = 16;
39+
dice->rx_pcm_chs[1][SND_DICE_RATE_MODE_MIDDLE] = 16;
40+
}
41+
42+
return 0;
43+
}

sound/firewire/dice/dice.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ MODULE_LICENSE("GPL");
2222
#define OUI_PRESONUS 0x000a92
2323
#define OUI_HARMAN 0x000fd7
2424
#define OUI_AVID 0x00a07e
25+
#define OUI_TEAC 0x00022e
2526

2627
#define DICE_CATEGORY_ID 0x04
2728
#define WEISS_CATEGORY_ID 0x00
@@ -458,6 +459,18 @@ static const struct ieee1394_device_id dice_id_table[] = {
458459
.match_flags = IEEE1394_MATCH_VERSION,
459460
.version = DICE_INTERFACE,
460461
},
462+
// Tascam IF-FW/DM MkII for DM-3200 and DM-4800.
463+
{
464+
.match_flags = IEEE1394_MATCH_VENDOR_ID |
465+
IEEE1394_MATCH_MODEL_ID |
466+
IEEE1394_MATCH_SPECIFIER_ID |
467+
IEEE1394_MATCH_VERSION,
468+
.vendor_id = OUI_TEAC,
469+
.model_id = OUI_TEAC,
470+
.specifier_id = OUI_TEAC,
471+
.version = 0x800006,
472+
.driver_data = (kernel_ulong_t)snd_dice_detect_teac_formats,
473+
},
461474
{ }
462475
};
463476
MODULE_DEVICE_TABLE(ieee1394, dice_id_table);

sound/firewire/dice/dice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,6 @@ int snd_dice_detect_presonus_formats(struct snd_dice *dice);
233233
int snd_dice_detect_harman_formats(struct snd_dice *dice);
234234
int snd_dice_detect_focusrite_pro40_tcd3070_formats(struct snd_dice *dice);
235235
int snd_dice_detect_weiss_formats(struct snd_dice *dice);
236+
int snd_dice_detect_teac_formats(struct snd_dice *dice);
236237

237238
#endif

sound/hda/codecs/senarytech.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#include "hda_jack.h"
2020
#include "generic.h"
2121

22+
/* GPIO node ID */
23+
#define SENARY_GPIO_NODE 0x01
24+
2225
struct senary_spec {
2326
struct hda_gen_spec gen;
2427

@@ -120,11 +123,11 @@ static void senary_init_gpio_led(struct hda_codec *codec)
120123
unsigned int mask = spec->gpio_mute_led_mask | spec->gpio_mic_led_mask;
121124

122125
if (mask) {
123-
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_MASK,
126+
snd_hda_codec_write(codec, SENARY_GPIO_NODE, 0, AC_VERB_SET_GPIO_MASK,
124127
mask);
125-
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DIRECTION,
128+
snd_hda_codec_write(codec, SENARY_GPIO_NODE, 0, AC_VERB_SET_GPIO_DIRECTION,
126129
mask);
127-
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
130+
snd_hda_codec_write(codec, SENARY_GPIO_NODE, 0, AC_VERB_SET_GPIO_DATA,
128131
spec->gpio_led);
129132
}
130133
}

sound/isa/wavefront/wavefront_midi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ static int snd_wavefront_midi_input_close(struct snd_rawmidi_substream *substrea
278278
return -EIO;
279279

280280
guard(spinlock_irqsave)(&midi->open);
281+
midi->substream_input[mpu] = NULL;
281282
midi->mode[mpu] &= ~MPU401_MODE_INPUT;
282283

283284
return 0;
@@ -300,6 +301,7 @@ static int snd_wavefront_midi_output_close(struct snd_rawmidi_substream *substre
300301
return -EIO;
301302

302303
guard(spinlock_irqsave)(&midi->open);
304+
midi->substream_output[mpu] = NULL;
303305
midi->mode[mpu] &= ~MPU401_MODE_OUTPUT;
304306
return 0;
305307
}

sound/isa/wavefront/wavefront_synth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,9 +950,9 @@ wavefront_send_sample (snd_wavefront_t *dev,
950950
if (header->size) {
951951
dev->freemem = wavefront_freemem (dev);
952952

953-
if (dev->freemem < (int)header->size) {
953+
if (dev->freemem < 0 || dev->freemem < header->size) {
954954
dev_err(dev->card->dev,
955-
"insufficient memory to load %d byte sample.\n",
955+
"insufficient memory to load %u byte sample.\n",
956956
header->size);
957957
return -ENOMEM;
958958
}

sound/pci/au88x0/au88x0_eq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static int vortex_Eqlzr_SetAllBandsFromActiveCoeffSet(vortex_t * vortex)
568568
eqlzr_t *eq = &(vortex->eq);
569569

570570
vortex_EqHw_SetLeftGainsTarget(vortex, eq->this130);
571-
vortex_EqHw_SetRightGainsTarget(vortex, &(eq->this130[eq->this10]));
571+
vortex_EqHw_SetRightGainsTarget(vortex, eq->this130 + eq->this10);
572572

573573
return 0;
574574
}

sound/pci/maestro3.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2571,9 +2571,9 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
25712571

25722572
if (IS_ENABLED(CONFIG_PM_SLEEP)) {
25732573
chip->suspend_mem =
2574-
vmalloc(array_size(sizeof(u16),
2575-
REV_B_CODE_MEMORY_LENGTH +
2576-
REV_B_DATA_MEMORY_LENGTH));
2574+
vmalloc_array(REV_B_CODE_MEMORY_LENGTH +
2575+
REV_B_DATA_MEMORY_LENGTH,
2576+
sizeof(u16));
25772577
if (!chip->suspend_mem)
25782578
dev_warn(card->dev, "can't allocate apm buffer\n");
25792579
}

0 commit comments

Comments
 (0)