Le 8 oct. 08 à 06:40, Hannu Savolainen a écrit :

> Yair K. wrote:
>> On Tuesday 07 October 2008 21:05:41 Hannu Savolainen wrote:
>>
>>> Stéphane Letz wrote:
>>>
>>>> Hi,
>>>>
>>>> We are implementing a full duplex backend that is using separated  
>>>> in/
>>>> out devices. Basically we are following what is explained in the
>>>> "Using separate input and output devices" section in the following
>>>> page http://manuals.opensound.com/developer/full_duplex.html. We  
>>>> use a
>>>> single thread that is doing read/write in a loop.
>>>>
>>>> Everything works as expected on a HDAudio card on Solaris à 48 kHz:
>>>> read is the function that blocks and drive the audio timing. But  
>>>> when
>>>> using another sample rate values (like 44.1 kHz) on the same card,
>>>> then write is blocking and read returns immediately.
>>>>
>>>>
>>> This is probably caused by the virtual mixer (vmix) subsystem that  
>>> uses
>>> the device at fixed 48 kHz rate. Other rates will require  
>>> conversions
>>> which make recording and playback to work in slightly different  
>>> way. You
>>> can bypass vmix by opening the device with the O_EXCL flag.
>>>
>>
>> Can SNDCTL_DSP_COOKEDMODE be used instead?
>> http://manuals.opensound.com/developer/fulldup.c.html#LOC8 Seems to  
>> do this.
>>
> Actually this is necessary too (in addition to O_EXCL).
>
> Best regards,
>

Ok. Now testing with O_EXCL and SNDCTL_DSP_COOKEDMODE works, bit I see  
some strange of the device. The overruns/underrun detection code based  
on SNDCTL_DSP_GETERROR does not see underrun anymore although the  
sound get weird with high CPU load (Writing another buffer in the out  
device solve the "weird sound" problem...). The same overruns/underrun  
detection code was working when opening the /dev/dsp0 device (that  
uses vmix AFAIK)

This occurs on OpenSolaris with internal HDAudio using published OSS  
4.0. Are tey know problems with this card with OSS 4.0 ?

Best Regards

Stephane Letz



_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to