* fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Add implementation
for ioctl codes SNDCTL_DSP_CHANNELS and SNDCTL_DSP_GETCAPS.
This commit is contained in:
parent
63481100b1
commit
7e57d6d268
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue