On Tue, Aug 17, 2021 at 03:31:55PM +0200, Jan Stary wrote: > This is current/amd64 on an older PC (full dmesg below) > using an ESI Wave Terminal 192M attaching as > > envy0 at pci4 dev 4 function 0 "IC Ensemble Envy24PT/HT Audio" rev 0x01: apic > 2 int 20 > envy0: unknown 1724-based card, 2 inputs, 8 outputs > audio0 at envy0 > midi0 at envy0: <Envy24 MIDI UART> > > This is what audioctl and mixerctl show > as the exposed controls: > > # audioctl > name=envy0 > mode= > pause=1 > active=0 > nblks=4 > blksz=480 > rate=48000 > encoding=s24le4msb > play.channels=8 > play.bytes=0 > play.errors=0 > record.channels=2 > record.bytes=0 > record.errors=0 > > # mixerctl -av > outputs.line-0_source=play-0 [ line-0 line-1 play-0 ] > outputs.line-1_source=play-1 [ line-0 line-1 play-1 ] > outputs.line-2_source=play-2 [ line-0 line-1 play-2 ] > outputs.line-3_source=play-3 [ line-0 line-1 play-3 ] > outputs.line-4_source=play-4 [ line-0 line-1 play-4 ] > outputs.line-5_source=play-5 [ line-0 line-1 play-5 ] > outputs.line-6_source=play-6 [ line-0 line-1 play-6 ] > outputs.line-7_source=play-7 [ line-0 line-1 play-7 ] > record.enable=sysctl [ off on sysctl ] > > Is this expected? With other audio devices > I usualy also see some mixer and volume controls. > > > I am seeing timeouts with both recording and playback: > > $ aucat -o file.wav > $ default: audio device gone, stopping > > $ aucat -i file.wav > $ default: audio device gone, stopping > > While this happens, dmesg says: > > envy0: output DMA halt timeout > envy0: input DMA halt timeout > envy0: output DMA halt timeout > envy0: input DMA halt timeout > > How can I help debug this? >
Hi, You could start by enabling ENVY_DEBUG option rebuild kernel and see if you get additional information. The "DMA halt timeout" errors probably indicate that DMA never started, which is very strange. You can check this by writing zeros to /dev/audio1 and see if there are interrupts (ex. with "systat vmstat"). No interrupts indicates DMA didn't start. Basically, these cards have an Envy chip which is the interface to the PCI bus and handles DMA and interrupts. The Envy chip is connected to one or more DACs and/or ADCs (or to a complete AC97-style codec). The Envy chip simply reads data from hosts memory and sends it to the DAC. For sound to work ADC/DACs may need to be configured; this is done either by setting GPIO pins or sending few bytes through a I2C link. As your card is not known by OpenBSD driver, the code for ADC/DAC initialization is missing. You can figure-out what ADC/DAC your card is using by looking at the ICs on the board (the big one is the Envy chip, aka ICExxxx, the other big one(s) are the ADC/DAC), then google for the corresponding datasheets The interesting part in your dmesg is that DMA doesn't seem to start, I thought DMA would start even if the ADC/DAC is not initialized, but I may be wrong.