summaryrefslogtreecommitdiffstats
path: root/sys/oss/gstosshelper.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2008-04-08 19:49:34 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-04-08 19:49:34 +0000
commit0525a5d213bdf3bdb476888c2af8e2bffd1f48d8 (patch)
tree8842ba841e1ccfabf5df3d363ae3fffe6256d564 /sys/oss/gstosshelper.c
parent72f0385606f324d7182e491175cf5418980b5208 (diff)
sys/oss/: More logging when probing (see #518474), some comments in _reset().
Original commit message from CVS: * sys/oss/gstosshelper.c: (gst_oss_helper_rate_check_rate): * sys/oss/gstosssink.c: (gst_oss_sink_reset): * sys/oss/gstosssrc.c: (gst_oss_src_reset): More logging when probing (see #518474), some comments in _reset().
Diffstat (limited to 'sys/oss/gstosshelper.c')
-rw-r--r--sys/oss/gstosshelper.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/oss/gstosshelper.c b/sys/oss/gstosshelper.c
index dea22ccf..cc81ad81 100644
--- a/sys/oss/gstosshelper.c
+++ b/sys/oss/gstosshelper.c
@@ -352,14 +352,20 @@ gst_oss_helper_rate_check_rate (GstOssProbe * probe, int irate)
GST_LOG ("checking format %d, channels %d, rate %d",
format, n_channels, rate);
ret = ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format);
- if (ret < 0 || format != probe->format)
+ if (ret < 0 || format != probe->format) {
+ GST_DEBUG ("unsupported format: %d (%d)", probe->format, format);
return -1;
+ }
ret = ioctl (probe->fd, SNDCTL_DSP_CHANNELS, &n_channels);
- if (ret < 0)
+ if (ret < 0 || n_channels != probe->n_channels) {
+ GST_DEBUG ("unsupported channels: %d (%d)", probe->n_channels, n_channels);
return -1;
+ }
ret = ioctl (probe->fd, SNDCTL_DSP_SPEED, &rate);
- if (ret < 0)
+ if (ret < 0) {
+ GST_DEBUG ("unsupported rate: %d (%d)", irate, rate);
return -1;
+ }
GST_DEBUG ("rate %d -> %d", irate, rate);