Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-04-05 12:30:41 +0400
committerCorinna Vinschen <corinna@vinschen.de>2004-04-05 12:30:41 +0400
commit7e57d6d268a8a861603c82601231d12c61fa241e (patch)
tree97bf858a541c3f72b3baefd9d3563344e1d9700f /winsup/cygwin
parent63481100b18b8f79e83b063e0aa04eb983525137 (diff)
* fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Add implementation
for ioctl codes SNDCTL_DSP_CHANNELS and SNDCTL_DSP_GETCAPS.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/fhandler_dsp.cc39
2 files changed, 46 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5f12dc889..2aaad0f16 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,6 +1,12 @@
+2004-04-04 Gerd Spalink <Gerd.Spalink@t-online.de>
+
+ * fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Add implementation
+ for ioctl codes SNDCTL_DSP_CHANNELS and SNDCTL_DSP_GETCAPS.
+
2004-04-03 Christopher Faylor <cgf@redhat.com>
- * child_info.h (child_info::cygheap_reserve_sz): Rename from cygheap_alloc_sz.
+ * child_info.h (child_info::cygheap_reserve_sz): Rename from
+ cygheap_alloc_sz.
* cygheap.cc: Rename alloc_sz to reserve_sz throughout.
2004-04-03 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc
index b614ede73..d9ce7d7b4 100644
--- a/winsup/cygwin/fhandler_dsp.cc
+++ b/winsup/cygwin/fhandler_dsp.cc
@@ -1370,6 +1370,38 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *ptr)
}
break;
+ CASE (SNDCTL_DSP_CHANNELS)
+ {
+ int nChannels = *intptr;
+
+ if (audio_out_)
+ {
+ RETURN_ERROR_WHEN_BUSY (audio_out_);
+ audio_out_->stop ();
+ if (audio_out_->query (audiofreq_, audiobits_, nChannels))
+ audiochannels_ = nChannels;
+ else
+ {
+ *intptr = audiochannels_;
+ return -1;
+ }
+ }
+ if (audio_in_)
+ {
+ RETURN_ERROR_WHEN_BUSY (audio_in_);
+ audio_in_->stop ();
+ if (audio_in_->query (audiofreq_, audiobits_, nChannels))
+ audiochannels_ = nChannels;
+ else
+ {
+ *intptr = audiochannels_;
+ return -1;
+ }
+ }
+ return 0;
+ }
+ break;
+
CASE (SNDCTL_DSP_GETOSPACE)
{
audio_buf_info *p = (audio_buf_info *) ptr;
@@ -1399,6 +1431,13 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *ptr)
}
break;
+ CASE (SNDCTL_DSP_GETCAPS)
+ {
+ *intptr = DSP_CAP_BATCH | DSP_CAP_DUPLEX;
+ return 0;
+ }
+ break;
+
CASE (SNDCTL_DSP_POST)
CASE (SNDCTL_DSP_SYNC)
{