Bug 3437 - snd-via82xx problem with wave output, when device is busy
Summary: snd-via82xx problem with wave output, when device is busy
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-21 04:00 UTC by henning schild
Modified: 2004-10-24 06:34 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.8.1, 2.6.7 , 2.6.6, 2.6.5
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description henning schild 2004-09-21 04:00:31 UTC
Distribution: 

Gentoo Base System version 1.4.16

Hardware Environment: 

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

Software Environment:

alsa-utils-1.0.6
alsa-lib-1.0.6
alsa-oss-1.0.6
alsa-headers-1.0.6a

>lsmod

Module                  Size  Used by
snd_via82xx            28548  3 
snd_ac97_codec         69124  1 snd_via82xx
snd_mpu401_uart         7936  1 snd_via82xx
snd_rawmidi            25700  1 snd_mpu401_uart
snd_seq_oss            34560  0 
snd_seq_midi_event      7936  1 snd_seq_oss
snd_seq                54416  4 snd_seq_oss,snd_seq_midi_event
snd_seq_device          8584  3 snd_rawmidi,snd_seq_oss,snd_seq
snd_pcm_oss            54888  0 
snd_pcm                98312  3 snd_via82xx,snd_pcm_oss
snd_page_alloc         11784  2 snd_via82xx,snd_pcm
snd_timer              26052  2 snd_seq,snd_pcm
snd_mixer_oss          20352  1 snd_pcm_oss
sg                     34912  0 
it87                   22284  0 
eeprom                  7944  0 
lm90                   12612  0 
i2c_sensor              2944  3 it87,eeprom,lm90
i2c_isa                 2048  0 
i2c_viapro              7052  0 
usb_storage            30976  0 
usbhid                 24576  0 
usblp                  13056  0 
rivafb                 49316  0 
vgastate               10368  1 rivafb
ehci_hcd               29124  0 
uhci_hcd               32208  0 
tuner                  19216  0 
tvaudio                22092  0 
bttv                  152524  2 
video_buf              21892  1 bttv
i2c_algo_bit            9288  1 bttv
v4l2_common             6208  1 bttv
btcx_risc               4744  1 bttv
videodev               10240  1 bttv
lirc_i2c                8068  1 
lirc_dev               13516  2 lirc_i2c
nvidia               4818516  12 
3c59x                  37608  0 


Problem Description:

when playing an mp3 with mpg123|xmms i can't play a wav file at the same time,
but i can play more than one mp3 at one time. also i can hear mplayer's sound
when playing a movie and an mp3 at the same time. according to "aplay -l" i have
4 subdevices, and with kernel 2.6.3 i can play up to 4 sounds at a time. i guess
i can play 4 mp3's at a time now, but playing a wav will always fail when
/dev/dsp is in use somehow.

while xmms playing an mp3:

>aplay -l 
**** List of PLAYBACK Hardware Devices ****
card 0: V8235 [VIA 8235], device 0: VIA 8235 [VIA 8235]
  Subdevices: 3/4
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
card 0: V8235 [VIA 8235], device 1: VIA 8235 [VIA 8235]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

>aplay bla.wav

Playing WAVE '/usr/share/licq/sounds/Monty-Python.wav' : Unsigned 8 bit, Rate
8000 Hz, Mono
ALSA lib pcm_hw.c:521:(snd_pcm_hw_prepare) SNDRV_PCM_IOCTL_PREPARE failed:
Invalid argument
aplay: set_params:907: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  U8
SUBFORMAT:  STD
SAMPLE_BITS: 8
FRAME_BITS: 8
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 1000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 4000
TICK_TIME: 1000

i also don't have any sound when playing quake3 it complains (started with
/dev/dsp not used by any other program):

------- sound initialization -------
Could not mmap dma buffer PROT_WRITE|PROT_READ
trying mmap PROT_WRITE (with associated better compatibility / less performance
code)
/dev/dsp: Input/output error
Could not mmap /dev/dsp
------------------------------------


while playing a .wav file i was not able to play an mp3

Steps to reproduce:

play an mp3 and try to play a .wav file at the same time.
start quake3 and you will have no sound
Comment 1 henning schild 2004-09-22 06:16:50 UTC
tested different kernel versions 2.6.3 and 2.6.4 don't have the problem, but
since 2.6.5 every version has it.
Comment 2 henning schild 2004-09-22 06:27:21 UTC
I just had a look at http://kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.5
There are many changes in this version on via82xx, and one of them is
responsible for the errors that appeare on my box.
perex i would like to give you all information you need about my
hardware/configuration whatever. i hope i can help you fix this very soon.
Comment 3 henning schild 2004-10-24 06:34:11 UTC
fixed in 2.6.9

Note You need to log in before you can comment on or make changes to this bug.