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
7a19c0b4
Commit
7a19c0b4
authored
Jan 17, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alsa: set spdif options also if device was specified
On my laptop I need to specify --alsa-audio-device hdmi
parent
806a5a50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+17
-2
No files found.
modules/audio_output/alsa.c
View file @
7a19c0b4
...
...
@@ -327,7 +327,7 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
const
char
*
device
=
sys
->
device
;
char
*
devbuf
=
NULL
;
/* Choose the IEC device for S/PDIF output */
if
(
spdif
&&
!
strcmp
(
device
,
"default"
)
)
if
(
spdif
)
{
unsigned
aes3
;
...
...
@@ -345,8 +345,23 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
break
;
}
char
*
opt
=
NULL
;
if
(
!
strcmp
(
device
,
"default"
))
device
=
"iec958"
;
/* TODO: hdmi */
else
{
opt
=
strchr
(
device
,
':'
);
if
(
opt
&&
opt
[
1
]
==
'\0'
)
{
/* if device is terminated by : but there's no options,
* remove ':', we'll add it back in the format string. */
*
opt
=
'\0'
;
opt
=
NULL
;
}
}
if
(
asprintf
(
&
devbuf
,
"iec958:AES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x"
,
"%s%cAES0=0x%x,AES1=0x%x,AES2=0x%x,AES3=0x%x"
,
device
,
opt
?
','
:
':'
,
IEC958_AES0_CON_EMPHASIS_NONE
|
IEC958_AES0_NONAUDIO
,
IEC958_AES1_CON_ORIGINAL
|
IEC958_AES1_CON_PCM_CODER
,
0
,
aes3
)
==
-
1
)
...
...
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