Pull sound updates from Takashi Iwai: "It's been busy summer weeks and hence lots of changes, partly for a few new drivers and partly for a wide range of fixes. Here are highlights: ALSA Core: - Fix rawmidi buffer management, code cleanup / refactoring - Fix the SG-buffer page handling with incorrect fallback size - Fix the stall at virmidi trigger callback with a large buffer; also offloading and code-refactoring along with it - Various ALSA sequencer code cleanups ASoC: - Deploy the standard snd_pcm_stop_xrun() helper in several drivers - Support for providing name prefixes to generic component nodes - Quite a few fixes for DPCM as it gains a bit wider use and more robust testing - Generalization of the DIO2125 support to a simple amplifier driver - Accessory detection support for the audio graph card - DT support for PXA AC'97 devices - Quirks for a number of new x86 systems - Support for AM Logic Meson, Everest ES7154, Intel systems with RT5682, Qualcomm QDSP6 and WCD9335, Realtek RT5682 and TI TAS5707 HD-audio: - Code refactoring in HD-audio ext codec codes to drop own classes; preliminary works for the upcoming legacy codec support - Generalized DRM audio component for the upcoming radeon / amdgpu support - Unification of mic mute-LED and GPIO support for various codecs - Further improvement of CA0132 codec support including Recon3D - Proper vga_switcheroo handling for AMD i-GPU - Update of model list in documentation - Fixups for another HP Spectre x360, Conexant codecs, power-save blacklist update USB-audio: - Fix the invalid sample rate setup with external clock - Support of UAC3 selector units and processing units - Basic UAC3 power-domain support - Support for Encore mDSD and Thesycon-based DSD devices - Preparation for future complete callback changes Firewire: - Add support for MOTU Traveler Misc: - The endianess notation fixes in various drivers - Add fall-through comment in lots of drivers - Various sparse warning fixes, e.g. about PCM format types" * tag 'sound-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (529 commits) ASoC: adav80x: mark expected switch fall-through ASoC: da7219: Add delays to capture path to remove DC offset noise ALSA: usb-audio: Mark expected switch fall-through ALSA: mixart: Mark expected switch fall-through ALSA: opl3: Mark expected switch fall-through ALSA: hda/ca0132 - Add exit commands for Recon3D ALSA: hda/ca0132 - Change mixer controls for Recon3D ALSA: hda/ca0132 - Add Recon3D input and output select commands ALSA: hda/ca0132 - Add DSP setup defaults for Recon3D ALSA: hda/ca0132 - Add Recon3D startup functions and setup ALSA: hda/ca0132 - Add bool variable to enable/disable pci region2 mmio ALSA: hda/ca0132 - Add Recon3D pincfg ALSA: hda/ca0132 - Add quirk ID and enum for Recon3D ALSA: hda/ca0132 - Add alt_functions unsolicited response ALSA: hda/ca0132 - Clean up ca0132_init function. ALSA: hda/ca0132 - Create mmio gpio function to make code clearer ASoC: wm_adsp: Make DSP name configurable by codec driver ASoC: wm_adsp: Declare firmware controls from codec driver ASoC: max98373: Added software reset register to readable registers ASoC: wm_adsp: Correct DSP pointer for preloader control ...
Showing the changes to include/uapi/linux (1 of 498 files). Show all
Unified · Split
| @@ -390,33 +390,64 @@ static inline __u8 uac_processing_unit_iChannelNames(struct uac_processing_unit_ · 389 unmodified lines | ||
| 390 | 390 | static inline __u8 uac_processing_unit_bControlSize(struct uac_processing_unit_descriptor *desc, |
| 391 | 391 | int protocol) |
| 392 | 392 | { |
| 393 | − return (protocol == UAC_VERSION_1) ? | |
| 394 | − desc->baSourceID[desc->bNrInPins + 4] : | |
| 395 | − 2; /* in UAC2, this value is constant */ | |
| 393 | + switch (protocol) { | |
| 394 | + case UAC_VERSION_1: | |
| 395 | + return desc->baSourceID[desc->bNrInPins + 4]; | |
| 396 | + case UAC_VERSION_2: | |
| 397 | + return 2; /* in UAC2, this value is constant */ | |
| 398 | + case UAC_VERSION_3: | |
| 399 | + return 4; /* in UAC3, this value is constant */ | |
| 400 | + default: | |
| 401 | + return 1; | |
| 402 | + } | |
| 396 | 403 | } |
| 397 | 404 | |
| 398 | 405 | static inline __u8 *uac_processing_unit_bmControls(struct uac_processing_unit_descriptor *desc, |
| 399 | 406 | int protocol) |
| 400 | 407 | { |
| 401 | − return (protocol == UAC_VERSION_1) ? | |
| 402 | − &desc->baSourceID[desc->bNrInPins + 5] : | |
| 403 | − &desc->baSourceID[desc->bNrInPins + 6]; | |
| 408 | + switch (protocol) { | |
| 409 | + case UAC_VERSION_1: | |
| 410 | + return &desc->baSourceID[desc->bNrInPins + 5]; | |
| 411 | + case UAC_VERSION_2: | |
| 412 | + return &desc->baSourceID[desc->bNrInPins + 6]; | |
| 413 | + case UAC_VERSION_3: | |
| 414 | + return &desc->baSourceID[desc->bNrInPins + 2]; | |
| 415 | + default: | |
| 416 | + return NULL; | |
| 417 | + } | |
| 404 | 418 | } |
| 405 | 419 | |
| 406 | 420 | static inline __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc, |
| 407 | 421 | int protocol) |
| 408 | 422 | { |
| 409 | 423 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); |
| 410 | − return *(uac_processing_unit_bmControls(desc, protocol) | |
| 411 | − + control_size); | |
| 424 | + | |
| 425 | + switch (protocol) { | |
| 426 | + case UAC_VERSION_1: | |
| 427 | + case UAC_VERSION_2: | |
| 428 | + default: | |
| 429 | + return *(uac_processing_unit_bmControls(desc, protocol) | |
| 430 | + + control_size); | |
| 431 | + case UAC_VERSION_3: | |
| 432 | + return 0; /* UAC3 does not have this field */ | |
| 433 | + } | |
| 412 | 434 | } |
| 413 | 435 | |
| 414 | 436 | static inline __u8 *uac_processing_unit_specific(struct uac_processing_unit_descriptor *desc, |
| 415 | 437 | int protocol) |
| 416 | 438 | { |
| 417 | 439 | __u8 control_size = uac_processing_unit_bControlSize(desc, protocol); |
| 418 | − return uac_processing_unit_bmControls(desc, protocol) | |
| 440 | + | |
| 441 | + switch (protocol) { | |
| 442 | + case UAC_VERSION_1: | |
| 443 | + case UAC_VERSION_2: | |
| 444 | + default: | |
| 445 | + return uac_processing_unit_bmControls(desc, protocol) | |
| 419 | 446 | + control_size + 1; |
| 447 | + case UAC_VERSION_3: | |
| 448 | + return uac_processing_unit_bmControls(desc, protocol) | |
| 449 | + + control_size; | |
| 450 | + } | |
| 420 | 451 | } |
| 421 | 452 | |
| 422 | 453 | /* 4.5.2 Class-Specific AS Interface Descriptor */ |