Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
e432472d
Commit
e432472d
authored
Feb 19, 2009
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/usb-audio' into for-linus
parents
e6845d91
3b03cc5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
sound/usb/usbaudio.c
sound/usb/usbaudio.c
+11
-9
sound/usb/usbmidi.c
sound/usb/usbmidi.c
+1
-0
No files found.
sound/usb/usbaudio.c
View file @
e432472d
...
...
@@ -2524,7 +2524,6 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform
* build the rate table and bitmap flags
*/
int
r
,
idx
;
unsigned
int
nonzero_rates
=
0
;
fp
->
rate_table
=
kmalloc
(
sizeof
(
int
)
*
nr_rates
,
GFP_KERNEL
);
if
(
fp
->
rate_table
==
NULL
)
{
...
...
@@ -2532,24 +2531,27 @@ static int parse_audio_format_rates(struct snd_usb_audio *chip, struct audioform
return
-
1
;
}
fp
->
nr_rates
=
nr_rates
;
fp
->
rate_min
=
fp
->
rate_max
=
combine_triple
(
&
fmt
[
8
])
;
fp
->
nr_rates
=
0
;
fp
->
rate_min
=
fp
->
rate_max
=
0
;
for
(
r
=
0
,
idx
=
offset
+
1
;
r
<
nr_rates
;
r
++
,
idx
+=
3
)
{
unsigned
int
rate
=
combine_triple
(
&
fmt
[
idx
]);
if
(
!
rate
)
continue
;
/* C-Media CM6501 mislabels its 96 kHz altsetting */
if
(
rate
==
48000
&&
nr_rates
==
1
&&
chip
->
usb_id
==
USB_ID
(
0x0d8c
,
0x0201
)
&&
(
chip
->
usb_id
==
USB_ID
(
0x0d8c
,
0x0201
)
||
chip
->
usb_id
==
USB_ID
(
0x0d8c
,
0x0102
))
&&
fp
->
altsetting
==
5
&&
fp
->
maxpacksize
==
392
)
rate
=
96000
;
fp
->
rate_table
[
r
]
=
rate
;
nonzero_rates
|=
rate
;
if
(
rate
<
fp
->
rate_min
)
fp
->
rate_table
[
fp
->
nr_rates
]
=
rate
;
if
(
!
fp
->
rate_min
||
rate
<
fp
->
rate_min
)
fp
->
rate_min
=
rate
;
else
if
(
rate
>
fp
->
rate_max
)
if
(
!
fp
->
rate_max
||
rate
>
fp
->
rate_max
)
fp
->
rate_max
=
rate
;
fp
->
rates
|=
snd_pcm_rate_to_rate_bit
(
rate
);
fp
->
nr_rates
++
;
}
if
(
!
nonzero
_rates
)
{
if
(
!
fp
->
nr
_rates
)
{
hwc_debug
(
"All rates were zero. Skipping format!
\n
"
);
return
-
1
;
}
...
...
sound/usb/usbmidi.c
View file @
e432472d
...
...
@@ -1625,6 +1625,7 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi* umidi,
}
ep_info
.
out_ep
=
get_endpoint
(
hostif
,
2
)
->
bEndpointAddress
&
USB_ENDPOINT_NUMBER_MASK
;
ep_info
.
out_interval
=
0
;
ep_info
.
out_cables
=
endpoint
->
out_cables
&
0x5555
;
err
=
snd_usbmidi_out_endpoint_create
(
umidi
,
&
ep_info
,
&
umidi
->
endpoints
[
0
]);
if
(
err
<
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment