Hi,
I changed my computer recently and now avifile does not work anymore.
It worked fine on the old computer with sound blaster.
I managed to fix it, but I do not know if the problem is in the sound
card driver or is it in aviplay. I suspected first that it was a
sound card driver problem, so I changed that and contacted the kernel
developers, who seem to suggest that it is an application (aviplay) problem.
Please read the following emails that went from me to them:
My orignial mail:
----------------------------------------------------------
I have some problems with my sound card and I suspect that
there is a bug in the i810_audio.c driver.
Sound in UnrealTournament and aviplay does not work.
I think I resolved the problem for aviplay:
aviplay aborts when it is trying to set the stereo mode:
if(ioctl(audio_fd, SNDCTL_DSP_STEREO, &tmp)!=0)
throw FATAL("ioctl(stereo)");
I checked in i810_audio.c and SNDCTL_DSP_STEREO will never
return 0 but 1 on success or some other value for error.
So I have changed that to return 0 and aviplay works now.
(but UnrealTournament still does not work)
Here is the diff:
--- i810_audio.c-orig Thu Jun 14 01:53:06 2001
+++ i810_audio.c Thu Jun 14 01:53:31 2001
@@ -1438,7 +1438,7 @@
if(val==0) {
ret = -EINVAL;
} else {
- ret = 1;
+ ret = 0;
}
if (dmabuf->enable & DAC_RUNNING) {
stop_dac(state);
I do not know if this is correct, but it works for me.
Well, I also tried to change aviplay to ignore the
ioctl return value and this works too.
I do not know anything about sound IOCTLS and how should
they behave so I do not know if the patch is correct.
Some info about my sound card:
from /proc/pci:
Bus 0, device 31, function 5:
Multimedia audio controller: Intel Corporation 82801AA AC'97 Audio (rev 2).
IRQ 9.
I/O at 0x1200 [0x12ff].
I/O at 0x1300 [0x133f].
from dmesg:
i810: Intel ICH 82801AA found at IO 0x1300 and 0x1200, IRQ 9
ac97_codec: AC97 Audio codec, id: 0x4352:0x5934 (Cirrus Logic CS4299 rev D)
my machine is a HP Vectra VL400DT.
-------------------------------------------------------------
Reply from Zach Brown:
via*.c has had the most attention paid to oss api compliance, afaik.
Have you tried mailing jeff garzik <[EMAIL PROTECTED]> ? He's
definitely more up on this stuff than I am nowadays..
Reply from Jeff Garzik:
SNDCTL_DSP_STEREO inputs an argument of 1 for stereo or 0 for mono, and
the return values are the same: 1 for stereo, 0 for mono.
The code in i810_audio returns EINVAL when val==0, which means that the
driver is refusing to support mono at all. Any applications which
attempt to use mono will fail.
I don't know much about the i810 audio hardware's stereo vs. mono
capability, but I would be surprised if it didn't support mono in some
form.
---------------------------
So, what do you think is the culprit?
Thanks for any help.
ciao
Damjan
_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile