Re: eap driver audioctl issue

2005-08-19 Thread Lost Reality

obviously, some steps missing here.  are you doing

AUDIO_INITINFO(Inf);
AUDIO_GETINFO(Inf);
Inf.foo = bar;
AUDIO_SETINFO(Inf);

or just

AUDIO_INITINFO(Inf);
Inf.foo = bar;
AUDIO_SETINFO(Inf);

if you are doing the first, like audioctl does, try the second.  does that
work properly?


I was doing this (assumming that GETINFO initializes the struct):

AUDIO_GETINFO(Inf);
Inf.foo = bar;
AUDIO_SETINFO(Inf);

Adding AUDIO_INITINFO(Inf); before GETINFO doesn't gave any results, and


AUDIO_INITINFO(Inf);
Inf.foo = bar;
AUDIO_SETINFO(Inf);


works fine. 



Re: eap driver audioctl issue

2005-08-16 Thread Ramiro Aceves
Lost Reality wrote:
 Hello
 
 I have the same issue with a SB Live 5.1.
 This message appears, but the setting is changed anyways...
 
 -- 
 Andre

Yes, although the audioctl command gives an error and the setting
aparently changes, it does not really work. I thought it was an issue of
eap driver only, but now I understand it is a more generic problem.

Keep in touch.

Ramiro.



Re: eap driver audioctl issue

2005-08-16 Thread Lost Reality

So...it's a bug ?

# audioctl play.rate
play.rate=8000
# audioctl play.rate=44100
audioctl: set failed: Invalid argument
# audioctl play.rate
play.rate=44100
#

I made a little prog (a DSP), where (like in audioctl.c), this ioctl 
ALWAYS returns -1:

if (ioctl(ES, AUDIO_SETINFO, Inf)  0) err(0, AUDIO_SETINFO);

(audioctl.c)
if (writeinfo  ioctl(fd, AUDIO_SETINFO, info)  0)
 err(1, set failed);

