format.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) | format.c (fa4e7a6fa12b1132340785e14bd439cbe95b7a5a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 */ 4 5#include <linux/init.h> 6#include <linux/slab.h> 7#include <linux/usb.h> 8#include <linux/usb/audio.h> --- 25 unchanged lines hidden (view full) --- 34{ 35 int sample_width, sample_bytes; 36 u64 pcm_formats = 0; 37 38 switch (fp->protocol) { 39 case UAC_VERSION_1: 40 default: { 41 struct uac_format_type_i_discrete_descriptor *fmt = _fmt; | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 */ 4 5#include <linux/init.h> 6#include <linux/slab.h> 7#include <linux/usb.h> 8#include <linux/usb/audio.h> --- 25 unchanged lines hidden (view full) --- 34{ 35 int sample_width, sample_bytes; 36 u64 pcm_formats = 0; 37 38 switch (fp->protocol) { 39 case UAC_VERSION_1: 40 default: { 41 struct uac_format_type_i_discrete_descriptor *fmt = _fmt; |
42 if (format >= 64) 43 return 0; /* invalid format */ | 42 if (format >= 64) { 43 usb_audio_info(chip, 44 "%u:%d: invalid format type 0x%llx is detected, processed as PCM\n", 45 fp->iface, fp->altsetting, format); 46 format = UAC_FORMAT_TYPE_I_PCM; 47 } |
44 sample_width = fmt->bBitResolution; 45 sample_bytes = fmt->bSubframeSize; 46 format = 1ULL << format; 47 break; 48 } 49 50 case UAC_VERSION_2: { 51 struct uac_format_type_i_ext_descriptor *fmt = _fmt; --- 768 unchanged lines hidden --- | 48 sample_width = fmt->bBitResolution; 49 sample_bytes = fmt->bSubframeSize; 50 format = 1ULL << format; 51 break; 52 } 53 54 case UAC_VERSION_2: { 55 struct uac_format_type_i_ext_descriptor *fmt = _fmt; --- 768 unchanged lines hidden --- |