Skip to content

Commit ce8113a

Browse files
committed
Merge remote-tracking branch 'takashi/for-next' into sound/upstream-20241220
2 parents 45f6111 + 42d2873 commit ce8113a

10 files changed

Lines changed: 38 additions & 14 deletions

File tree

sound/core/seq/oss/seq_oss_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ snd_seq_oss_create_client(void)
111111

112112

113113
/*
114-
* receive annoucement from system port, and check the midi device
114+
* receive announcement from system port, and check the midi device
115115
*/
116116
static int
117117
receive_announce(struct snd_seq_event *ev, int direct, void *private, int atomic, int hop)

sound/core/seq/seq_clientmgr.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,10 @@ static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,
12901290
client->midi_version = client_info->midi_version;
12911291
memcpy(client->event_filter, client_info->event_filter, 32);
12921292
client->group_filter = client_info->group_filter;
1293+
1294+
/* notify the change */
1295+
snd_seq_system_client_ev_client_change(client->number);
1296+
12931297
return 0;
12941298
}
12951299

@@ -1413,6 +1417,9 @@ static int snd_seq_ioctl_set_port_info(struct snd_seq_client *client, void *arg)
14131417
if (port) {
14141418
snd_seq_set_port_info(port, info);
14151419
snd_seq_port_unlock(port);
1420+
/* notify the change */
1421+
snd_seq_system_client_ev_port_change(info->addr.client,
1422+
info->addr.port);
14161423
}
14171424
return 0;
14181425
}

sound/core/seq/seq_system.c

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ static int sysclient = -1;
4949
/* port id numbers for this client */
5050
static int announce_port = -1;
5151

52+
/* number of subscriptions to announce port */
53+
static int announce_subscribed;
5254

5355

5456
/* fill standard header data, source port & channel are filled in */
5557
static int setheader(struct snd_seq_event * ev, int client, int port)
5658
{
57-
if (announce_port < 0)
59+
if (announce_port < 0 || !announce_subscribed)
5860
return -ENODEV;
5961

6062
memset(ev, 0, sizeof(struct snd_seq_event));
@@ -104,6 +106,22 @@ static int event_input_timer(struct snd_seq_event * ev, int direct, void *privat
104106
return snd_seq_control_queue(ev, atomic, hop);
105107
}
106108

109+
static int sys_announce_subscribe(void *private_data,
110+
struct snd_seq_port_subscribe *info)
111+
{
112+
announce_subscribed++;
113+
return 0;
114+
}
115+
116+
static int sys_announce_unsubscribe(void *private_data,
117+
struct snd_seq_port_subscribe *info)
118+
{
119+
if (snd_BUG_ON(!announce_subscribed))
120+
return 0;
121+
announce_subscribed--;
122+
return 0;
123+
}
124+
107125
/* register our internal client */
108126
int __init snd_seq_system_client_init(void)
109127
{
@@ -143,7 +161,10 @@ int __init snd_seq_system_client_init(void)
143161
/* register announcement port */
144162
strcpy(port->name, "Announce");
145163
port->capability = SNDRV_SEQ_PORT_CAP_READ|SNDRV_SEQ_PORT_CAP_SUBS_READ; /* for broadcast only */
146-
port->kernel = NULL;
164+
pcallbacks.event_input = NULL;
165+
pcallbacks.subscribe = sys_announce_subscribe;
166+
pcallbacks.unsubscribe = sys_announce_unsubscribe;
167+
port->kernel = &pcallbacks;
147168
port->type = 0;
148169
port->flags = SNDRV_SEQ_PORT_FLG_GIVEN_PORT;
149170
port->addr.client = sysclient;

sound/core/seq/seq_ump_client.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@ static void update_port_infos(struct seq_ump_client *client)
272272
new);
273273
if (err < 0)
274274
continue;
275-
/* notify to system port */
276-
snd_seq_system_client_ev_port_change(client->seq_client, i);
277275
}
278276
}
279277

sound/pci/ac97/ac97_codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int m
18641864
strcat(name, " ");
18651865
strcat(name, pid->name);
18661866
if (pid->mask != 0xffffffff)
1867-
sprintf(name + strlen(name), " rev %d", id & ~pid->mask);
1867+
sprintf(name + strlen(name), " rev %u", id & ~pid->mask);
18681868
if (ac97 && pid->patch) {
18691869
if ((modem && (pid->flags & AC97_MODEM_PATCH)) ||
18701870
(! modem && ! (pid->flags & AC97_MODEM_PATCH)))

sound/pci/cmipci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,7 @@ static int snd_cmipci_create(struct snd_card *card, struct pci_dev *pci,
30843084
}
30853085
}
30863086
}
3087-
sprintf(card->shortname, "C-Media CMI%d", val);
3087+
sprintf(card->shortname, "C-Media CMI%u", val);
30883088
if (cm->chip_version < 68)
30893089
scnprintf(modelstr, sizeof(modelstr),
30903090
" (model %d)", cm->chip_version);

sound/pci/hda/hda_hwdep.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,8 @@ static int hda_hwdep_ioctl_compat(struct snd_hwdep *hw, struct file *file,
8484

8585
static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file)
8686
{
87-
#ifndef CONFIG_SND_DEBUG_VERBOSE
8887
if (!capable(CAP_SYS_RAWIO))
8988
return -EACCES;
90-
#endif
9189
return 0;
9290
}
9391

sound/pci/hda/hda_sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ static const struct hda_patch_item patch_items[NUM_LINE_MODES] = {
648648
},
649649
};
650650

651-
/* check the line starting with '[' -- change the parser mode accodingly */
651+
/* check the line starting with '[' -- change the parser mode accordingly */
652652
static int parse_line_mode(char *buf, struct hda_bus *bus)
653653
{
654654
int i;

sound/pci/lola/lola_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ unsigned int lola_sample_rate_convert(unsigned int coded)
3535
default: return 0; /* error */
3636
}
3737

38-
/* ajustement */
38+
/* adjustement */
3939
switch (coded & 0x60) {
4040
case (0 << 5): break;
4141
case (1 << 5): freq = (freq * 999) / 1000; break;

sound/pci/sonicvibes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,9 +1135,9 @@ static void snd_sonicvibes_proc_read(struct snd_info_entry *entry,
11351135
tmp == 0x00 ? "on-board ROM" :
11361136
tmp == 0x01 ? "PCI bus" : "on-board ROM + PCI bus");
11371137
tmp = sonic->mpu_switch;
1138-
snd_iprintf(buffer, "Onboard synth : %s\n", tmp & 0x01 ? "on" : "off");
1139-
snd_iprintf(buffer, "Ext. Rx to synth : %s\n", tmp & 0x02 ? "on" : "off");
1140-
snd_iprintf(buffer, "MIDI to ext. Tx : %s\n", tmp & 0x04 ? "on" : "off");
1138+
snd_iprintf(buffer, "Onboard synth : %s\n", str_on_off(tmp & 0x01));
1139+
snd_iprintf(buffer, "Ext. Rx to synth : %s\n", str_on_off(tmp & 0x02));
1140+
snd_iprintf(buffer, "MIDI to ext. Tx : %s\n", str_on_off(tmp & 0x04));
11411141
}
11421142

11431143
static void snd_sonicvibes_proc_init(struct sonicvibes *sonic)

0 commit comments

Comments
 (0)