I think it's related to some device-independent driver...I don't have the 
skills and time to go ahead, sorry :(


Thanks.

--
Andre

(# dmesg)
OpenBSD 3.7-current (GENERIC) #252: Wed Jul 20 14:26:27 MDT 2005
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Pentium III (GenuineIntel 686-class, 512KB L2 cache) 551 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,SER,MMX,FXSR,SSE

cpu0: disabling processor serial number
real mem  = 132685824 (129576K)
avail mem = 114495488 (111812K)
using 1645 buffers containing 6737920 bytes (6580K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(a4) BIOS, date 09/20/99, BIOS32 rev. 0 @ 0xfb130
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 70102 dobusy 1 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf/0xb5b0
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/96 (4 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11 12
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371SB ISA rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc/0x8000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel 82810 rev 0x03: rng active, 10Kb/sec
vga1 at pci0 dev 1 function 0 Intel 82810 Graphics rev 0x03: aperture at 
0xd800, size 0x200

wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb0 at pci0 dev 30 function 0 Intel 82801AA Hub-to-PCI rev 0x02
pci1 at ppb0 bus 1
ral0 at pci1 dev 4 function 0 Ralink RT2560 rev 0x01: irq 10, address 
00:50:18:2e:42:4a

ral0: MAC/BBP RT2560 (rev 0x04), RF RT2525
re0 at pci1 dev 5 function 0 Realtek 8169 rev 0x10: irq 11, address 
00:02:44:81:ef:80

rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 0
emu0 at pci1 dev 10 function 0 Creative Labs SoundBlaster Live rev 0x0a: 
irq 12

ac97: codec id 0x83847608 (SigmaTel STAC9708/11)
ac97: codec features 18 bit DAC, 18 bit ADC, SigmaTel 3D
audio0 at emu0
Creative Labs PCI Gameport Joystick rev 0x0a at pci1 dev 10 function 1 not 
configured

ichpcib0 at pci0 dev 31 function 0 Intel 82801AA LPC rev 0x02
pciide0 at pci0 dev 31 function 1 Intel 82801AA IDE rev 0x02: DMA, channel 
0 wired to compatibility, channel 1 wired to compatibility

wd0 at pciide0 channel 0 drive 0: ST3120022A
wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
wd1 at pciide0 channel 1 drive 0: ST340015A
wd1: 16-sector PIO, LBA, 38166MB, 78165360 sectors
atapiscsi0 at pciide0 channel 1 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: LG, DVD-ROM DRD8160B, 1.03 SCSI0 5/cdrom 
removable

wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 4
cd0(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 31 function 2 Intel 82801AA USB rev 0x02: irq 5
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
sysbeep0 at pcppi0
lm0 at isa0 port 0x290/8: W83627HF
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom0: console
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask e3e5 netmask efe5 ttymask efe7
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 80
dkcsum: wd1 matched BIOS disk 81
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
#

- Original Message - 
From: Ramiro Aceves [EMAIL PROTECTED]

To: Lost Reality [EMAIL PROTECTED]
Cc: misc@openbsd.org
Sent: Tuesday, August 16, 2005 11:34 AM
Subject: Re: eap driver audioctl issue



Lost Reality wrote:

Hello

I have the same issue with a SB Live 5.1.
This message appears, but the setting is changed anyways...

--
Andre




Oh, yes, You are right, I was confused. The audioctl message apears, but
the setting really works.

Thank you very much


Ramiro.




--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.10/73 - Release Date: 15/8/2005




eap driver audioctl issue

2005-08-15 Thread Ramiro Aceves
Hello OpenBSD fans.

I am newbie to OpenBSD but have certain Linux and FreeBSD experience. I
am having trouble with my audio Ensoniq CT5880 card under OpenBSD.
The problem occurs in two very different computers with same card but
different manufacturer. This card works well with snd-es1371 ALSA driver
under Linux. Both cards have CT5880 chip inside.


The card is perfectly recognized by the kernel:


eap0 at pci0 dev 10 function 0 Ensoniq CT5880 rev 0x02: irq 5
ac97: codec id 0x83847609 (SigmaTel STAC9721/23)
ac97: codec features 18 bit DAC, 18 bit ADC, SigmaTel 3D
audio0 at eap0
midi0 at eap0: AudioPCI MIDI UART

I can record and play sounds like this:

openbsd-remigio# cat /dev/audio/  file /* for recording */
openbsd-remigio# cat file  /dev/audio   /* for playing */

I can also modify mixer settings with mixerctl command.


The issue arises when I want to change recording parameters with
audioctl. I can not change any parameter at all:



openbsd-remigio# audioctl -a

name=Ensoniq AudioPCI
version=
config=eap
encodings=ulinear:8,mulaw:8*,alaw:8*,slinear:8*,slinear_le:16,ulinear_le:16*,slinear_be:16*,ulinear_be:16*

properties=full_duplex,mmap,independent
full_duplex=0
fullduplex=0
blocksize=4384
hiwat=14
lowat=0
monitor_gain=0
mode=
play.rate=44100
play.channels=1
play.precision=8
play.encoding=mulaw
play.gain=127
play.balance=32
play.port=0x0
play.avail_ports=0x0
play.seek=800
play.samples=65136
play.eof=0
play.pause=0
play.error=1
play.waiting=0
play.open=0
play.active=0
play.buffer_size=65536
record.rate=8000
record.channels=1
record.precision=8
record.encoding=mulaw
record.gain=191
record.balance=32
record.port=0x2
record.avail_ports=0x7
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.errors=0
**




openbsd-remigio# audioctl record.rate=22050
audioctl: set failed: Invalid argument


I can not change anything, I always get the same error message.

I will apreciate your help. Am I missing something?

Thanks in advance.


Ramiro
PS: (from Spain, sorry, my english is not very precise)



Re: eap driver audioctl issue

2005-08-15 Thread Lost Reality

Hello

I have the same issue with a SB Live 5.1.
This message appears, but the setting is changed anyways...

--
Andre


- Original Message - 
From: Ramiro Aceves [EMAIL PROTECTED]

To: misc@openbsd.org
Sent: Monday, August 15, 2005 10:54 AM
Subject: eap driver audioctl issue



Hello OpenBSD fans.

I am newbie to OpenBSD but have certain Linux and FreeBSD experience. I
am having trouble with my audio Ensoniq CT5880 card under OpenBSD.
The problem occurs in two very different computers with same card but
different manufacturer. This card works well with snd-es1371 ALSA driver
under Linux. Both cards have CT5880 chip inside.


The card is perfectly recognized by the kernel:


eap0 at pci0 dev 10 function 0 Ensoniq CT5880 rev 0x02: irq 5
ac97: codec id 0x83847609 (SigmaTel STAC9721/23)
ac97: codec features 18 bit DAC, 18 bit ADC, SigmaTel 3D
audio0 at eap0
midi0 at eap0: AudioPCI MIDI UART

I can record and play sounds like this:

openbsd-remigio# cat /dev/audio/  file /* for recording */
openbsd-remigio# cat file  /dev/audio  /* for playing */

I can also modify mixer settings with mixerctl command.


The issue arises when I want to change recording parameters with
audioctl. I can not change any parameter at all:



openbsd-remigio# audioctl -a

name=Ensoniq AudioPCI
version=
config=eap
encodings=ulinear:8,mulaw:8*,alaw:8*,slinear:8*,slinear_le:16,ulinear_le:16*,slinear_be:16*,ulinear_be:16*

properties=full_duplex,mmap,independent
full_duplex=0
fullduplex=0
blocksize=4384
hiwat=14
lowat=0
monitor_gain=0
mode=
play.rate=44100
play.channels=1
play.precision=8
play.encoding=mulaw
play.gain=127
play.balance=32
play.port=0x0
play.avail_ports=0x0
play.seek=800
play.samples=65136
play.eof=0
play.pause=0
play.error=1
play.waiting=0
play.open=0
play.active=0
play.buffer_size=65536
record.rate=8000
record.channels=1
record.precision=8
record.encoding=mulaw
record.gain=191
record.balance=32
record.port=0x2
record.avail_ports=0x7
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.errors=0
**




openbsd-remigio# audioctl record.rate=22050
audioctl: set failed: Invalid argument


I can not change anything, I always get the same error message.

I will apreciate your help. Am I missing something?

Thanks in advance.


Ramiro
PS: (from Spain, sorry, my english is not very precise)




--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.9/72 - Release Date: 14/8/2005