aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/seq/oss/seq_oss_ioctl.c2
-rw-r--r--sound/core/seq/oss/seq_oss_rw.c2
-rw-r--r--sound/firewire/amdtp-am824.c2
-rw-r--r--sound/hda/hdac_device.c18
-rw-r--r--sound/pci/hda/patch_realtek.c8
-rw-r--r--sound/usb/line6/pcm.c5
-rw-r--r--sound/usb/mixer_quirks.c4
7 files changed, 27 insertions, 14 deletions
diff --git a/sound/core/seq/oss/seq_oss_ioctl.c b/sound/core/seq/oss/seq_oss_ioctl.c
index 96ad01fb668c..ccf682689ec9 100644
--- a/sound/core/seq/oss/seq_oss_ioctl.c
+++ b/sound/core/seq/oss/seq_oss_ioctl.c
@@ -49,7 +49,7 @@ static int snd_seq_oss_oob_user(struct seq_oss_devinfo *dp, void __user *arg)
49 if (copy_from_user(ev, arg, 8)) 49 if (copy_from_user(ev, arg, 8))
50 return -EFAULT; 50 return -EFAULT;
51 memset(&tmpev, 0, sizeof(tmpev)); 51 memset(&tmpev, 0, sizeof(tmpev));
52 snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.port, dp->addr.client); 52 snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.client, dp->addr.port);
53 tmpev.time.tick = 0; 53 tmpev.time.tick = 0;
54 if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) { 54 if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) {
55 snd_seq_oss_dispatch(dp, &tmpev, 0, 0); 55 snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
diff --git a/sound/core/seq/oss/seq_oss_rw.c b/sound/core/seq/oss/seq_oss_rw.c
index 79ef430e56e1..537d5f423e20 100644
--- a/sound/core/seq/oss/seq_oss_rw.c
+++ b/sound/core/seq/oss/seq_oss_rw.c
@@ -161,7 +161,7 @@ insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
161 memset(&event, 0, sizeof(event)); 161 memset(&event, 0, sizeof(event));
162 /* set dummy -- to be sure */ 162 /* set dummy -- to be sure */
163 event.type = SNDRV_SEQ_EVENT_NOTEOFF; 163 event.type = SNDRV_SEQ_EVENT_NOTEOFF;
164 snd_seq_oss_fill_addr(dp, &event, dp->addr.port, dp->addr.client); 164 snd_seq_oss_fill_addr(dp, &event, dp->addr.client, dp->addr.port);
165 165
166 if (snd_seq_oss_process_event(dp, rec, &event)) 166 if (snd_seq_oss_process_event(dp, rec, &event))
167 return 0; /* invalid event - no need to insert queue */ 167 return 0; /* invalid event - no need to insert queue */
diff --git a/sound/firewire/amdtp-am824.c b/sound/firewire/amdtp-am824.c
index cc6eb30f03a2..71168728940a 100644
--- a/sound/firewire/amdtp-am824.c
+++ b/sound/firewire/amdtp-am824.c
@@ -320,7 +320,7 @@ static void read_midi_messages(struct amdtp_stream *s,
320 u8 *b; 320 u8 *b;
321 321
322 for (f = 0; f < frames; f++) { 322 for (f = 0; f < frames; f++) {
323 port = (s->data_block_counter + f) % 8; 323 port = (8 - s->tx_first_dbc + s->data_block_counter + f) % 8;
324 b = (u8 *)&buffer[p->midi_position]; 324 b = (u8 *)&buffer[p->midi_position];
325 325
326 len = b[0] - 0x80; 326 len = b[0] - 0x80;
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 6907dbefd08c..3842f9d34b7c 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -400,27 +400,33 @@ static void setup_fg_nodes(struct hdac_device *codec)
400int snd_hdac_refresh_widgets(struct hdac_device *codec, bool sysfs) 400int snd_hdac_refresh_widgets(struct hdac_device *codec, bool sysfs)
401{ 401{
402 hda_nid_t start_nid; 402 hda_nid_t start_nid;
403 int nums, err; 403 int nums, err = 0;
404 404
405 /*
406 * Serialize against multiple threads trying to update the sysfs
407 * widgets array.
408 */
409 mutex_lock(&codec->widget_lock);
405 nums = snd_hdac_get_sub_nodes(codec, codec->afg, &start_nid); 410 nums = snd_hdac_get_sub_nodes(codec, codec->afg, &start_nid);
406 if (!start_nid || nums <= 0 || nums >= 0xff) { 411 if (!start_nid || nums <= 0 || nums >= 0xff) {
407 dev_err(&codec->dev, "cannot read sub nodes for FG 0x%02x\n", 412 dev_err(&codec->dev, "cannot read sub nodes for FG 0x%02x\n",
408 codec->afg); 413 codec->afg);
409 return -EINVAL; 414 err = -EINVAL;
415 goto unlock;
410 } 416 }
411 417
412 if (sysfs) { 418 if (sysfs) {
413 mutex_lock(&codec->widget_lock);
414 err = hda_widget_sysfs_reinit(codec, start_nid, nums); 419 err = hda_widget_sysfs_reinit(codec, start_nid, nums);
415 mutex_unlock(&codec->widget_lock);
416 if (err < 0) 420 if (err < 0)
417 return err; 421 goto unlock;
418 } 422 }
419 423
420 codec->num_nodes = nums; 424 codec->num_nodes = nums;
421 codec->start_nid = start_nid; 425 codec->start_nid = start_nid;
422 codec->end_nid = start_nid + nums; 426 codec->end_nid = start_nid + nums;
423 return 0; 427unlock:
428 mutex_unlock(&codec->widget_lock);
429 return err;
424} 430}
425EXPORT_SYMBOL_GPL(snd_hdac_refresh_widgets); 431EXPORT_SYMBOL_GPL(snd_hdac_refresh_widgets);
426 432
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 5b3c26991f26..6f3a35949cdd 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2448,9 +2448,10 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
2448 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950), 2448 SND_PCI_QUIRK(0x1558, 0x9501, "Clevo P950HR", ALC1220_FIXUP_CLEVO_P950),
2449 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950), 2449 SND_PCI_QUIRK(0x1558, 0x95e1, "Clevo P95xER", ALC1220_FIXUP_CLEVO_P950),
2450 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950), 2450 SND_PCI_QUIRK(0x1558, 0x95e2, "Clevo P950ER", ALC1220_FIXUP_CLEVO_P950),
2451 SND_PCI_QUIRK(0x1558, 0x96e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2451 SND_PCI_QUIRK(0x1558, 0x96e1, "Clevo P960[ER][CDFN]-K", ALC1220_FIXUP_CLEVO_P950),
2452 SND_PCI_QUIRK(0x1558, 0x97e1, "System76 Oryx Pro (oryp5)", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2452 SND_PCI_QUIRK(0x1558, 0x97e1, "Clevo P970[ER][CDFN]", ALC1220_FIXUP_CLEVO_P950),
2453 SND_PCI_QUIRK(0x1558, 0x65d1, "Tuxedo Book XC1509", ALC1220_FIXUP_CLEVO_PB51ED_PINS), 2453 SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2454 SND_PCI_QUIRK(0x1558, 0x67d1, "Clevo PB71[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
2454 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD), 2455 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo laptop", ALC882_FIXUP_EAPD),
2455 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD), 2456 SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_FIXUP_EAPD),
2456 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530), 2457 SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Y530", ALC882_FIXUP_LENOVO_Y530),
@@ -7074,6 +7075,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
7074 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 7075 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
7075 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 7076 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY),
7076 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7077 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7078 SND_PCI_QUIRK(0x17aa, 0x3111, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7077 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7079 SND_PCI_QUIRK(0x17aa, 0x312a, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7078 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7080 SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
7079 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 7081 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION),
diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c
index 21127e4958b2..2c03e0f6bf72 100644
--- a/sound/usb/line6/pcm.c
+++ b/sound/usb/line6/pcm.c
@@ -556,6 +556,11 @@ int line6_init_pcm(struct usb_line6 *line6,
556 line6pcm->max_packet_size_out = 556 line6pcm->max_packet_size_out =
557 usb_maxpacket(line6->usbdev, 557 usb_maxpacket(line6->usbdev,
558 usb_sndisocpipe(line6->usbdev, ep_write), 1); 558 usb_sndisocpipe(line6->usbdev, ep_write), 1);
559 if (!line6pcm->max_packet_size_in || !line6pcm->max_packet_size_out) {
560 dev_err(line6pcm->line6->ifcdev,
561 "cannot get proper max packet size\n");
562 return -EINVAL;
563 }
559 564
560 spin_lock_init(&line6pcm->out.lock); 565 spin_lock_init(&line6pcm->out.lock);
561 spin_lock_init(&line6pcm->in.lock); 566 spin_lock_init(&line6pcm->in.lock);
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 1f6011f36bb0..199fa157a411 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -741,7 +741,7 @@ static int snd_ni_control_init_val(struct usb_mixer_interface *mixer,
741 return err; 741 return err;
742 } 742 }
743 743
744 kctl->private_value |= (value << 24); 744 kctl->private_value |= ((unsigned int)value << 24);
745 return 0; 745 return 0;
746} 746}
747 747
@@ -902,7 +902,7 @@ static int snd_ftu_eff_switch_init(struct usb_mixer_interface *mixer,
902 if (err < 0) 902 if (err < 0)
903 return err; 903 return err;
904 904
905 kctl->private_value |= value[0] << 24; 905 kctl->private_value |= (unsigned int)value[0] << 24;
906 return 0; 906 return 0;
907} 907}
908 908