Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A significant amount of fixes have been piled up at this time.

- Possible Spectre v1 coverage in OSS sequencer API, control API,
HD-audio hwdep ioctl, ASIHPI hwdep ioctl, OPL3, and HDSPM/RME
channel_info API.

- A regression fix in PCM delay reporting that happened at the code
refactoring for the set_fs() removal

- The long-standing bug in PCM sync_ptr ioctl that missed the audio
timestamp field

- USB-audio regression fixes due to the recent UAC2 jack support

- vm_fault_t conversions in a couple of places

- ASoC topology API fixes

- Assorted driver fixes:
* ASoC rsnd, FSL, Intel SST, DMIC, AMD, ADAU17x1, Realtek codec
* FireWire typo fix
* HD-audio quirks and USB-audio Dell fixup
* USB-audio UAC3 corrections"

* tag 'sound-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits)
ALSA: dice: fix error path to destroy initialized stream data
ALSA: hda - Skip jack and others for non-existing PCM streams
ALSA: hda/realtek - change the location for one of two front mics
ALSA: rme9652: Hardening for potential Spectre v1
ALSA: hdspm: Hardening for potential Spectre v1
ALSA: asihpi: Hardening for potential Spectre v1
ALSA: opl3: Hardening for potential Spectre v1
ALSA: hda: Hardening for potential Spectre v1
ALSA: control: Hardening for potential Spectre v1
ALSA: seq: oss: Hardening for potential Spectre v1
ALSA: seq: oss: Fix unbalanced use lock for synth MIDI device
ALSA: hda/realtek - Update ALC255 depop optimize
ALSA: hda/realtek - Add some fixes for ALC233
ALSA: pcm: Change return type to vm_fault_t
ALSA: usx2y: Change return type to vm_fault_t
ALSA: usb-audio: ADC3: Fix channel mapping conversion for ADC3.
ALSA: dice: fix OUI for TC group
ALSA: usb-audio: Skip broken EU on Dell dock USB-audio
ALSA: usb-audio: Fix missing endian conversion
ALSA: usb-audio: Fix forgotten conversion of control query functions
...

