Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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
videolan
vlc-2-2
Commits
d54c2b59
Commit
d54c2b59
authored
Feb 13, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udev ALSA: use model name if available
parent
26b5b697
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
modules/services_discovery/udev.c
modules/services_discovery/udev.c
+9
-1
No files found.
modules/services_discovery/udev.c
View file @
d54c2b59
...
...
@@ -469,13 +469,21 @@ static char *alsa_get_mrl (struct udev_device *dev)
static
char
*
alsa_get_name
(
struct
udev_device
*
dev
)
{
const
char
*
model
=
NULL
;
char
*
name
;
unsigned
card
,
device
;
if
(
alsa_get_device
(
dev
,
&
card
,
&
device
))
return
NULL
;
if
(
asprintf
(
&
name
,
_
(
"Device %u"
),
device
)
==
-
1
)
dev
=
udev_device_get_parent
(
dev
);
if
(
dev
!=
NULL
)
model
=
udev_device_get_property_value
(
dev
,
"ID_MODEL_FROM_DATABASE"
);
if
(
model
==
NULL
)
model
=
_
(
"Device"
);
if
(
asprintf
(
&
name
,
"%s (%u)"
,
model
,
device
)
==
-
1
)
name
=
NULL
;
return
name
;
}
...
...
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