| Summary: | [sound] newpcm does not play back the tail of sound | ||
|---|---|---|---|
| Product: | Base System | Reporter: | iwaki <iwaki> |
| Component: | kern | Assignee: | freebsd-multimedia (Nobody) <multimedia> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.4-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
iwaki
2001-10-21 09:30:00 UTC
Responsible Changed From-To: freebsd-bugs->cg Cameron is Mr. PCM I can confirm this problem as well. It seems that wav files shorter than 4k do no produce any sound on playback. The matter may be not in the size, but it definitely correlates with it. Incidentally I have the same hardware as in one of the originally reported cases: >cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: <SB16 DSP 4.16> at io 0x220 irq 5 drq 1:5 bufsz 4096d (1p/1r/6v channels duplex) >dmesg | fgrep sbc Preloaded elf module "snd_sbc.ko" at 0xc03c3198. sbc0: <Creative SB AWE64 Gold> at port 0x220-0x22f,0x330-0x331,0x388-0x38b irq 5 drq 1,5 on isa0 sbc0: setting card to irq 5, drq 1, 5 pcm0: <SB16 DSP 4.16> on sbc0 P.S. the problem is present regardless of whether the sound drivers are loaded as modules or built into a kernel. -- Andriy Gapon Correction: what I see is not exactly the same problem as originally reported.
What I see seems to be related to SNDCTL_DSP_SYNC.
If I do:
fd = open("dev/dsp", O_WRONLY);
write(fd, );
close(fd);
then everything is ok.
But if I do:
fd = open("dev/dsp", O_WRONLY);
write(fd, );
ioctl(fd, SNDCTL_DSP_SYNC);
close(fd);
and if size of data written is less than 2k (maybe it has something to do with
being less than a half of sound buffer size), then it is lost.
I am not sure if this is relevant, but please note that I have vchans
configured (see my previous followup for details).
--
Andriy Gapon
Responsible Changed From-To: cg->sound With permission, reassign to mailing list alias. Same problem here. Very short sound files are not played. Note that this very same hardware always worked fine with FreeBSD 4.x (even with 4.4). The problem arose today, after upgrading from 4.10 to 5.3-BETA6. $ uname -a FreeBSD jsite.lefort.net 5.3-BETA6 FreeBSD 5.3-BETA6 #0: Tue Sep 28 00:10:28 CEST 2004 jylefort@jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386 $ cat /dev/sndstat FreeBSD Audio Driver (newpcm) Installed devices: pcm0: <AudioPCI ES1373-8> at io 0x9000 irq 11 kld snd_es137x (1p/1r/4v channels duplex default) $ grep pcm /var/run/dmesg.boot pcm0: <AudioPCI ES1373-8> port 0x9000-0x903f at device 12.0 on pci0 pcm0: <TriTech TR28602 AC97 Codec> pcm0: [GIANT-LOCKED] $ sysctl -a | grep snd hw.snd.targetirqrate: 32 hw.snd.report_soft_formats: 1 hw.snd.verbose: 1 hw.snd.unit: 0 hw.snd.maxautovchans: 0 hw.snd.pcm0.buffersize: 4096 -- Jean-Yves Lefort jylefort@brutele.be http://lefort.be.eu.org/ State Changed From-To: open->feedback Is this still a problem with a recent -current? Same with 6.0-RELEASE. -- Jean-Yves Lefort jylefort@FreeBSD.org http://lefort.be.eu.org/ State Changed From-To: feedback->closed Fixed in -current. |