+244 -127
+5 -2
include/sound/control.h
··· 23 23 */ 24 24 25 25 #include <linux/wait.h> 26 + #include <linux/nospec.h> 26 27 #include <sound/asound.h> 27 28 28 29 #define snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data) ··· 149 148 150 149 static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) 151 150 { 152 - return id->numid - kctl->id.numid; 151 + unsigned int ioff = id->numid - kctl->id.numid; 152 + return array_index_nospec(ioff, kctl->count); 153 153 } 154 154 155 155 static inline unsigned int snd_ctl_get_ioffidx(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) 156 156 { 157 - return id->index - kctl->id.index; 157 + unsigned int ioff = id->index - kctl->id.index; 158 + return array_index_nospec(ioff, kctl->count); 158 159 } 159 160 160 161 static inline unsigned int snd_ctl_get_ioff(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
+1 -1
sound/core/control.c
··· 1492 1492 int op_flag) 1493 1493 { 1494 1494 struct snd_ctl_tlv header; 1495 - unsigned int *container; 1495 + unsigned int __user *container; 1496 1496 unsigned int container_size; 1497 1497 struct snd_kcontrol *kctl; 1498 1498 struct snd_ctl_elem_id id;
+4 -3
sound/core/pcm_compat.c
··· 27 27 s32 __user *src) 28 28 { 29 29 snd_pcm_sframes_t delay; 30 + int err; 30 31 31 - delay = snd_pcm_delay(substream); 32 - if (delay < 0) 33 - return delay; 32 + err = snd_pcm_delay(substream, &delay); 33 + if (err) 34 + return err; 34 35 if (put_user(delay, src)) 35 36 return -EFAULT; 36 37 return 0;
+15 -15
sound/core/pcm_native.c
··· 2692 2692 return err; 2693 2693 } 2694 2694 2695 - static snd_pcm_sframes_t snd_pcm_delay(struct snd_pcm_substream *substream) 2695 + static int snd_pcm_delay(struct snd_pcm_substream *substream, 2696 + snd_pcm_sframes_t *delay) 2696 2697 { 2697 2698 struct snd_pcm_runtime *runtime = substream->runtime; 2698 2699 int err; ··· 2709 2708 n += runtime->delay; 2710 2709 } 2711 2710 snd_pcm_stream_unlock_irq(substream); 2712 - return err < 0 ? err : n; 2711 + if (!err) 2712 + *delay = n; 2713 + return err; 2713 2714 } 2714 2715 2715 2716 static int snd_pcm_sync_ptr(struct snd_pcm_substream *substream, ··· 2754 2751 sync_ptr.s.status.hw_ptr = status->hw_ptr; 2755 2752 sync_ptr.s.status.tstamp = status->tstamp; 2756 2753 sync_ptr.s.status.suspended_state = status->suspended_state; 2754 + sync_ptr.s.status.audio_tstamp = status->audio_tstamp; 2757 2755 snd_pcm_stream_unlock_irq(substream); 2758 2756 if (copy_to_user(_sync_ptr, &sync_ptr, sizeof(sync_ptr))) 2759 2757 return -EFAULT; ··· 2920 2916 return snd_pcm_hwsync(substream); 2921 2917 case SNDRV_PCM_IOCTL_DELAY: 2922 2918 { 2923 - snd_pcm_sframes_t delay = snd_pcm_delay(substream); 2919 + snd_pcm_sframes_t delay; 2924 2920 snd_pcm_sframes_t __user *res = arg; 2921 + int err; 2925 2922 2926 - if (delay < 0) 2927 - return delay; 2923 + err = snd_pcm_delay(substream, &delay); 2924 + if (err) 2925 + return err; 2928 2926 if (put_user(delay, res)) 2929 2927 return -EFAULT; 2930 2928 return 0; ··· 3014 3008 case SNDRV_PCM_IOCTL_DROP: 3015 3009 return snd_pcm_drop(substream); 3016 3010 case SNDRV_PCM_IOCTL_DELAY: 3017 - { 3018 - result = snd_pcm_delay(substream); 3019 - if (result < 0) 3020 - return result; 3021 - *frames = result; 3022 - return 0; 3023 - } 3011 + return snd_pcm_delay(substream, frames); 3024 3012 default: 3025 3013 return -EINVAL; 3026 3014 } ··· 3234 3234 /* 3235 3235 * mmap status record 3236 3236 */ 3237 - static int snd_pcm_mmap_status_fault(struct vm_fault *vmf) 3237 + static vm_fault_t snd_pcm_mmap_status_fault(struct vm_fault *vmf) 3238 3238 { 3239 3239 struct snd_pcm_substream *substream = vmf->vma->vm_private_data; 3240 3240 struct snd_pcm_runtime *runtime; ··· 3270 3270 /* 3271 3271 * mmap control record 3272 3272 */ 3273 - static int snd_pcm_mmap_control_fault(struct vm_fault *vmf) 3273 + static vm_fault_t snd_pcm_mmap_control_fault(struct vm_fault *vmf) 3274 3274 { 3275 3275 struct snd_pcm_substream *substream = vmf->vma->vm_private_data; 3276 3276 struct snd_pcm_runtime *runtime; ··· 3359 3359 /* 3360 3360 * fault callback for mmapping a RAM page 3361 3361 */ 3362 - static int snd_pcm_mmap_data_fault(struct vm_fault *vmf) 3362 + static vm_fault_t snd_pcm_mmap_data_fault(struct vm_fault *vmf) 3363 3363 { 3364 3364 struct snd_pcm_substream *substream = vmf->vma->vm_private_data; 3365 3365 struct snd_pcm_runtime *runtime;
+9 -6
sound/core/seq/oss/seq_oss_event.c
··· 26 26 #include <sound/seq_oss_legacy.h> 27 27 #include "seq_oss_readq.h" 28 28 #include "seq_oss_writeq.h" 29 + #include <linux/nospec.h> 29 30 30 31 31 32 /* ··· 288 287 { 289 288 struct seq_oss_synthinfo *info; 290 289 291 - if (!snd_seq_oss_synth_is_valid(dp, dev)) 290 + info = snd_seq_oss_synth_info(dp, dev); 291 + if (!info) 292 292 return -ENXIO; 293 293 294 - info = &dp->synths[dev]; 295 294 switch (info->arg.event_passing) { 296 295 case SNDRV_SEQ_OSS_PROCESS_EVENTS: 297 296 if (! info->ch || ch < 0 || ch >= info->nr_voices) { ··· 299 298 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev); 300 299 } 301 300 301 + ch = array_index_nospec(ch, info->nr_voices); 302 302 if (note == 255 && info->ch[ch].note >= 0) { 303 303 /* volume control */ 304 304 int type; ··· 349 347 { 350 348 struct seq_oss_synthinfo *info; 351 349 352 - if (!snd_seq_oss_synth_is_valid(dp, dev)) 350 + info = snd_seq_oss_synth_info(dp, dev); 351 + if (!info) 353 352 return -ENXIO; 354 353 355 - info = &dp->synths[dev]; 356 354 switch (info->arg.event_passing) { 357 355 case SNDRV_SEQ_OSS_PROCESS_EVENTS: 358 356 if (! info->ch || ch < 0 || ch >= info->nr_voices) { ··· 360 358 return set_note_event(dp, dev, SNDRV_SEQ_EVENT_NOTEON, ch, note, vel, ev); 361 359 } 362 360 361 + ch = array_index_nospec(ch, info->nr_voices); 363 362 if (info->ch[ch].note >= 0) { 364 363 note = info->ch[ch].note; 365 364 info->ch[ch].vel = 0; ··· 384 381 static int 385 382 set_note_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int note, int vel, struct snd_seq_event *ev) 386 383 { 387 - if (! snd_seq_oss_synth_is_valid(dp, dev)) 384 + if (!snd_seq_oss_synth_info(dp, dev)) 388 385 return -ENXIO; 389 386 390 387 ev->type = type; ··· 402 399 static int 403 400 set_control_event(struct seq_oss_devinfo *dp, int dev, int type, int ch, int param, int val, struct snd_seq_event *ev) 404 401 { 405 - if (! snd_seq_oss_synth_is_valid(dp, dev)) 402 + if (!snd_seq_oss_synth_info(dp, dev)) 406 403 return -ENXIO; 407 404 408 405 ev->type = type;
+2
sound/core/seq/oss/seq_oss_midi.c
··· 29 29 #include "../seq_lock.h" 30 30 #include <linux/init.h> 31 31 #include <linux/slab.h> 32 + #include <linux/nospec.h> 32 33 33 34 34 35 /* ··· 316 315 { 317 316 if (dev < 0 || dev >= dp->max_mididev) 318 317 return NULL; 318 + dev = array_index_nospec(dev, dp->max_mididev); 319 319 return get_mdev(dev); 320 320 } 321 321
+49 -36
sound/core/seq/oss/seq_oss_synth.c
··· 26 26 #include <linux/init.h> 27 27 #include <linux/module.h> 28 28 #include <linux/slab.h> 29 + #include <linux/nospec.h> 29 30 30 31 /* 31 32 * constants ··· 340 339 dp->max_synthdev = 0; 341 340 } 342 341 343 - /* 344 - * check if the specified device is MIDI mapped device 345 - */ 346 - static int 347 - is_midi_dev(struct seq_oss_devinfo *dp, int dev) 342 + static struct seq_oss_synthinfo * 343 + get_synthinfo_nospec(struct seq_oss_devinfo *dp, int dev) 348 344 { 349 345 if (dev < 0 || dev >= dp->max_synthdev) 350 - return 0; 351 - if (dp->synths[dev].is_midi) 352 - return 1; 353 - return 0; 346 + return NULL; 347 + dev = array_index_nospec(dev, SNDRV_SEQ_OSS_MAX_SYNTH_DEVS); 348 + return &dp->synths[dev]; 354 349 } 355 350 356 351 /* ··· 356 359 get_synthdev(struct seq_oss_devinfo *dp, int dev) 357 360 { 358 361 struct seq_oss_synth *rec; 359 - if (dev < 0 || dev >= dp->max_synthdev) 362 + struct seq_oss_synthinfo *info = get_synthinfo_nospec(dp, dev); 363 + 364 + if (!info) 360 365 return NULL; 361 - if (! dp->synths[dev].opened) 366 + if (!info->opened) 362 367 return NULL; 363 - if (dp->synths[dev].is_midi) 364 - return &midi_synth_dev; 365 - if ((rec = get_sdev(dev)) == NULL) 366 - return NULL; 368 + if (info->is_midi) { 369 + rec = &midi_synth_dev; 370 + snd_use_lock_use(&rec->use_lock); 371 + } else { 372 + rec = get_sdev(dev); 373 + if (!rec) 374 + return NULL; 375 + } 367 376 if (! rec->opened) { 368 377 snd_use_lock_free(&rec->use_lock); 369 378 return NULL; ··· 405 402 struct seq_oss_synth *rec; 406 403 struct seq_oss_synthinfo *info; 407 404 408 - if (snd_BUG_ON(dev < 0 || dev >= dp->max_synthdev)) 409 - return; 410 - info = &dp->synths[dev]; 411 - if (! info->opened) 405 + info = get_synthinfo_nospec(dp, dev); 406 + if (!info || !info->opened) 412 407 return; 413 408 if (info->sysex) 414 409 info->sysex->len = 0; /* reset sysex */ ··· 455 454 const char __user *buf, int p, int c) 456 455 { 457 456 struct seq_oss_synth *rec; 457 + struct seq_oss_synthinfo *info; 458 458 int rc; 459 459 460 - if (dev < 0 || dev >= dp->max_synthdev) 460 + info = get_synthinfo_nospec(dp, dev); 461 + if (!info) 461 462 return -ENXIO; 462 463 463 - if (is_midi_dev(dp, dev)) 464 + if (info->is_midi) 464 465 return 0; 465 466 if ((rec = get_synthdev(dp, dev)) == NULL) 466 467 return -ENXIO; ··· 470 467 if (rec->oper.load_patch == NULL) 471 468 rc = -ENXIO; 472 469 else 473 - rc = rec->oper.load_patch(&dp->synths[dev].arg, fmt, buf, p, c); 470 + rc = rec->oper.load_patch(&info->arg, fmt, buf, p, c); 474 471 snd_use_lock_free(&rec->use_lock); 475 472 return rc; 476 473 } 477 474 478 475 /* 479 - * check if the device is valid synth device 476 + * check if the device is valid synth device and return the synth info 480 477 */ 481 - int 482 - snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev) 478 + struct seq_oss_synthinfo * 479 + snd_seq_oss_synth_info(struct seq_oss_devinfo *dp, int dev) 483 480 { 484 481 struct seq_oss_synth *rec; 482 + 485 483 rec = get_synthdev(dp, dev); 486 484 if (rec) { 487 485 snd_use_lock_free(&rec->use_lock); 488 - return 1; 486 + return get_synthinfo_nospec(dp, dev); 489 487 } 490 - return 0; 488 + return NULL; 491 489 } 492 490 493 491 ··· 503 499 int i, send; 504 500 unsigned char *dest; 505 501 struct seq_oss_synth_sysex *sysex; 502 + struct seq_oss_synthinfo *info; 506 503 507 - if (! snd_seq_oss_synth_is_valid(dp, dev)) 504 + info = snd_seq_oss_synth_info(dp, dev); 505 + if (!info) 508 506 return -ENXIO; 509 507 510 - sysex = dp->synths[dev].sysex; 508 + sysex = info->sysex; 511 509 if (sysex == NULL) { 512 510 sysex = kzalloc(sizeof(*sysex), GFP_KERNEL); 513 511 if (sysex == NULL) 514 512 return -ENOMEM; 515 - dp->synths[dev].sysex = sysex; 513 + info->sysex = sysex; 516 514 } 517 515 518 516 send = 0; ··· 559 553 int 560 554 snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev) 561 555 { 562 - if (! snd_seq_oss_synth_is_valid(dp, dev)) 556 + struct seq_oss_synthinfo *info = snd_seq_oss_synth_info(dp, dev); 557 + 558 + if (!info) 563 559 return -EINVAL; 564 - snd_seq_oss_fill_addr(dp, ev, dp->synths[dev].arg.addr.client, 565 - dp->synths[dev].arg.addr.port); 560 + snd_seq_oss_fill_addr(dp, ev, info->arg.addr.client, 561 + info->arg.addr.port); 566 562 return 0; 567 563 } 568 564 ··· 576 568 snd_seq_oss_synth_ioctl(struct seq_oss_devinfo *dp, int dev, unsigned int cmd, unsigned long addr) 577 569 { 578 570 struct seq_oss_synth *rec; 571 + struct seq_oss_synthinfo *info; 579 572 int rc; 580 573 581 - if (is_midi_dev(dp, dev)) 574 + info = get_synthinfo_nospec(dp, dev); 575 + if (!info || info->is_midi) 582 576 return -ENXIO; 583 577 if ((rec = get_synthdev(dp, dev)) == NULL) 584 578 return -ENXIO; 585 579 if (rec->oper.ioctl == NULL) 586 580 rc = -ENXIO; 587 581 else 588 - rc = rec->oper.ioctl(&dp->synths[dev].arg, cmd, addr); 582 + rc = rec->oper.ioctl(&info->arg, cmd, addr); 589 583 snd_use_lock_free(&rec->use_lock); 590 584 return rc; 591 585 } ··· 599 589 int 600 590 snd_seq_oss_synth_raw_event(struct seq_oss_devinfo *dp, int dev, unsigned char *data, struct snd_seq_event *ev) 601 591 { 602 - if (! snd_seq_oss_synth_is_valid(dp, dev) || is_midi_dev(dp, dev)) 592 + struct seq_oss_synthinfo *info; 593 + 594 + info = snd_seq_oss_synth_info(dp, dev); 595 + if (!info || info->is_midi) 603 596 return -ENXIO; 604 597 ev->type = SNDRV_SEQ_EVENT_OSS; 605 598 memcpy(ev->data.raw8.d, data, 8);
+2 -1
sound/core/seq/oss/seq_oss_synth.h
··· 37 37 void snd_seq_oss_synth_reset(struct seq_oss_devinfo *dp, int dev); 38 38 int snd_seq_oss_synth_load_patch(struct seq_oss_devinfo *dp, int dev, int fmt, 39 39 const char __user *buf, int p, int c); 40 - int snd_seq_oss_synth_is_valid(struct seq_oss_devinfo *dp, int dev); 40 + struct seq_oss_synthinfo *snd_seq_oss_synth_info(struct seq_oss_devinfo *dp, 41 + int dev); 41 42 int snd_seq_oss_synth_sysex(struct seq_oss_devinfo *dp, int dev, unsigned char *buf, 42 43 struct snd_seq_event *ev); 43 44 int snd_seq_oss_synth_addr(struct seq_oss_devinfo *dp, int dev, struct snd_seq_event *ev);
+5 -2
sound/drivers/opl3/opl3_synth.c
··· 21 21 22 22 #include <linux/slab.h> 23 23 #include <linux/export.h> 24 + #include <linux/nospec.h> 24 25 #include <sound/opl3.h> 25 26 #include <sound/asound_fm.h> 26 27 ··· 449 448 { 450 449 unsigned short reg_side; 451 450 unsigned char op_offset; 452 - unsigned char voice_offset; 451 + unsigned char voice_offset, voice_op; 453 452 454 453 unsigned short opl3_reg; 455 454 unsigned char reg_val; ··· 474 473 voice_offset = voice->voice - MAX_OPL2_VOICES; 475 474 } 476 475 /* Get register offset of operator */ 477 - op_offset = snd_opl3_regmap[voice_offset][voice->op]; 476 + voice_offset = array_index_nospec(voice_offset, MAX_OPL2_VOICES); 477 + voice_op = array_index_nospec(voice->op, 4); 478 + op_offset = snd_opl3_regmap[voice_offset][voice_op]; 478 479 479 480 reg_val = 0x00; 480 481 /* Set amplitude modulation (tremolo) effect */
+1 -1
sound/firewire/dice/dice-stream.c
··· 435 435 err = init_stream(dice, AMDTP_IN_STREAM, i); 436 436 if (err < 0) { 437 437 for (; i >= 0; i--) 438 - destroy_stream(dice, AMDTP_OUT_STREAM, i); 438 + destroy_stream(dice, AMDTP_IN_STREAM, i); 439 439 goto end; 440 440 } 441 441 }
+1 -1
sound/firewire/dice/dice.c
··· 14 14 #define OUI_WEISS 0x001c6a 15 15 #define OUI_LOUD 0x000ff2 16 16 #define OUI_FOCUSRITE 0x00130e 17 - #define OUI_TCELECTRONIC 0x001486 17 + #define OUI_TCELECTRONIC 0x000166 18 18 19 19 #define DICE_CATEGORY_ID 0x04 20 20 #define WEISS_CATEGORY_ID 0x00
+9 -4
sound/pci/asihpi/hpimsginit.c
··· 23 23 24 24 #include "hpi_internal.h" 25 25 #include "hpimsginit.h" 26 + #include <linux/nospec.h> 26 27 27 28 /* The actual message size for each object type */ 28 29 static u16 msg_size[HPI_OBJ_MAXINDEX + 1] = HPI_MESSAGE_SIZE_BY_OBJECT; ··· 40 39 { 41 40 u16 size; 42 41 43 - if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) 42 + if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) { 43 + object = array_index_nospec(object, HPI_OBJ_MAXINDEX + 1); 44 44 size = msg_size[object]; 45 - else 45 + } else { 46 46 size = sizeof(*phm); 47 + } 47 48 48 49 memset(phm, 0, size); 49 50 phm->size = size; ··· 69 66 { 70 67 u16 size; 71 68 72 - if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) 69 + if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) { 70 + object = array_index_nospec(object, HPI_OBJ_MAXINDEX + 1); 73 71 size = res_size[object]; 74 - else 72 + } else { 75 73 size = sizeof(*phr); 74 + } 76 75 77 76 memset(phr, 0, sizeof(*phr)); 78 77 phr->size = size;
+3 -1
sound/pci/asihpi/hpioctl.c
··· 33 33 #include <linux/stringify.h> 34 34 #include <linux/module.h> 35 35 #include <linux/vmalloc.h> 36 + #include <linux/nospec.h> 36 37 37 38 #ifdef MODULE_FIRMWARE 38 39 MODULE_FIRMWARE("asihpi/dsp5000.bin"); ··· 187 186 struct hpi_adapter *pa = NULL; 188 187 189 188 if (hm->h.adapter_index < ARRAY_SIZE(adapters)) 190 - pa = &adapters[hm->h.adapter_index]; 189 + pa = &adapters[array_index_nospec(hm->h.adapter_index, 190 + ARRAY_SIZE(adapters))]; 191 191 192 192 if (!pa || !pa->adapter || !pa->adapter->type) { 193 193 hpi_init_response(&hr->r0, hm->h.object,
+11 -1
sound/pci/hda/hda_hwdep.c
··· 21 21 #include <linux/init.h> 22 22 #include <linux/slab.h> 23 23 #include <linux/compat.h> 24 + #include <linux/nospec.h> 24 25 #include <sound/core.h> 25 26 #include "hda_codec.h" 26 27 #include "hda_local.h" ··· 52 51 53 52 if (get_user(verb, &arg->verb)) 54 53 return -EFAULT; 55 - res = get_wcaps(codec, verb >> 24); 54 + /* open-code get_wcaps(verb>>24) with nospec */ 55 + verb >>= 24; 56 + if (verb < codec->core.start_nid || 57 + verb >= codec->core.start_nid + codec->core.num_nodes) { 58 + res = 0; 59 + } else { 60 + verb -= codec->core.start_nid; 61 + verb = array_index_nospec(verb, codec->core.num_nodes); 62 + res = codec->wcaps[verb]; 63 + } 56 64 if (put_user(res, &arg->res)) 57 65 return -EFAULT; 58 66 return 0;
+8 -1
sound/pci/hda/patch_hdmi.c
··· 1383 1383 pcm = get_pcm_rec(spec, per_pin->pcm_idx); 1384 1384 else 1385 1385 return; 1386 + if (!pcm->pcm) 1387 + return; 1386 1388 if (!test_bit(per_pin->pcm_idx, &spec->pcm_in_use)) 1387 1389 return; 1388 1390 ··· 2153 2151 int dev, err; 2154 2152 int pin_idx, pcm_idx; 2155 2153 2156 - 2157 2154 for (pcm_idx = 0; pcm_idx < spec->pcm_used; pcm_idx++) { 2155 + if (!get_pcm_rec(spec, pcm_idx)->pcm) { 2156 + /* no PCM: mark this for skipping permanently */ 2157 + set_bit(pcm_idx, &spec->pcm_bitmap); 2158 + continue; 2159 + } 2160 + 2158 2161 err = generic_hdmi_build_jack(codec, pcm_idx); 2159 2162 if (err < 0) 2160 2163 return err;
+5
sound/pci/hda/patch_realtek.c
··· 331 331 /* fallthrough */ 332 332 case 0x10ec0215: 333 333 case 0x10ec0233: 334 + case 0x10ec0235: 334 335 case 0x10ec0236: 335 336 case 0x10ec0255: 336 337 case 0x10ec0256: ··· 6576 6575 SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 6577 6576 SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), 6578 6577 SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 6578 + SND_PCI_QUIRK(0x17aa, 0x312f, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 6579 6579 SND_PCI_QUIRK(0x17aa, 0x3138, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 6580 6580 SND_PCI_QUIRK(0x17aa, 0x313c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), 6581 6581 SND_PCI_QUIRK(0x17aa, 0x3112, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), ··· 7162 7160 case 0x10ec0298: 7163 7161 spec->codec_variant = ALC269_TYPE_ALC298; 7164 7162 break; 7163 + case 0x10ec0235: 7165 7164 case 0x10ec0255: 7166 7165 spec->codec_variant = ALC269_TYPE_ALC255; 7166 + spec->shutup = alc256_shutup; 7167 + spec->init_hook = alc256_init; 7167 7168 break; 7168 7169 case 0x10ec0236: 7169 7170 case 0x10ec0256:
+14 -10
sound/pci/rme9652/hdspm.c
··· 137 137 #include <linux/pci.h> 138 138 #include <linux/math64.h> 139 139 #include <linux/io.h> 140 + #include <linux/nospec.h> 140 141 141 142 #include <sound/core.h> 142 143 #include <sound/control.h> ··· 5699 5698 struct snd_pcm_channel_info *info) 5700 5699 { 5701 5700 struct hdspm *hdspm = snd_pcm_substream_chip(substream); 5701 + unsigned int channel = info->channel; 5702 5702 5703 5703 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 5704 - if (snd_BUG_ON(info->channel >= hdspm->max_channels_out)) { 5704 + if (snd_BUG_ON(channel >= hdspm->max_channels_out)) { 5705 5705 dev_info(hdspm->card->dev, 5706 5706 "snd_hdspm_channel_info: output channel out of range (%d)\n", 5707 - info->channel); 5707 + channel); 5708 5708 return -EINVAL; 5709 5709 } 5710 5710 5711 - if (hdspm->channel_map_out[info->channel] < 0) { 5711 + channel = array_index_nospec(channel, hdspm->max_channels_out); 5712 + if (hdspm->channel_map_out[channel] < 0) { 5712 5713 dev_info(hdspm->card->dev, 5713 5714 "snd_hdspm_channel_info: output channel %d mapped out\n", 5714 - info->channel); 5715 + channel); 5715 5716 return -EINVAL; 5716 5717 } 5717 5718 5718 - info->offset = hdspm->channel_map_out[info->channel] * 5719 + info->offset = hdspm->channel_map_out[channel] * 5719 5720 HDSPM_CHANNEL_BUFFER_BYTES; 5720 5721 } else { 5721 - if (snd_BUG_ON(info->channel >= hdspm->max_channels_in)) { 5722 + if (snd_BUG_ON(channel >= hdspm->max_channels_in)) { 5722 5723 dev_info(hdspm->card->dev, 5723 5724 "snd_hdspm_channel_info: input channel out of range (%d)\n", 5724 - info->channel); 5725 + channel); 5725 5726 return -EINVAL; 5726 5727 } 5727 5728 5728 - if (hdspm->channel_map_in[info->channel] < 0) { 5729 + channel = array_index_nospec(channel, hdspm->max_channels_in); 5730 + if (hdspm->channel_map_in[channel] < 0) { 5729 5731 dev_info(hdspm->card->dev, 5730 5732 "snd_hdspm_channel_info: input channel %d mapped out\n", 5731 - info->channel); 5733 + channel); 5732 5734 return -EINVAL; 5733 5735 } 5734 5736 5735 - info->offset = hdspm->channel_map_in[info->channel] * 5737 + info->offset = hdspm->channel_map_in[channel] * 5736 5738 HDSPM_CHANNEL_BUFFER_BYTES; 5737 5739 } 5738 5740
+4 -2
sound/pci/rme9652/rme9652.c
··· 26 26 #include <linux/pci.h> 27 27 #include <linux/module.h> 28 28 #include <linux/io.h> 29 + #include <linux/nospec.h> 29 30 30 31 #include <sound/core.h> 31 32 #include <sound/control.h> ··· 2072 2071 if (snd_BUG_ON(info->channel >= RME9652_NCHANNELS)) 2073 2072 return -EINVAL; 2074 2073 2075 - if ((chn = rme9652->channel_map[info->channel]) < 0) { 2074 + chn = rme9652->channel_map[array_index_nospec(info->channel, 2075 + RME9652_NCHANNELS)]; 2076 + if (chn < 0) 2076 2077 return -EINVAL; 2077 - } 2078 2078 2079 2079 info->offset = chn * RME9652_CHANNEL_BUFFER_BYTES; 2080 2080 info->first = 0;
+1 -1
sound/soc/amd/acp-da7219-max98357a.c
··· 43 43 #define DUAL_CHANNEL 2 44 44 45 45 static struct snd_soc_jack cz_jack; 46 - struct clk *da7219_dai_clk; 46 + static struct clk *da7219_dai_clk; 47 47 48 48 static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) 49 49 {
+20 -6
sound/soc/codecs/adau17x1.c
··· 502 502 } 503 503 504 504 if (adau->sigmadsp) { 505 - ret = adau17x1_setup_firmware(adau, params_rate(params)); 505 + ret = adau17x1_setup_firmware(component, params_rate(params)); 506 506 if (ret < 0) 507 507 return ret; 508 508 } ··· 835 835 } 836 836 EXPORT_SYMBOL_GPL(adau17x1_volatile_register); 837 837 838 - int adau17x1_setup_firmware(struct adau *adau, unsigned int rate) 838 + int adau17x1_setup_firmware(struct snd_soc_component *component, 839 + unsigned int rate) 839 840 { 840 841 int ret; 841 - int dspsr; 842 + int dspsr, dsp_run; 843 + struct adau *adau = snd_soc_component_get_drvdata(component); 844 + struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); 845 + 846 + snd_soc_dapm_mutex_lock(dapm); 842 847 843 848 ret = regmap_read(adau->regmap, ADAU17X1_DSP_SAMPLING_RATE, &dspsr); 844 849 if (ret) 845 - return ret; 850 + goto err; 851 + 852 + ret = regmap_read(adau->regmap, ADAU17X1_DSP_RUN, &dsp_run); 853 + if (ret) 854 + goto err; 846 855 847 856 regmap_write(adau->regmap, ADAU17X1_DSP_ENABLE, 1); 848 857 regmap_write(adau->regmap, ADAU17X1_DSP_SAMPLING_RATE, 0xf); 858 + regmap_write(adau->regmap, ADAU17X1_DSP_RUN, 0); 849 859 850 860 ret = sigmadsp_setup(adau->sigmadsp, rate); 851 861 if (ret) { 852 862 regmap_write(adau->regmap, ADAU17X1_DSP_ENABLE, 0); 853 - return ret; 863 + goto err; 854 864 } 855 865 regmap_write(adau->regmap, ADAU17X1_DSP_SAMPLING_RATE, dspsr); 866 + regmap_write(adau->regmap, ADAU17X1_DSP_RUN, dsp_run); 856 867 857 - return 0; 868 + err: 869 + snd_soc_dapm_mutex_unlock(dapm); 870 + 871 + return ret; 858 872 } 859 873 EXPORT_SYMBOL_GPL(adau17x1_setup_firmware); 860 874
+2 -1
sound/soc/codecs/adau17x1.h
··· 68 68 69 69 extern const struct snd_soc_dai_ops adau17x1_dai_ops; 70 70 71 - int adau17x1_setup_firmware(struct adau *adau, unsigned int rate); 71 + int adau17x1_setup_firmware(struct snd_soc_component *component, 72 + unsigned int rate); 72 73 bool adau17x1_has_dsp(struct adau *adau); 73 74 74 75 #define ADAU17X1_CLOCK_CONTROL 0x4000
+6 -3
sound/soc/codecs/msm8916-wcd-analog.c
··· 1187 1187 return irq; 1188 1188 } 1189 1189 1190 - ret = devm_request_irq(dev, irq, pm8916_mbhc_switch_irq_handler, 1190 + ret = devm_request_threaded_irq(dev, irq, NULL, 1191 + pm8916_mbhc_switch_irq_handler, 1191 1192 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | 1192 1193 IRQF_ONESHOT, 1193 1194 "mbhc switch irq", priv); ··· 1202 1201 return irq; 1203 1202 } 1204 1203 1205 - ret = devm_request_irq(dev, irq, mbhc_btn_press_irq_handler, 1204 + ret = devm_request_threaded_irq(dev, irq, NULL, 1205 + mbhc_btn_press_irq_handler, 1206 1206 IRQF_TRIGGER_RISING | 1207 1207 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 1208 1208 "mbhc btn press irq", priv); ··· 1216 1214 return irq; 1217 1215 } 1218 1216 1219 - ret = devm_request_irq(dev, irq, mbhc_btn_release_irq_handler, 1217 + ret = devm_request_threaded_irq(dev, irq, NULL, 1218 + mbhc_btn_release_irq_handler, 1220 1219 IRQF_TRIGGER_RISING | 1221 1220 IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 1222 1221 "mbhc btn release irq", priv);
+3
sound/soc/codecs/rt5514.c
··· 89 89 {RT5514_PLL3_CALIB_CTRL5, 0x40220012}, 90 90 {RT5514_DELAY_BUF_CTRL1, 0x7fff006a}, 91 91 {RT5514_DELAY_BUF_CTRL3, 0x00000000}, 92 + {RT5514_ASRC_IN_CTRL1, 0x00000003}, 92 93 {RT5514_DOWNFILTER0_CTRL1, 0x00020c2f}, 93 94 {RT5514_DOWNFILTER0_CTRL2, 0x00020c2f}, 94 95 {RT5514_DOWNFILTER0_CTRL3, 0x10000362}, ··· 182 181 case RT5514_PLL3_CALIB_CTRL5: 183 182 case RT5514_DELAY_BUF_CTRL1: 184 183 case RT5514_DELAY_BUF_CTRL3: 184 + case RT5514_ASRC_IN_CTRL1: 185 185 case RT5514_DOWNFILTER0_CTRL1: 186 186 case RT5514_DOWNFILTER0_CTRL2: 187 187 case RT5514_DOWNFILTER0_CTRL3: ··· 240 238 case RT5514_DSP_MAPPING | RT5514_PLL3_CALIB_CTRL5: 241 239 case RT5514_DSP_MAPPING | RT5514_DELAY_BUF_CTRL1: 242 240 case RT5514_DSP_MAPPING | RT5514_DELAY_BUF_CTRL3: 241 + case RT5514_DSP_MAPPING | RT5514_ASRC_IN_CTRL1: 243 242 case RT5514_DSP_MAPPING | RT5514_DOWNFILTER0_CTRL1: 244 243 case RT5514_DSP_MAPPING | RT5514_DOWNFILTER0_CTRL2: 245 244 case RT5514_DSP_MAPPING | RT5514_DOWNFILTER0_CTRL3:
+7
sound/soc/fsl/fsl_esai.c
··· 144 144 145 145 psr = ratio <= 256 * maxfp ? ESAI_xCCR_xPSR_BYPASS : ESAI_xCCR_xPSR_DIV8; 146 146 147 + /* Do not loop-search if PM (1 ~ 256) alone can serve the ratio */ 148 + if (ratio <= 256) { 149 + pm = ratio; 150 + fp = 1; 151 + goto out; 152 + } 153 + 147 154 /* Set the max fluctuation -- 0.1% of the max devisor */ 148 155 savesub = (psr ? 1 : 8) * 256 * maxfp / 1000; 149 156
+11 -3
sound/soc/fsl/fsl_ssi.c
··· 217 217 * @dai_fmt: DAI configuration this device is currently used with 218 218 * @streams: Mask of current active streams: BIT(TX) and BIT(RX) 219 219 * @i2s_net: I2S and Network mode configurations of SCR register 220 + * (this is the initial settings based on the DAI format) 220 221 * @synchronous: Use synchronous mode - both of TX and RX use STCK and SFCK 221 222 * @use_dma: DMA is used or FIQ with stream filter 222 223 * @use_dual_fifo: DMA with support for dual FIFO mode ··· 830 829 } 831 830 832 831 if (!fsl_ssi_is_ac97(ssi)) { 832 + /* 833 + * Keep the ssi->i2s_net intact while having a local variable 834 + * to override settings for special use cases. Otherwise, the 835 + * ssi->i2s_net will lose the settings for regular use cases. 836 + */ 837 + u8 i2s_net = ssi->i2s_net; 838 + 833 839 /* Normal + Network mode to send 16-bit data in 32-bit frames */ 834 840 if (fsl_ssi_is_i2s_cbm_cfs(ssi) && sample_size == 16) 835 - ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET; 841 + i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET; 836 842 837 843 /* Use Normal mode to send mono data at 1st slot of 2 slots */ 838 844 if (channels == 1) 839 - ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL; 845 + i2s_net = SSI_SCR_I2S_MODE_NORMAL; 840 846 841 847 regmap_update_bits(regs, REG_SSI_SCR, 842 - SSI_SCR_I2S_NET_MASK, ssi->i2s_net); 848 + SSI_SCR_I2S_NET_MASK, i2s_net); 843 849 } 844 850 845 851 /* In synchronous mode, the SSI uses STCCR for capture */
+13 -9
sound/soc/intel/Kconfig
··· 72 72 for Baytrail Chromebooks but this option is now deprecated and is 73 73 not recommended, use SND_SST_ATOM_HIFI2_PLATFORM instead. 74 74 75 + config SND_SST_ATOM_HIFI2_PLATFORM 76 + tristate 77 + select SND_SOC_COMPRESS 78 + 75 79 config SND_SST_ATOM_HIFI2_PLATFORM_PCI 76 - tristate "PCI HiFi2 (Medfield, Merrifield) Platforms" 80 + tristate "PCI HiFi2 (Merrifield) Platforms" 77 81 depends on X86 && PCI 78 82 select SND_SST_IPC_PCI 79 - select SND_SOC_COMPRESS 83 + select SND_SST_ATOM_HIFI2_PLATFORM 80 84 help 81 - If you have a Intel Medfield or Merrifield/Edison platform, then 85 + If you have a Intel Merrifield/Edison platform, then 82 86 enable this option by saying Y or m. Distros will typically not 83 - enable this option: Medfield devices are not available to 84 - developers and while Merrifield/Edison can run a mainline kernel with 85 - limited functionality it will require a firmware file which 86 - is not in the standard firmware tree 87 + enable this option: while Merrifield/Edison can run a mainline 88 + kernel with limited functionality it will require a firmware file 89 + which is not in the standard firmware tree 87 90 88 - config SND_SST_ATOM_HIFI2_PLATFORM 91 + config SND_SST_ATOM_HIFI2_PLATFORM_ACPI 89 92 tristate "ACPI HiFi2 (Baytrail, Cherrytrail) Platforms" 93 + default ACPI 90 94 depends on X86 && ACPI 91 95 select SND_SST_IPC_ACPI 92 - select SND_SOC_COMPRESS 96 + select SND_SST_ATOM_HIFI2_PLATFORM 93 97 select SND_SOC_ACPI_INTEL_MATCH 94 98 select IOSF_MBI 95 99 help
+11 -3
sound/soc/omap/omap-dmic.c
··· 281 281 static int omap_dmic_select_fclk(struct omap_dmic *dmic, int clk_id, 282 282 unsigned int freq) 283 283 { 284 - struct clk *parent_clk; 284 + struct clk *parent_clk, *mux; 285 285 char *parent_clk_name; 286 286 int ret = 0; 287 287 ··· 329 329 return -ENODEV; 330 330 } 331 331 332 + mux = clk_get_parent(dmic->fclk); 333 + if (IS_ERR(mux)) { 334 + dev_err(dmic->dev, "can't get fck mux parent\n"); 335 + clk_put(parent_clk); 336 + return -ENODEV; 337 + } 338 + 332 339 mutex_lock(&dmic->mutex); 333 340 if (dmic->active) { 334 341 /* disable clock while reparenting */ 335 342 pm_runtime_put_sync(dmic->dev); 336 - ret = clk_set_parent(dmic->fclk, parent_clk); 343 + ret = clk_set_parent(mux, parent_clk); 337 344 pm_runtime_get_sync(dmic->dev); 338 345 } else { 339 - ret = clk_set_parent(dmic->fclk, parent_clk); 346 + ret = clk_set_parent(mux, parent_clk); 340 347 } 341 348 mutex_unlock(&dmic->mutex); 342 349 ··· 356 349 dmic->fclk_freq = freq; 357 350 358 351 err_busy: 352 + clk_put(mux); 359 353 clk_put(parent_clk); 360 354 361 355 return ret;
+2 -2
sound/soc/sh/rcar/core.c
··· 1536 1536 return ret; 1537 1537 } 1538 1538 1539 - static int rsnd_suspend(struct device *dev) 1539 + static int __maybe_unused rsnd_suspend(struct device *dev) 1540 1540 { 1541 1541 struct rsnd_priv *priv = dev_get_drvdata(dev); 1542 1542 ··· 1545 1545 return 0; 1546 1546 } 1547 1547 1548 - static int rsnd_resume(struct device *dev) 1548 + static int __maybe_unused rsnd_resume(struct device *dev) 1549 1549 { 1550 1550 struct rsnd_priv *priv = dev_get_drvdata(dev); 1551 1551
+9 -5
sound/soc/soc-topology.c
··· 513 513 */ 514 514 if (dobj->widget.kcontrol_type == SND_SOC_TPLG_TYPE_ENUM) { 515 515 /* enumerated widget mixer */ 516 - for (i = 0; i < w->num_kcontrols; i++) { 516 + for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) { 517 517 struct snd_kcontrol *kcontrol = w->kcontrols[i]; 518 518 struct soc_enum *se = 519 519 (struct soc_enum *)kcontrol->private_value; ··· 530 530 } 531 531 } else { 532 532 /* volume mixer or bytes controls */ 533 - for (i = 0; i < w->num_kcontrols; i++) { 533 + for (i = 0; w->kcontrols != NULL && i < w->num_kcontrols; i++) { 534 534 struct snd_kcontrol *kcontrol = w->kcontrols[i]; 535 535 536 536 if (dobj->widget.kcontrol_type ··· 1325 1325 ec->hdr.name); 1326 1326 1327 1327 kc[i].name = kstrdup(ec->hdr.name, GFP_KERNEL); 1328 - if (kc[i].name == NULL) 1328 + if (kc[i].name == NULL) { 1329 + kfree(se); 1329 1330 goto err_se; 1331 + } 1330 1332 kc[i].private_value = (long)se; 1331 1333 kc[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER; 1332 1334 kc[i].access = ec->hdr.access; ··· 1444 1442 be->hdr.name, be->hdr.access); 1445 1443 1446 1444 kc[i].name = kstrdup(be->hdr.name, GFP_KERNEL); 1447 - if (kc[i].name == NULL) 1445 + if (kc[i].name == NULL) { 1446 + kfree(sbe); 1448 1447 goto err; 1448 + } 1449 1449 kc[i].private_value = (long)sbe; 1450 1450 kc[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER; 1451 1451 kc[i].access = be->hdr.access; ··· 2580 2576 2581 2577 /* match index */ 2582 2578 if (dobj->index != index && 2583 - dobj->index != SND_SOC_TPLG_INDEX_ALL) 2579 + index != SND_SOC_TPLG_INDEX_ALL) 2584 2580 continue; 2585 2581 2586 2582 switch (dobj->type) {
+4 -3
sound/usb/mixer.c
··· 1776 1776 build_feature_ctl(state, _ftr, ch_bits, control, 1777 1777 &iterm, unitid, ch_read_only); 1778 1778 if (uac_v2v3_control_is_readable(master_bits, control)) 1779 - build_feature_ctl(state, _ftr, 0, i, &iterm, unitid, 1779 + build_feature_ctl(state, _ftr, 0, control, 1780 + &iterm, unitid, 1780 1781 !uac_v2v3_control_is_writeable(master_bits, 1781 1782 control)); 1782 1783 } ··· 1860 1859 check_input_term(state, d->bTerminalID, &iterm); 1861 1860 if (state->mixer->protocol == UAC_VERSION_2) { 1862 1861 /* Check for jack detection. */ 1863 - if (uac_v2v3_control_is_readable(d->bmControls, 1862 + if (uac_v2v3_control_is_readable(le16_to_cpu(d->bmControls), 1864 1863 UAC2_TE_CONNECTOR)) { 1865 1864 build_connector_control(state, &iterm, true); 1866 1865 } ··· 2562 2561 if (err < 0 && err != -EINVAL) 2563 2562 return err; 2564 2563 2565 - if (uac_v2v3_control_is_readable(desc->bmControls, 2564 + if (uac_v2v3_control_is_readable(le16_to_cpu(desc->bmControls), 2566 2565 UAC2_TE_CONNECTOR)) { 2567 2566 build_connector_control(&state, &state.oterm, 2568 2567 false);
+3
sound/usb/mixer_maps.c
··· 353 353 /* 354 354 * Dell usb dock with ALC4020 codec had a firmware problem where it got 355 355 * screwed up when zero volume is passed; just skip it as a workaround 356 + * 357 + * Also the extension unit gives an access error, so skip it as well. 356 358 */ 357 359 static const struct usbmix_name_map dell_alc4020_map[] = { 360 + { 4, NULL }, /* extension unit */ 358 361 { 16, NULL }, 359 362 { 19, NULL }, 360 363 { 0 }
+1 -1
sound/usb/stream.c
··· 349 349 * TODO: this conversion is not complete, update it 350 350 * after adding UAC3 values to asound.h 351 351 */ 352 - switch (is->bChPurpose) { 352 + switch (is->bChRelationship) { 353 353 case UAC3_CH_MONO: 354 354 map = SNDRV_CHMAP_MONO; 355 355 break;
+1 -1
sound/usb/usx2y/us122l.c
··· 139 139 snd_printdd(KERN_DEBUG "%i\n", atomic_read(&us122l->mmap_count)); 140 140 } 141 141 142 - static int usb_stream_hwdep_vm_fault(struct vm_fault *vmf) 142 + static vm_fault_t usb_stream_hwdep_vm_fault(struct vm_fault *vmf) 143 143 { 144 144 unsigned long offset; 145 145 struct page *page;
+1 -1
sound/usb/usx2y/usX2Yhwdep.c
··· 31 31 #include "usbusx2y.h" 32 32 #include "usX2Yhwdep.h" 33 33 34 - static int snd_us428ctls_vm_fault(struct vm_fault *vmf) 34 + static vm_fault_t snd_us428ctls_vm_fault(struct vm_fault *vmf) 35 35 { 36 36 unsigned long offset; 37 37 struct page * page;
+1 -1
sound/usb/usx2y/usx2yhwdeppcm.c
··· 652 652 } 653 653 654 654 655 - static int snd_usX2Y_hwdep_pcm_vm_fault(struct vm_fault *vmf) 655 + static vm_fault_t snd_usX2Y_hwdep_pcm_vm_fault(struct vm_fault *vmf) 656 656 { 657 657 unsigned long offset; 658 658 void *vaddr;