diff options
author | waker <wakeroid@gmail.com> | 2013-06-14 21:34:01 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2013-06-14 21:34:01 +0200 |
commit | 2d6d0f4b18a2e5d73acf3f0b6c55f41e5c41903e (patch) | |
tree | 7865370e2d46948b01331e1a3089bb4685f2b948 /plugins/alsa | |
parent | c921f15c196680ea568fc427781027f4eed31779 (diff) |
alsa: minor changes to ease debugging
Diffstat (limited to 'plugins/alsa')
-rw-r--r-- | plugins/alsa/alsa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c index fc7691e6..4c87f9c9 100644 --- a/plugins/alsa/alsa.c +++ b/plugins/alsa/alsa.c @@ -423,11 +423,11 @@ open_error: int palsa_setformat (ddb_waveformat_t *fmt) { memcpy (&requested_fmt, fmt, sizeof (ddb_waveformat_t)); - trace ("palsa_setformat %dbit %s %dch %dHz channelmask=%X\n", fmt->bps, fmt->is_float ? "float" : "int", fmt->channels, fmt->samplerate, fmt->channelmask); + trace ("palsa_setformat %dbit %s %dch %dHz channelmask=%X\n", requested_fmt.bps, fmt->is_float ? "float" : "int", fmt->channels, fmt->samplerate, fmt->channelmask); if (!audio) { return -1; } - if (!memcmp (fmt, &plugin.fmt, sizeof (ddb_waveformat_t))) { + if (!memcmp (&requested_fmt, &plugin.fmt, sizeof (ddb_waveformat_t))) { trace ("palsa_setformat ignored\n"); return 0; } @@ -453,11 +453,11 @@ palsa_setformat (ddb_waveformat_t *fmt) { int s = state; state = OUTPUT_STATE_STOPPED; snd_pcm_drop (audio); - int ret = palsa_set_hw_params (fmt); + int ret = palsa_set_hw_params (&requested_fmt); if (ret < 0) { trace ("palsa_setformat: impossible to set requested format\n"); // even if it failed -- copy the format - memcpy (&plugin.fmt, fmt, sizeof (ddb_waveformat_t)); + memcpy (&plugin.fmt, &requested_fmt, sizeof (ddb_waveformat_t)); UNLOCK; return -1; } |