aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pcm.c b/src/pcm.c
index d460593..d681563 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -1092,8 +1092,10 @@ struct pcm *pcm_open(unsigned int card, unsigned int device,
}
pcm->subdevice = info.subdevice;
- if (pcm_set_config(pcm, config) != 0)
+ if (pcm_set_config(pcm, config) != 0) {
+ memcpy(bad_pcm.error, pcm->error, sizeof(pcm->error));
goto fail_close;
+ }
rc = pcm_hw_mmap_status(pcm);
if (rc < 0) {