: artsd-like style
A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1224>
======================================================================
Reported By: Hetfield
Assigned To:
======================================================================
Project: ALSA - driver Issue ID: 1224 Category: PCI - ens1370 Reproducibility: always Severity: major Priority: normal Status: new Distribution: Kernel Version: 2.6.x ====================================================================== Date Submitted: 07-01-2005 14:49 CEST Last Modified: 09-18-2005 03:26 CEST
======================================================================
Summary: artsd-like style
Description:
i'd like to know if that's a roadmap to let alsa drivers have a artsd (or windows) style, i mean, multiple streams at once.
that could be very important for example using skype voip and listening music at the same time.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
has duplicate 0001228 Skype Does not work with aoss
======================================================================
----------------------------------------------------------------------
Hetfield - 09-17-05 22:52
----------------------------------------------------------------------
ALSA_OSS_DEBUG=1 aoss ./skype.binopen("/dev/mixer", 2, 0) -> 30open("/dev/mixer", 2, -1227408088) -> 32 open("/dev/mixer", 2, 142850184) -> 35
Opened PCM dsp0 for stream 0 (result = -2)
Opened PCM default for stream 0 (result = 0)
close(35) -> -1(errno=9)
close(32) -> -1(errno=9)
close(30) -> -1(errno=9)
Opened PCM default for stream 1 (result = 0) open("/dev/dsp", 2, -1264432220) -> 37ioctl(37, SNDCTL_DSP_GETCAPS, 0xb6d73ccc) -> [13056] ioctl(37, SNDCTL_DSP_SETFRAGMENT, 0x8760d08[100008]) ioctl(37, SNDCTL_DSP_STEREO, 0x8760d0c[0]) -> [0] ioctl(37, SNDCTL_DSP_SETFMT, 0x8760d10[16]) -> [16] ioctl(37, SNDCTL_DSP_SPEED, 0x8760d24[48000]) -> [48000] ioctl(37, SNDCTL_DSP_GETOSPACE, 0xb6d73cd0) -> {8 16 4096 33436} write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960
[CUT] --> hangup
write(37, 0xb63efcc0, 960) -> 960write(37, 0xb63efcc0, 960) -> 960ioctl(35, SOUND_MIXER_READ[12], 0xb6d72ac0) ->write(37, 0xb63efcc0, 960) -> 960ioctl(35, SOUND_MIXER_READ[12], 0xb6d73db0) ->
----------------------------------------------------------------------
rlrevell - 09-18-05 03:26
----------------------------------------------------------------------
OK, now we are getting somewhere. Create a new .asoundrc containing only:
cards.ENS1370.pcm.dmix.period_size 0
cards.ENS1370.pcm.dmix.period_size 256
cards.ENS1370.pcm.dmix.buffer_size 16384
and post the Skype debug output again.
The log shows that Skype uses SNDCTL_DSP_SETFRAGMENT ioctl to ask for one 256 byte fragment per buffer then sets the format to 16 bit mono @48000Hz.
Next it calls SNDCTL_DSP_GETOSPACE which tells us the buffer is 33436
bytes, we can write 4096 fragments without blocking, the fragments are 16 bytes, and the buffer is divided into 8 fragments. These values obviously make no sense, but then Skype proceeds to loop write()ing 960 bytes at a time to the audio device.
As Skype only uses one fragment per buffer, and does not bother to check the available space after each write, or notice that GETOSPACE returned bizarre values, it must be counting on write() eventually returning -EWOULDBLOCK when the buffer fills up.
IOW it looks like AOSS is still buggy, but Skype is really abusing the OSS API.
Issue History
Date Modified Username Field Change
======================================================================
07-01-05 14:49 Hetfield New Issue 07-01-05 14:49 Hetfield Kernel Version => 2.6.x 07-01-05 20:16 Hetfield Note Added: 0005337 07-01-05 20:33 rlrevell Note Added: 0005338 07-01-05 22:56 Hetfield Note Added: 0005343 07-02-05 18:53 pzad Note Added: 0005356 07-02-05 20:11 Hetfield Note Added: 0005357 07-02-05 21:46 pzad File Added: aoss-fcntl.patch 07-02-05 21:47 pzad Note Added: 0005361 07-03-05 09:25 Hetfield Note Added: 0005370 07-03-05 14:09 pzad Note Added: 0005376 07-03-05 15:57 Hetfield Note Added: 0005378 07-04-05 11:49 pzad File Added: aoss.patch 07-04-05 11:53 pzad Note Added: 0005384 07-04-05 14:02 Hetfield Note Added: 0005385 07-08-05 12:16 tiwai Note Added: 0005417 07-08-05 12:27 Hetfield Note Added: 0005418 07-17-05 10:25 Hetfield Note Added: 0005503 07-17-05 10:29 rlrevell Note Added: 0005504 07-17-05 10:46 rlrevell Note Added: 0005505 07-17-05 11:10 Hetfield Note Added: 0005506 07-17-05 11:11 Hetfield File Added: log.tar.gz 07-17-05 19:41 rlrevell Note Added: 0005508 07-17-05 19:50 Hetfield Note Added: 0005509 07-17-05 19:51 rlrevell Note Added: 0005510 07-17-05 20:21 Hetfield Note Added: 0005511 07-17-05 21:14 rlrevell Note Added: 0005512 07-17-05 21:22 Hetfield File Added: log2.tar.gz 07-17-05 21:22 Hetfield File Added: log2 07-17-05 21:23 Hetfield Note Added: 0005513 07-17-05 22:21 rlrevell Note Added: 0005514 07-17-05 23:28 Hetfield Note Added: 0005515 07-17-05 23:43 rlrevell Note Added: 0005516 07-18-05 03:33 rlrevell Note Added: 0005517 07-18-05 06:04 rlrevell Note Added: 0005518 07-18-05 07:33 rlrevell Note Added: 0005519 07-18-05 09:23 Hetfield Note Added: 0005520 07-18-05 09:24 Hetfield File Added: asoundrc 07-18-05 22:08 rlrevell Note Added: 0005524 07-21-05 19:55 Hetfield Note Added: 0005540 07-21-05 19:56 Hetfield Note Added: 0005541 07-24-05 09:55 Hetfield Note Added: 0005556 07-24-05 19:10 rlrevell Note Added: 0005558 07-28-05 22:40 rlrevell Note Added: 0005578 07-29-05 17:43 tiwai Note Added: 0005579 08-01-05 10:20 Hetfield Note Added: 0005595 08-10-05 00:49 rlrevell Relationship added has duplicate 0001228 08-28-05 15:56 Hetfield Note Added: 0005963 09-02-05 19:57 tiwai Note Added: 0006020 09-02-05 20:22 Hetfield Note Added: 0006021 09-02-05 20:24 tiwai Note Added: 0006022 09-02-05 20:26 Hetfield Note Added: 0006023 09-02-05 20:31 Hetfield Note Added: 0006024 09-17-05 14:05 Hetfield Note Added: 0006249 09-17-05 14:51 Hetfield Note Added: 0006250 09-17-05 19:43 rlrevell Note Added: 0006253 09-17-05 19:46 Hetfield Note Added: 0006254 09-17-05 19:50 rlrevell Note Added: 0006255 09-17-05 19:55 pzad Note Added: 0006256 09-17-05 20:10 rlrevell Note Added: 0006257 09-17-05 20:11 rlrevell Note Added: 0006258 09-17-05 21:21 Hetfield Note Added: 0006261 09-17-05 22:05 rlrevell Note Added: 0006262 09-17-05 22:38 Hetfield Note Added: 0006263 09-17-05 22:52 Hetfield Note Added: 0006264 09-18-05 03:26 rlrevell Note Added: 0006265
======================================================================
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php