Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
42f3a8f5
Commit
42f3a8f5
authored
Aug 2, 2012
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #14027: alsa: try and recover from being in snd_pcm_setup state during write.
parent
4c43f650
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/audio/alsa/alsalayer.cpp
+18
-0
18 additions, 0 deletions
daemon/src/audio/alsa/alsalayer.cpp
with
18 additions
and
0 deletions
daemon/src/audio/alsa/alsalayer.cpp
+
18
−
0
View file @
42f3a8f5
...
@@ -405,6 +405,24 @@ AlsaLayer::write(void* buffer, int length, snd_pcm_t * handle)
...
@@ -405,6 +405,24 @@ AlsaLayer::write(void* buffer, int length, snd_pcm_t * handle)
break
;
break
;
}
}
case
-
EBADFD
:
{
snd_pcm_status_t
*
status
;
snd_pcm_status_alloca
(
&
status
);
if
(
ALSA_CALL
(
snd_pcm_status
(
handle
,
status
),
"Cannot get playback handle status"
)
>=
0
)
{
if
(
snd_pcm_status_get_state
(
status
)
==
SND_PCM_STATE_SETUP
)
{
ERROR
(
"Writing in state SND_PCM_STATE_SETUP, should be "
"SND_PCM_STATE_PREPARED or SND_PCM_STATE_RUNNING"
);
int
error
=
snd_pcm_prepare
(
handle
);
if
(
error
<
0
)
{
ERROR
(
"Failed to prepare handle: %s"
,
snd_strerror
(
error
));
stopPlaybackStream
();
}
}
}
break
;
}
default
:
default
:
ERROR
(
"Unknown write error, dropping frames: %s"
,
snd_strerror
(
err
));
ERROR
(
"Unknown write error, dropping frames: %s"
,
snd_strerror
(
err
));
stopPlaybackStream
();
stopPlaybackStream
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment