Re: cmpci(4) and S/PDIF?

2011-06-09 Thread Jacob Meuser
On Thu, Jun 09, 2011 at 05:01:39PM +, Christian Weisgerber wrote:
> Eventually I also picked up a Sweex SC015 card.  (These are readily
> available in Europe at the time of writing.)
> 
> cmpci0 at pci1 dev 2 function 0 "C-Media Electronics CMI8738/C3DX Audio" rev 
> 0x10: ivec 0x7d5
> audio1 at cmpci0
> opl at cmpci0 not configured
> mpu at cmpci0 not configured
> 
> Playing stereo audio at 44.1 and 48 kHz over S/PDIF works.  The
> relevant mixer knob is this:
> 
>   playback.mode=dac  [ dac spdif ]
> 
> Set to "spdif" for S/PDIF output, "dac" (default) for analog output.
> 
> This particular card also has a two-pin "CD S/PDIF" header.  If you
> have an optical drive with a two-pin "digital audio" output, you
> can connect it to the card, and then enable a by-pass mode where
> audio from the drive is directly output to S/PDIF without the CPU
> having to read any data.  The mixer controls involved are these:
> 
>   spdif.input=spdin1  [ spdin1 spdin2 spdout ]
>   spdif.output=playback  [ playback spdin ]
> 
> Set spdif.input=spdin2 to select the CD input and spdif.output=spdin
> to direct it to the card's S/PDIF output.
> 
> Strangely, AC3/DTS pass-through does *not* work.  Neither for normal
> playback with MPlayer, nor for a DTS CD using the S/PDIF by-pass.
> My A/V receiver just remains silent or reports a decoding error.

there's this comment in cmpci.c:

 /* disable ac3 and 24 and 32 bit s/pdif modes */

and then the relevant register bits are cleared.  feel free to play
with making it work ;)  I imagine you'll need a mixer control to
select ac3 mode.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: USB Webcam

2011-06-07 Thread Jacob Meuser
On Wed, Jun 08, 2011 at 10:51:35AM +0800, Nick Coleman wrote:
> I would like to get a USB webcam working on my PowerPC OpenBSD 4.9
> install.  I'm an OpenBSD newbie.
> 
> When I plug it in, the kernel registers the USB device, but doesn't
> go any further to recognise it as a video device.  The last line
> of dmesg is:
> ugen1 at uhub1 port 1 "Vimicro Corp. PC Camera" rev 1.10/1.00 addr 3
> 
> The following is from my Slackware box (for info on the device type
> and the drivers):
> --Start Slackware---
> 
> mplayer recognises it using the V4L2 driver:
> $ mplayer -tv device=/dev/video1 tv://
> MPlayer UNKNOWN-4.2.4 (C) 2000-2009 MPlayer Team
> 115 audio & 237 video codecs
> Playing tv://.
> TV file format detected.
> Selected driver: v4l2
>  name: Video 4 Linux 2 input
>  author: Martin Olschewski 
>  comment: first try, more to come ;-)
> Selected device: PC Camera
>  Capabilites:  video capture  read/write  streaming
>  supported norms:
>  inputs: 0 = zc3xx;
>  Current input: 0
>  Current format: unknown (0x4745504a)
> 
> >From Slackware's dmesg:
> usb 2-1: new full speed USB device using uhci_hcd and address 2
> usb 2-1: New USB device found, idVendor=0ac8, idProduct=301b



> gspca: main v2.4.0 registered
> gspca: probing 0ac8:301b
> zc3xx: probe 2wr ov vga 0x
> zc3xx: probe sensor -> 11
> zc3xx: Find Sensor HV7131R(c)
> PM: Adding info for No Bus:video1
> gspca: probe ok
> usbcore: registered new interface driver zc3xx
> zc3xx: registered

this is not UVC compliant, so uvideo(4) doesn't support it.  in linux
this is using the gspca driver: http://mxhaard.free.fr/spca5xx.html  there
is no driver for this device in OpenBSD, sorry.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Interesting panic during boot

2011-06-03 Thread Jacob Meuser
On Fri, Jun 03, 2011 at 06:59:17PM -0500, Amit Kulkarni wrote:
> >>The dmesg is needed. This looks like the disk/usb stick is not being
> >>found by the OS.
> >
> > I was afraid of that.
> >
> > Dealing with the first apparent problem, that most of the dmesg scrolls
> > off the screen, looks to be easy; a quick look at the source reveals
> > that ddb has an apparently undocumented 'dmesg' command.
> >
> > Actually capturing the dmesg looks to be harder; given that this is a
> > store demo system to which I have very limited access I'm not sure I've
> > got any better way than hand-writing it all.  I've got a couple of ideas
> > for easier ways to try, but it will take a few days.  Are there any
> > parts of the dmesg that are known to be unnecessary for this purpose, so
> > I can avoid the work of copying them if I have to fall back to writing
> > everything down and retyping it?
> >
> > Now that I've had time to think about this a bit, I'd guess that the
> > problem is some new USB controller that OpenBSD doesn't yet understand.
> > If so, am I correct that all that's really needed is the vendor ID and
> > device ID of the controller?  I'll check for this first, now that I know
> > how to view the whole dmesg after the panic.
> >
> > FWIW this stick boots just fine on lots of other systems, both before
> > and after this problem system.
> 
> AFAIK, if its a USB 3 controller, it is unsupported in OpenBSD.

there must be some {e,o,u}hci controller on the machine, or
there wouldn't be usb task threads running.

really need a dmesg to know what happened here.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: html5 video and browsers

2011-05-10 Thread Jacob Meuser
On Tue, May 10, 2011 at 12:21:53PM +0200, David Coppa wrote:
> On Tue, May 10, 2011 at 12:04 PM, LEVAI Daniel  wrote:
> > Hi!
> >
> > I'm trying out youtube with html5 videos, and I have few question to the
> > fellow video watchers.
> >
> > In mozilla-firefox I can't even enable html5 in youtube :/
> 
> Uh!?!
> Works perfectly on my system (mozilla-firefox-4.0.1p2)
> 
> > In chrome the video plays, but without sound.
> 
> This should be investigated, indeed.

this is known.  there is no sound support for OpenBSD in chrome.
instead of using an existin audio API like portaudio, that already
supports mosts OSes (or at least the ones google cares about), they
go and invent another one.  why?  because obviously google focuses
on audio APIs.  that's obviously what google is best at, duh!

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: uaudio

2011-05-08 Thread Jacob Meuser
On Sun, May 08, 2011 at 08:18:39PM +0200, Jan Stary wrote:
> On May 07 12:21:30, Alexandre Ratchov wrote:
> > On Sat, May 07, 2011 at 10:52:09AM +0200, Jan Stary wrote:
> > > 
> > > I just bought me the "new" M-Audio USB MobilePre (MK-II):
> > > 
> > > uaudio0 at uhub2 port 2 configuration 1 interface 0 "M-Audio MobilePre" 
> > > rev 1.10/10.00 addr 2
> > > uaudio0: audio rev 1.00, 0 mixer controls
> > > audio0 at uaudio0
> > > 
> > > Indeed, 'mixerctl -a' shows nothing; but 
> > > aucat -u -C 0:1 -e s24le -r 48000 -o in.wav
> > > seems to be recording anyway (and the sound
> > > is very good).
> > 
> > Cool.
> 
> Is it OK for an uaudio(4) device to have 0 mixer controls?

absolutely.

> I can control the respective inputs/outputs with the device's (hardware)
> knobs, but having 0 (software) mixerctl variables still seems a bit strange.
> Is it possible that the device really has 0 controls to expose via USB
> audio (and uaudio just correctly reports that), or is this a sign that
> the dovice is not fully supported (or possibly not class-compliant)?

if there are hardware controls, then there probably aren't software
controls.  they would sorta conflict otherwise, no?

> What would be the correct way to find out what the device can physically do?
> All I know about is .../cap.c somewhere in the audio source tree. Is there
> a 'real' tool, exposed and documented?

faq 13.1.  hmm, maybe that should also have an explicit example of
'$ audioctl encodings'.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: issues with acer aspire one (now tested with -current)

2011-04-21 Thread Jacob Meuser
On Wed, Apr 20, 2011 at 09:54:17PM -0400, Kent Watsen wrote:

> 2. no sound
> ---
> Still no sound
> 
> Like reported lasted time, this may be due to the 'azalia' driver being used 
> instead of the 'auich' driver.  I deduced this before since sound worked 
> under Linux where the audio device as "Intel Corp N10/ICH 7 Family HD Audio 
> Controller (rev 02)".  So, if "ICH7" is needed, then that implies it should 
> be the 'auich' driver, right?

no.  azalia(4) supports the HD audio interface on ich.  see azalia(4).

there's perhaps a gpio that controls eapd or somesuch.

can you please send the output of '# pcidump -x 0:27:0' ?  thanks for
including a dmesg.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Webcam detected as uaudio(4) device

2011-03-20 Thread Jacob Meuser
On Sun, Mar 20, 2011 at 11:47:19AM -0600, Anthony J. Bentley wrote:
> Hi Jacob,
> 
> > > uaudio0 at uhub1 port 1 configuration 1 interface 1 "Logitech Camera" rev 
> > > 2.0
> > 0/1.00 addr 2
> > > uaudio0: audio descriptors make no sense, error=4
> > > ugen0 at uhub1 port 1 configuration 1 "Logitech Camera" rev 2.00/1.00 
> > > addr 2
> > > 
> > > Should it should be connecting to uvideo(4) instead?
> > > 
> > > 
> > > usbdevs -v:
> > 
> > you need to look at the descriptors.  usbctl from the usbutil package.
> > 
> > > Controller /dev/usb0:
> > 
> > >  port 5 addr 4: high speed, power 500 mA, config 1, BisonCam, NB 
> > > Pro(0x0203
> > ), Bison Electronics Inc.(0x5986), rev 3.08
> > 
> > usbctl -f /dev/usb0 -a 4
> 
> Here is the output of usbctl -f /dev/usb1 -a 2. (The BisonCam is a
> different built-in webcam that works.) Someone pointed out that the
> Logitech may have a microphone built in that makes it come up as uaudio.
> But even then it doesn't work--comes up as /dev/uaudio0 in the log, but
> "ls /dev/uaudio0" says it doesn't exist.

there won't ever be a /dev/uaudio*.  you only get access to the generic
audio(4) interface for all audio devices.

> DEVICE addr 2
> DEVICE descriptor:
> bLength=18 bDescriptorType=device(1) bcdUSB=2.00 bDeviceClass=255 
> bDeviceSubClass=255
> bDeviceProtocol=255 bMaxPacketSize=8 idVendor=0x046d idProduct=0x08f5 
> bcdDevice=100
> iManufacturer=0() iProduct=1(Camera) iSerialNumber=0() bNumConfigurations=1
> 
> CONFIGURATION descriptor 0:
> bLength=9 bDescriptorType=config(2) wTotalLength=173 bNumInterface=3
> bConfigurationValue=1 iConfiguration=0() bmAttributes=80 bMaxPower=100 mA
> 
> INTERFACE descriptor 0:
> bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 bAlternateSetting=0
> bNumEndpoints=2 bInterfaceClass=255 bInterfaceSubClass=255
> bInterfaceProtocol=255 iInterface=0()
> 
> ENDPOINT descriptor:
> bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=1-in
> bmAttributes=isochronous wMaxPacketSize=0 bInterval=1
> 
> ENDPOINT descriptor:
> bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=2-in
> bmAttributes=interrupt wMaxPacketSize=1 bInterval=16
> 
> INTERFACE descriptor 1:
> bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 bAlternateSetting=1
> bNumEndpoints=2 bInterfaceClass=255 bInterfaceSubClass=255
> bInterfaceProtocol=255 iInterface=0()
> 
> ENDPOINT descriptor:
> bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=1-in
> bmAttributes=isochronous wMaxPacketSize=1023 bInterval=1
> 
> ENDPOINT descriptor:
> bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=2-in
> bmAttributes=interrupt wMaxPacketSize=1 bInterval=16
> 

the above interfaces are probably the video interfaces.  they
are not uvc compliant.

below are all audio interfaces.  this claims to be usb audio 2.0
compliant.  uaudio(4) does not have full support for usb audio 2.0
at this time.

> INTERFACE descriptor 2:
> bLength=9 bDescriptorType=interface(4) bInterfaceNumber=1 bAlternateSetting=0
> bNumEndpoints=0 bInterfaceClass=1 bInterfaceSubClass=1
> bInterfaceProtocol=0 iInterface=0()
> 
> AC interface descriptor
> bLength=9 bDescriptorType=cs_interface(36) bDescriptorSubtype=header(1) 
> bcdADC=2.00
> wTotalLength=39 bInCollection=1
> baInterfaceNr[0]=2
> 
> AC unit descriptor
> Input terminal descriptor
> bLength=12 bDescriptorType=cs_interface(36) bDescriptorSubtype=2
> bTerminalId=1 wTerminalType=513 bAssocTerminal=0
> bNrChannels=1 wChannelConfig=
> iChannelNames=0 iTerminal=0
> 
> AC unit descriptor
> Feature unit descriptor
> bLength=9 bDescriptorType=cs_interface(36) bDescriptorSubtype=6
> bUnitId=2 bSourceId=1 bControlSize=2
> bmaControls[0]=0043
> 
> AC unit descriptor
> Output terminal descriptor
> bLength=9 bDescriptorType=cs_interface(36) bDescriptorSubtype=3
> bTerminalId=3 wTerminalType=257 bAssocTerminal=0
> bSourceId=2 iTerminal=0
> 
> INTERFACE descriptor 3:
> bLength=9 bDescriptorType=interface(4) bInterfaceNumber=2 bAlternateSetting=0
> bNumEndpoints=1 bInterfaceClass=1 bInterfaceSubClass=2
> bInterfaceProtocol=0 iInterface=0()
> 
> ENDPOINT descriptor:
> bLength=9 bDescriptorType=endpoint(5) bEndpointAddress=3-in
> bmAttributes=isochronous wMaxPacketSize=0 bInterval=1
> 
> INTERFACE descriptor 4:
> bLength=9 bDescriptorType=interface(4) bInterfaceNumber=2 bAlternateSetting=1
> bNumEndpoints=1 bInterfaceClass=1 bInterfaceSubClass=2
> bInterfaceProtocol=0 iInterface=0()
> 
> bLength=7 bDescriptorType=cs_interface(36) bDescriptorSubtype=as_general(1)
> bTerminalLink=3 bDelay=1 wFormatTag=1
> 
> bLength=20 bDescriptorType=cs_interface(36) bDescriptorSubtype=format_type(2)
> bFormatType=1 bNrChannels=1 bSubFrameSize=2
> bBitResolution=16 bSamFreqType=4
> tSamFreq[0]=8000
> tSamFreq[1]=11025
> tSamFreq[2]=16000
> tSamFreq[3]=22050
> 
> ENDPOINT descriptor:
> bLength=9 bDescriptorType=endpoint(5) bEndpointAddress=3-in
> bmAttributes=isochronous wMaxPacketSize=52 bInterval=1
> 
> bLength=7 bDescriptorType=cs_endpoint(37) bDescriptorSubtype=as_ge

Re: Webcam detected as uaudio(4) device

2011-03-20 Thread Jacob Meuser
On Sat, Mar 19, 2011 at 05:06:44PM -0600, Anthony J. Bentley wrote:
> Hi,
> 
> I have a USB webcam. No model number on the cam, but looks to be a
> Logitech QuickCam Communicate STX.
> 
> When I plug it in, I get this:
> 
> uaudio0 at uhub1 port 1 configuration 1 interface 1 "Logitech Camera" rev 
> 2.00/1.00 addr 2
> uaudio0: audio descriptors make no sense, error=4
> ugen0 at uhub1 port 1 configuration 1 "Logitech Camera" rev 2.00/1.00 addr 2
> 
> Should it should be connecting to uvideo(4) instead?
> 
> 
> usbdevs -v:

you need to look at the descriptors.  usbctl from the usbutil package.

> Controller /dev/usb0:

>  port 5 addr 4: high speed, power 500 mA, config 1, BisonCam, NB Pro(0x0203), 
> Bison Electronics Inc.(0x5986), rev 3.08

usbctl -f /dev/usb0 -a 4

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: USB devices not detected on boot / recent 4.9 snapshot

2011-02-28 Thread Jacob Meuser
On Mon, Feb 28, 2011 at 11:57:20PM +0100, pet...@schwertfisch.de wrote:
> Hi,
> 
> using a recent snapshot of 4.9, some USB devices are no longer
> attached on boot. They used to be detected/attached automatically
> in OpenBSD 4.8.
> 
> The dmesg outputs attached below show how my KORG nanokontrol midi
> controller gets attached in 4.8 but is completely ignored in the
> recent snapshot.
> 
> After booting, if I disconnect/reconnect it, the device LED lights
> up shortly, then turns off again (no console output).
> 
> If I then connect it to a different port, it gets attached and works
> normally. Afterwards, when connected to the original port again, it
> works as well.

can you boot with the following diff and send me the dmesg?  this is
to see if the hub is recognising a device has been inserted.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: uhub.c
===
RCS file: /cvs/src/sys/dev/usb/uhub.c,v
retrieving revision 1.57
diff -u -p uhub.c
--- uhub.c  25 Jan 2011 20:03:36 -  1.57
+++ uhub.c  28 Feb 2011 23:56:37 -
@@ -593,6 +593,8 @@ uhub_intr(usbd_xfer_handle xfer, usbd_private_handle a
struct uhub_softc *sc = addr;
 
DPRINTFN(5,("uhub_intr: sc=%p\n", sc));
+   printf("%s: %s: %s\n", __func__, sc->sc_dev.dv_xname,
+   usbd_errstr(status));
if (status == USBD_STALLED)
usbd_clear_endpoint_stall_async(sc->sc_ipipe);
else if (status == USBD_NORMAL_COMPLETION)



Re: Problems with USB on 4.9

2011-02-22 Thread Jacob Meuser
On Tue, Feb 22, 2011 at 08:21:48PM +, Dennis den Brok wrote:
> Kenneth R Westerback  write:
> > Are there powered/unpowered hubs involved? This sounds like marginal power
> > might be a culprit. i.e. more power would resolve it. As it does most
> > things. :-)
> 
> Well, the devices are connected to the motherboard's ports on the
> back, which I think should be full power. NetBSD seemed to work
> fine for months on the same machine (although on very rare occasions,
> it disabled ports due to "device problems", but this happened on
> various machines with various USB devices, so I used to suspect a
> software problem).

it does seem to be that the hub has disabled a port. that is done by
the usb stack when the "disabling port" message appears.  but that
only happens when trying to attach a device, and I don't see any
other code that's intentionally disabling ports.  and afaics, the
only times the usb stack does anything to ports is when a device
is attached or detached.

I wish I could at least give some ideas about how to debug this,
but I'm basically without any ideas right now.  sorry.  I'll
keep thinking about it.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Problems with USB on 4.9

2011-02-22 Thread Jacob Meuser
On Tue, Feb 22, 2011 at 08:05:57AM +, Dennis den Brok wrote:
> Jacob Meuser  wrote:
> > there's no usbdevs data for Kyocera product 0x0015.  so not getting
> > a product name isn't terribly surprising.  the device could provide
> > this but it isn't required.  however, if the product name does get
> > printed for a while then the name is no longer printed ... there's
> > a problem somewhere.
> 
> Yes, that's what happens.
> 
> > as far as usb devices stopping to work, when this happens, could you
> > please send me the output of 'top -S -n 200 | grep usb'?  and could
> > you provide examples of what 'USB devices seemingly randomly stop
> > working' means too?  thanks.
> 
> Devices stop working an obvious cause: the USB printer, for instance,
> has been on for approximately 24 hours before it stopped working.
> Sometimes I start the computer, leave it for half an hour, and when
> I return, the USB keyboard does not work anymore (and again, only
> the device ID is printed by usbdevs, not the device's name).
> 
> The output of "top -S -n 200 | grep usb" is:
> 
> 8 root  1000K   46M idle  usbtsk0:00  0.00% usbtask
> 7 root  1000K   46M idle  usbatsk   0:00  0.00% usbatsk
> 
> Thanks,
> 
> Dennis den Brok

interesting.  do all devices stop working at the same time (I mean,
if one stops working, do they all stop working)?  does unplugging
and replugging the devices (to a possibly different USB port) make
them work again?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Problems with USB on 4.9

2011-02-21 Thread Jacob Meuser
On Mon, Feb 21, 2011 at 11:27:00PM +, Dennis den Brok wrote:
> Dennis den Brok  schrieb:
> > I'm running a recent snapshot of 4.9/i386 and occasionally have to
> > reboot the system because USB devices seemingly randomly stop
> > working. The only symptom apart from that which is obvious to me
> > is that "usbdevs" does not print the device's name anymore, just
> > the vendor's, followed by the device's id: [...]
> 
> Following up to myself...
> 
> I forgot to mention that I don't know whether this is a regression,
> I've been running 4.8 only shortly, and the problem is neither
> reproducable nor does it occur very often.
> 
> Regards,
> 
> Dennis den Brok

there's no usbdevs data for Kyocera product 0x0015.  so not getting
a product name isn't terribly surprising.  the device could provide
this but it isn't required.  however, if the product name does get
printed for a while then the name is no longer printed ... there's
a problem somewhere.

as far as usb devices stopping to work, when this happens, could you
please send me the output of 'top -S -n 200 | grep usb'?  and could
you provide examples of what 'USB devices seemingly randomly stop
working' means too?  thanks.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: connecting ubt0 to a wireless audio

2011-02-17 Thread Jacob Meuser
On Thu, Feb 17, 2011 at 12:33:51PM -0600, Bryan wrote:
> On Thu, Feb 17, 2011 at 11:37, Bryan  wrote:
> > I have an MW600 from Sony Ericsson, that I can pair to my Droid, and
> > the passcode is "". B I recently picked up a SparkLAN WPEA-111N
> > which attaches to ral(4) and ubt(4):
> >
> 
> Well hell, now all I'm getting is kernel panics when I run "btconfig ubt0 up"

don't expect btsco(4) to work reliably, even if the bluetooth layer
itself works.  btsco(4) uses audio_hw_if->start_{output,input}.  these
can only work with "realtime" operating systems, since they require
that the kernel fills the next audio buffer in an isr.  this means the
isr needs to be run within microseconds of interrupt generation.  I've
seen delays of over 100 ms between interrupt generation and isr
execution with azalia(4) on MP systems.  using uaudio(4) on an MP
system will give an idea of how bad this is (and uaudio actually does
do some bufferring in the usb layer; btsco would be much worse).


> 
> Trace:  (sorry about the pics, trying to get a pic without a big white
> spot in the middle was difficult)
> 
> https://picasaweb.google.com/lh/photo/0yKxojKmEV9D1dAagSjvUROK7QTsO1pAa7ZYbjM
> kzoc?feat=directlink
> https://picasaweb.google.com/lh/photo/18pGUXQNVwlzBA3C5OnRxROK7QTsO1pAa7ZYbjM
> kzoc?feat=directlink
> 
> PS:
> 
> https://picasaweb.google.com/lh/photo/7De2m0Z3Z6zS2HU9iQ3NxxOK7QTsO1pAa7ZYbjM
> kzoc?feat=directlink
> https://picasaweb.google.com/lh/photo/7IX6Q5k9GRO9Vl42BcbpVxOK7QTsO1pAa7ZYbjM
> kzoc?feat=directlink
> 
> dmesg:
> 
> OpenBSD 4.9 (GENERIC.MP) #57: Wed Feb 16 23:02:26 CST 2011
>r...@obsd-amd64.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 3707031552 (3535MB)
> avail mem = 3594334208 (3427MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf6530 (57 entries)
> bios0: vendor Dell Inc. version "A24" date 08/19/2010
> bios0: Dell Inc. Latitude E6500
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP HPET DMAR APIC ASF! MCFG SLIC SSDT
> acpi0: wakeup devices PCI0(S4) PCIE(S4) USB1(S0) USB2(S0) USB3(S0)
> USB4(S0) USB5(S0) USB6(S0) EHC2(S0) EHCI(S0) AZAL(S3) RP01(S4)
> RP02(S4) RP03(S4) RP04(S3) RP05(S3) RP06(S5) LID_(S3) PBTN(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz, 2660.40 MHz
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,S
> SSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
> cpu0: 3MB 64b/line 8-way L2 cache
> cpu0: apic clock running at 266MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM)2 Duo CPU P8800 @ 2.66GHz, 2660.00 MHz
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS
> H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,S
> SSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE,NXE,LONG
> cpu1: 3MB 64b/line 8-way L2 cache
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 0, remapped to apid 2
> acpimcfg0 at acpi0 addr 0xf800, bus 0-63
> acpiprt0 at acpi0: bus 3 (PCIE)
> acpiprt1 at acpi0: bus -1 (AGP_)
> acpiprt2 at acpi0: bus 11 (RP01)
> acpiprt3 at acpi0: bus 12 (RP02)
> acpiprt4 at acpi0: bus 13 (RP03)
> acpiprt5 at acpi0: bus 14 (RP04)
> acpiprt6 at acpi0: bus -1 (RP05)
> acpiprt7 at acpi0: bus -1 (RP06)
> acpiprt8 at acpi0: bus 0 (PCI0)
> acpiec0 at acpi0
> acpicpu0 at acpi0: C3, C2, C1, PSS
> acpicpu1 at acpi0: C3, C2, C1, PSS
> acpitz0 at acpi0: critical temperature 107 degC
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: PBTN
> acpibtn2 at acpi0: SBTN
> acpiac0 at acpi0: AC unit offline
> acpibat0 at acpi0: BAT0 model "DELL KY26603" serial 5171 type LION oem
> "Sanyo"
> acpibat1 at acpi0: BAT1 not present
> acpivideo0 at acpi0: VID_
> acpivideo1 at acpi0: VID_acpivout0 at acpivideo1: CRT_
> acpivout1 at acpivideo1: LCD_
> acpivout2 at acpivideo1: DP__
> acpivout3 at acpivideo1: DP2_
> acpivout4 at acpivideo1: DVI_
> acpivout5 at acpivideo1: DVI2
> acpivideo2 at acpi0: VID2
> cpu0: Enhanced SpeedStep 2660 MHz: speeds: 2668, 2667, 2134, 1600, 800 MHz
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
> vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> intagp0 at vga1
> agp0 at intagp0: aperture at 0xe000, size 0x1000
> inteldrm0 at vga1: apic 2 int 16 (irq 11)
> drm0 at inteldrm0
> "Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
> em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: apic 2
> int 22 (irq 10), address 00:2
> 6:b9:c5:4b:48
> uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2
> int 20 

Re: Printing (well anything) using lpd...

2011-02-01 Thread Jacob Meuser
On Tue, Feb 01, 2011 at 03:59:02PM +0100, Manuel Giraud wrote:
> Jacob Meuser  writes:
> 
> > foomatic is pretty easy to set up.
> 
> Thread hijacker here. I tried to setup a lpd/foomatic for a printer over
> network and always end-up with this kind of message in
> /var/log/lpd-errs:

> Well. Searching the web, this seems to be related to this:
> http://old.nabble.com/foomatic-stops-working-again-td29285534.html#a29287775
> And might be already fixed in -current (i think i should shut up and
> test then).

as we're now at 4.9-beta, it's definitely a good time to be testing
-current.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Printing (well anything) using lpd...

2011-01-31 Thread Jacob Meuser
On Mon, Jan 31, 2011 at 09:37:24AM +, Dennis den Brok wrote:
> Jan Stary  schrieb:
> > "fo" just forces a form feed;
> > it doesn't "turn PS support on/off" or whatever.
> 
> Certainly not, but it seems the printer is picky about recognizing
> PostScript as such. I don't know what data actually hits the wire,
> maybe there is some bogus data sent before the actual PostScript,
> but the form feed apparently cures that. Funnily, I only need this
> under NetBSD.  Under OpenBSD, it does not have any effect, printing
> always works, or rather works even worse but with pleasant effect:
> first, an essentially blank page with a few characters sprinkled
> across is printed, but then the PostScript sent is printed correctly.
> 
> As this is still a problem for me and I don't know how to fix it,
> maybe I may hijack this thread and ask for a possible solution?

:sh: ?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: openbsd : bluetooth : 2.1 : support?

2011-01-30 Thread Jacob Meuser
On Sun, Jan 30, 2011 at 02:39:23PM +0100, MERIGHI Marcus wrote:
> mayur...@kathe.in (Mayuresh Kathe), 2011.01.30 (Sun) 09:57 (CET):
> > i plan to purchase the following device;
> > http://www.edimax.com/en/produce_detail.php?pd_id=289&pl1_id=13&pl2_id=78
> > i intend to use it to connect to the internet over a gprs based cell
> > phone via bluetooth. is this kind of connectivity possible under
> > openbsd at the moment?
> 
> If your bluetooth dongle works, yes:
> 
> http://marc.info/?l=openbsd-misc&m=124085846000680
> 
> Please do your homework of searching yourself, next time.
> 
> Bye, 
> 
> Marcus

the bluetooth stack is busted.  it sleeps while holding mutexes all over
the place.  expect panics due to this.  it used to /work/, because
we used to let this mutex sloppiness slide, but this is no longer the
case.  someone who cares about bluetooth should fix it.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Printing (well anything) using lpd...

2011-01-30 Thread Jacob Meuser
On Sun, Jan 30, 2011 at 12:57:20PM -0500, Ted Unangst wrote:
> On Sat, Jan 29, 2011 at 11:48 PM, Bryan  wrote:
> > I have been hampered with this for a few years now, and at most times,
> > it was easier to copy the file to a Windows box and print.  But I'm
> > tired of having to do this, and have begun researching how to print to
> > a printer on the network.  I recently bought a Brother 9840CDW, which
> > supports lpd and postscript.  It also allows for FTP of files to queue
> > among other things.  It's probably more printer (scanner, fax, copier)
> > than I need, but I'm tired of HP printers and the toner issues they
> > have.  It is a really nice printer in Windows, and the scanner is most
> > excellent and fast.  And according to the LInux foundation site
> > (http://www.linuxfoundation.org/collaborate/workgroups/openprinting)
> > it works perfectly.  Of course, I have to take this with a grain of
> > salt, because of Linux's willingness to add proprietary drivers,
> > firmware, etc.
> 
> While I think it's possible to print using lpd, and people have done
> it, I found it to be about 10x easier to install cups and use that.

cups may be a little eaier to set up, but when I used it a lot, it was
an endless source of headaches to keep running.

> You go to localhost:631, type in the printer's name, upload a ppd file
> downloaded from linuxprinting, and done.

careful.  those downloaded ppds may expect a different configuration
of software packages than what's in OpenBSD's packages.  ppds and the
tools to create them are provided in the OpenBSD packages collection.

> You can make lpd and postscript work if you know how they work, but
> figuring things out if you don't can take a long time.

foomatic is pretty easy to set up.  basically any printer that is
supported by any kind of "free" software will work.  check out
openprinting.org's printer database.  (the foomatic developers
are also responsible for openprinting.org.) it'll tell you what you
need to print with your printer.  then follow the directions (i.e.
basically cut-n-paste) in /usr/local/share/doc/pkg-readmes/foomatic-*.

I've used lpd/foomatic for epson and hp printers (gutenprint and
hpijs/hplip drivers).  often people claim they only work with cups,
but this is simply not true.

fwiw, cups uses foomatic internally.  that's how it supports all those
printers.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Audio noise with "Intel SCH HD Audio"

2011-01-28 Thread Jacob Meuser
On Thu, Jan 27, 2011 at 04:58:39AM -0500, sergey.k...@gmail.com wrote:
> Today I've checked audio support.
> 
>   azalia0 at pci0 dev 27 function 0 "Intel SCH HD Audio" rev 0x07: apic 2 
> int 22 (irq 10)
>   azalia0: codecs: Realtek ALC272
>   audio0 at azalia0
> 
> With vorbis-tools-1.4.0 `ogg123 song45.ogg` - I can hear music, but with a 
> big noise.
> It works well in Linux
> 
>   $ lspci -vvv -s 00:1b.0
>   00:1b.0 Audio device: Intel Corporation System Controller Hub (SCH 
> Poulsbo) HD Audio Controller (rev 07)
> Subsystem: Acer Incorporated [ALI] Device 0244
> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
> Stepping- SERR- FastB2B- DisINTx-
> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
> SERR-  Latency: 0, Cache Line Size: 64 bytes
> Interrupt: pin A routed to IRQ 22
> Region 0: Memory at b005 (64-bit, non-prefetchable) [size=16K]
> Capabilities: 
> Kernel driver in use: HDA Intel
> Kernel modules: snd-hda-intel
> 
> How can to found the problem and fix it?

do other audio applications also have noise?  what happens with
'cat /dev/zero > /dev/audio' ?  also check the faq, section 13.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Keyboard bell and attach.

2011-01-26 Thread Jacob Meuser
On Thu, Jan 27, 2011 at 12:55:51AM +1030, David Walker wrote:
> I have a machine at work, beige box with 4.8 on it that doesn't like hotplugd.

> I thought it might be the issue with 16 USB devices failing attach so

> Any ideas welcome.

try -current

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: failure to mount: "invalid argument"

2011-01-15 Thread Jacob Meuser
On Sun, Jan 16, 2011 at 10:23:09AM +1100, Brett wrote:
> On 01/16/11 09:25, Ed Ahlsen-Girard wrote:
> >New disk for backups (1TB, first 250G NTFS for a Windows box, 500G ffs,
^^^
> >remainder unpartitioned, so:
> >
> 
> >
> >16 partitions:
> >#size   offset  fstype [fsize bsize  cpg]
> >   a:   1024015040512007616  4.2BSD   4096 327681
> >   c:   19535251680  unused
> >   i:512007552   63NTFS
> >
> >Mount attempt:
> >
> >$sudo mount_ffs /dev/sd0a /TB
> >Password:
> >mount_ffs: /dev/sd0a on /TB: Invalid argument
> >
> >/TB exists, permissions are 777, owned root:wheel.
> >
> >The NTFS partition was created first, since WIndows snivels about that
> >sort of thing.  What am I messing up?
> >
> >
> From disklabel(5):
> 
> "By convention, the `a' partition of the boot disk is the root
   ^
> partition, and the `b' partition of the boot disk is the swap
> partition, but all other letters can be used in any order for any
> other partitions as desired."
> 
> Try using a letter after c in the alphabet when creating your disklabel.

that's not the problem.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: failure to mount: "invalid argument"

2011-01-15 Thread Jacob Meuser
I have gotten reports that multiple filesystems on umass(4) doesn't
work, but haven't had a chance to look into it.  apparently you are
hitting the same issue.

On Sat, Jan 15, 2011 at 05:22:40PM -0600, Ed Ahlsen-Girard wrote:
> On Sat, 15 Jan 2011 16:25:43 -0600
> Ed Ahlsen-Girard  wrote:
> 
> Forgot dmesg:
> 
> OpenBSD 4.8-current (GENERIC) #614: Mon Jan 10 00:15:18 MST 2011
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC



> umass0 at uhub0 port 5 configuration 1 interface 0 "JMicron USB to ATA/ATAPI 
> bridge" rev 2.00/1.00 addr 2
> umass0: using SCSI over Bulk-Only
> scsibus2 at umass0: 2 targets, initiator 0
> sd0 at scsibus2 targ 1 lun 0:  SCSI2 0/direct 
> fixed
> sd0: 953869MB, 512 bytes/sec, 1953525168 sec total
> 
> 
> > New disk for backups (1TB, first 250G NTFS for a Windows box, 500G
> > ffs, remainder unpartitioned, so:
> > 
> > # /dev/rsd0c:
> > type: SCSI
> > disk: SCSI disk
> > label: HDS721010CLA332 
> > duid: 8f7cc589a5b8d0d1
> > flags:
> > bytes/sector: 512
> > sectors/track: 63
> > tracks/cylinder: 255
> > sectors/cylinder: 16065
> > cylinders: 121601
> > total sectors: 1953525168
> > boundstart: 0
> > boundend: 1953525168
> > drivedata: 0 
> > 
> > 16 partitions:
> > #size   offset  fstype [fsize bsize  cpg]
> >   a:   1024015040512007616  4.2BSD   4096 327681 
> >   c:   19535251680  unused   
> >   i:512007552   63NTFS   
> > 
> > Mount attempt:
> > 
> > $sudo mount_ffs /dev/sd0a /TB
> > Password:
> > mount_ffs: /dev/sd0a on /TB: Invalid argument
> > 
> > /TB exists, permissions are 777, owned root:wheel.
> > 
> > The NTFS partition was created first, since WIndows snivels about that
> > sort of thing.  What am I messing up?
> > 
> > 
> 
> 
> 
> -- 
> 
> Edward Ahlsen-Girard
> Ft Walton Beach, FL

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: crash when running kismet with urtw(4) device

2011-01-11 Thread Jacob Meuser
On Tue, Jan 11, 2011 at 04:14:50PM +0100, Benjamin Nadland wrote:
> If I run kismet this (handwritten transcript) happens:
> 
> # kismet
> [some kismet initialization output]
> Gathering packets...
> [from now on text is white on blue]
> uvm_fault(0xd0a26a60, 0xf000, 0, 1) -> e
> kernel: page fault trap, code=0
> Stopped at  urtw_rxeof+0x215:  movzwl 0(%eax),%eax
> ddb{0}> trace
> urtw_rxeof(d1e8a100,d204e038,0,a,d1e8a100) at urtw_rxeof+0x215
> usb_transfer_complete(d1e8a100,d1e8a100,dcc10ef0,dcc10ef4,d1e52200) at 
> usb_transfer_complete+0x22b
> ehci_softintr(d1ef5800,282,0,0,d02021ae) at ehci_softintr+0x37
> softintr_dispatch(1) at softintr_dispatch+0x4f
> Xsoftnet() at Xsoftnet+0x17
> --- interrupt ---
> cpu_idle_cycle(d0ae34a0) at cpu_idle_cycle+0xf
> Bad frame pointer: 0xd0b9ae48
> ddb{0}> ps
>PID   PPID  PGRP  UID  S  FLAGSWAIT  COMMAND
> 29416   31101  32050  3  0x280  select  kismet_server
> 311013205  3205  547  3  0x2004180  select  kismet_server
>  3205   19753  32050  3  0x2004080  select  kismet
>  [...]
> (
>  Additional entries:
>  ksh, 4x getty, cron, apmd, polipo, tor, adsuck,
>  srdis, aucat, inetd, 9x smtpd, sshd, 2x pflogd, 2x syslogd,
>  aiodoned, update, cleaner, reaper, pagedaemon, crypto,
>  pfpurge, usbtask, usbatsk, sdmmc0, intelrel, acpi0,
>  idle1, syswq, idle0, kmthread, init, swapper
>  
>  Note: usbatsk (?!)

why is that curious?  that is present in all machines with a USB bus
in -current.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: printing

2011-01-01 Thread Jacob Meuser
On Sat, Jan 01, 2011 at 10:01:20PM -0600, Ed Ahlsen-Girard wrote:
> Jacob Meuser  wrote
> at 2011-01-02 1:24:20 wrote:
> 
> > On Sun, Jan 02, 2011 at 12:26:38AM +0000, Jacob Meuser wrote:
> > > On Sat, Jan 01, 2011 at 02:07:02PM -0600, Ed Ahlsen-Girard wrote:
> > > > Jacob Meuser  wrote
> > > > at 2011-01-01 19:34:40:
> > > > 
> > > > 
> > > > > On Sat, Jan 01, 2011 at 07:03:52AM -0600, Ed Ahlsen-Girard
> > > > > wrote:
> > > > > > First, Happy New Year!
> > > > > > 
> > > > > > I resolved last week to stop using Windows to print from my
> > > > > > OpenBSD machine, so I re-read man pages for and re-tried
> > > > > > CUPS, lpd, foomatic, etc. As it stands now, here is my
> > > > > > printcap:
> > > > > > 
> > > > > > #   $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp
> > > > > > $
> > > > > > 
> > > > > > #lp|local line
> > > > > > printer:lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs:
> > > > > > lp|5510:\
> > > > > > > lp=/dev/ulpt0:\
> > > > > > > af=/etc/foomatic/HPOJ.ppd:\
> > > 
> > > where did HPOJ.ppd come from?
> > 
> > fwiw, I just tried with my HP officejet 4500, to see if it prints
> > with ulpt and lpd on my laptop (I normally use ugen and cups on my
> > desktop... I need ugen for the scanner).
> > 
> > I installed hpijs and foomatic-filters packages.  this pulled in a2ps
> > and ghostscript.
> > 
> > located the ppd I want, which is
> > /usr/local/share/foomatic/db/source/PPD/HP/hp-officejet_4500_g510g-m-hpijs.ppd.gz
> > 
> > I had to dig for that.  well, 'pkg_info -L hpijs | grep 4500' is how I
> > found it.  not sure why 'foomatic-ppdfile -P 4500' did not find it.
> > I think it should.  anyway ...
> > 
> > $
> > zcat 
> > /usr/local/share/foomatic/db/source/PPD/HP/hp-officejet_4500_g510g-m-hpijs.ppd.
> > \ gz > hpoj4500_hpijs.ppd $ sudo cp hpoj4500_hpijs.ppd /etc/foomatic
> > $ sudo mg /etc/printcap $ cat /etc/printcap
> > #   $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp $
> > 
> > #lp|local line printer:\
> > #   :lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs:
> > 
> > #rp|remote line printer:\
> > #   :lp=:rm=music.humppa.hu:rp=lp:sd=/var/spool/output:lf=/var/log/lpd-errs:
> > 
> > # basically copied from local/share/doc/pkg-readmes/foomatic-filters
> > # but add the 'sh' to not get the "burst page header"
> > lp:\
> > :lp=/dev/ulpt0:\
> > :af=/etc/foomatic/hpoj4500_hpijs.ppd:\
> > :if=/usr/local/bin/foomatic-rip:\
> > :sd=/var/spool/output:\
> > :lf=/var/log/lpd-errs:\
> > :sh:
> > $ sudo lpd
> > $ lpr bin/aup
> > 
> > and viola, aup, a 10 line shell script, is printed on paper
> > 
> > moral of the story: use the right PPD file.  how did I know which one
> > to use?  well, I know ijs works with ghostscript, and I've used the
> > ijs drivers from gutenprint with lpd.  seems to me the most likely to
> > work, since ghostscript is a classical lpd filter.
> > 
> > -- 
> > jake...@sdf.lonestar.org
> 
> Shameless cloning using the hp-officejet_5500-hpijs.ppd file worked
> pretty well.
> 
> Eventually I'll want to put in scan support too, but that can wait until
> I'm worn out from the dance of joy over just printing.  Many, many
> thanks.

nice :)  however, if you want to use MFPs for printing *and* scanning,
you can't really use lpd.  you'll have to disable ulpt in ukc and use
your device as a ugen.  then you have to use CUPS for printing.  there
are some ideas being formulated on how to make this easier, but nothing
concrete yet.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: printing

2011-01-01 Thread Jacob Meuser
On Sat, Jan 01, 2011 at 07:52:24PM -0600, Ed Ahlsen-Girard wrote:
> Jacob Meuser 
> at 2011-01-02 0:26:38 wrote:
> 
> > On Sat, Jan 01, 2011 at 02:07:02PM -0600, Ed Ahlsen-Girard wrote:
> > > Jacob Meuser  wrote
> > > at 2011-01-01 19:34:40:
> > >
> > >
> > > > On Sat, Jan 01, 2011 at 07:03:52AM -0600, Ed Ahlsen-Girard wrote:
> > > > > First, Happy New Year!
> > > > >
> > > > > I resolved last week to stop using Windows to print from my
> > > > > OpenBSD machine, so I re-read man pages for and re-tried CUPS,
> > > > > lpd, foomatic, etc. As it stands now, here is my printcap:
> > > > >
> > > > > # $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp $
> > > > >
> > > > > #lp|local line
> > > > > printer:lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs:
> > > > > lp|5510:\
> > > > > > lp=/dev/ulpt0:\
> > > > > > af=/etc/foomatic/HPOJ.ppd:\
> >
> > where did HPOJ.ppd come from?
> >
> > --
> > jake...@sdf.lonestar.org
> 
> >From the /etc/cups/ppd; only place I saw one.  CUPS is dragged in by
> freerdp. I am not trying to use it.

those PPDs only work with CUPS, and they are only general purpose PPDs.

> If there is a better filter for the 5510v I'll use it.

foomatic-db, foomatic-db-gutenprint, hpijs and maybe other packages
contain more sepcific PPD files.

> --
> 
> Edward Ahlsen-Girard
> Ft Walton Beach, FL

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: printing

2011-01-01 Thread Jacob Meuser
On Sun, Jan 02, 2011 at 12:26:38AM +, Jacob Meuser wrote:
> On Sat, Jan 01, 2011 at 02:07:02PM -0600, Ed Ahlsen-Girard wrote:
> > Jacob Meuser  wrote
> > at 2011-01-01 19:34:40:
> > 
> > 
> > > On Sat, Jan 01, 2011 at 07:03:52AM -0600, Ed Ahlsen-Girard wrote:
> > > > First, Happy New Year!
> > > >
> > > > I resolved last week to stop using Windows to print from my OpenBSD
> > > > machine, so I re-read man pages for and re-tried CUPS, lpd,
> > > > foomatic, etc. As it stands now, here is my printcap:
> > > >
> > > > #   $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp $
> > > >
> > > > #lp|local line
> > > > printer:lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs:
> > > > lp|5510:\
> > > > > lp=/dev/ulpt0:\
> > > > > af=/etc/foomatic/HPOJ.ppd:\
> 
> where did HPOJ.ppd come from?

fwiw, I just tried with my HP officejet 4500, to see if it prints with ulpt
and lpd on my laptop (I normally use ugen and cups on my desktop... I
need ugen for the scanner).

I installed hpijs and foomatic-filters packages.  this pulled in a2ps
and ghostscript.

located the ppd I want, which is
/usr/local/share/foomatic/db/source/PPD/HP/hp-officejet_4500_g510g-m-hpijs.ppd.gz

I had to dig for that.  well, 'pkg_info -L hpijs | grep 4500' is how I
found it.  not sure why 'foomatic-ppdfile -P 4500' did not find it.
I think it should.  anyway ...

$ zcat 
/usr/local/share/foomatic/db/source/PPD/HP/hp-officejet_4500_g510g-m-hpijs.ppd.gz
 > hpoj4500_hpijs.ppd
$ sudo cp hpoj4500_hpijs.ppd /etc/foomatic
$ sudo mg /etc/printcap
$ cat /etc/printcap
#   $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp $

#lp|local line printer:\
#   :lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs:

#rp|remote line printer:\
#   :lp=:rm=music.humppa.hu:rp=lp:sd=/var/spool/output:lf=/var/log/lpd-errs:

# basically copied from local/share/doc/pkg-readmes/foomatic-filters
# but add the 'sh' to not get the "burst page header"
lp:\
:lp=/dev/ulpt0:\
:af=/etc/foomatic/hpoj4500_hpijs.ppd:\
:if=/usr/local/bin/foomatic-rip:\
:sd=/var/spool/output:\
:lf=/var/log/lpd-errs:\
:sh:
$ sudo lpd
$ lpr bin/aup

and viola, aup, a 10 line shell script, is printed on paper

moral of the story: use the right PPD file.  how did I know which one
to use?  well, I know ijs works with ghostscript, and I've used the
ijs drivers from gutenprint with lpd.  seems to me the most likely to
work, since ghostscript is a classical lpd filter.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: printing

2011-01-01 Thread Jacob Meuser
On Sat, Jan 01, 2011 at 02:07:02PM -0600, Ed Ahlsen-Girard wrote:
> Jacob Meuser  wrote
> at 2011-01-01 19:34:40:
> 
> 
> > On Sat, Jan 01, 2011 at 07:03:52AM -0600, Ed Ahlsen-Girard wrote:
> > > First, Happy New Year!
> > >
> > > I resolved last week to stop using Windows to print from my OpenBSD
> > > machine, so I re-read man pages for and re-tried CUPS, lpd,
> > > foomatic, etc. As it stands now, here is my printcap:
> > >
> > > # $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp $
> > >
> > > #lp|local line
> > > printer:lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs:
> > > lp|5510:\
> > > > lp=/dev/ulpt0:\
> > > > af=/etc/foomatic/HPOJ.ppd:\

where did HPOJ.ppd come from?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: printing

2011-01-01 Thread Jacob Meuser
On Sat, Jan 01, 2011 at 07:03:52AM -0600, Ed Ahlsen-Girard wrote:
> First, Happy New Year!
> 
> I resolved last week to stop using Windows to print from my OpenBSD
> machine, so I re-read man pages for and re-tried CUPS, lpd, foomatic,
> etc. As it stands now, here is my printcap:
> 
> # $OpenBSD: printcap,v 1.4 2003/03/28 21:32:30 jmc Exp $
> 
> #lp|local line
> printer:lp=/dev/lp:sd=/var/spool/output:lf=/var/log/lpd-errs: lp|5510:\
>  :lp=/dev/ulpt0:\
>  :af=/etc/foomatic/HPOJ.ppd:\
>  :if=/usr/local/bin/foomatic-rip:\
>  :sd=/var/spool/output:\
>  :lf=/var/log/lpd-errs:
> 
> Here is my rc.conf.local:
> 
> xdm_flags=
> httpd_flags=""  
> lpd_flags=""
> #smbd_flags="-D"  # for normal use: "-D"
> #nmbd_flags="-D" # for normal use: "-D"
> #rarpd_flags="-a"
> #bootparamd_flags=""
> #dhcpd_flags=""
> #nfs_server=YES
> #portmap=YES
> 
> 
> Here is my error on running 'lp $somefile' ($somefile is a shell script
> that I own).
> 
> lp: Error - scheduler not responding!
> 
> Here is proof that lpd is started:

'lp' is a CUPS command.  you want 'lpr'.

> $ps -auxU daemon
> USER   PID %CPU %MEM   VSZ   RSS TT  STAT  STARTED\
> daemon   31108  0.0  0.1   484   804 ??  Is 5:21PM\
> 
> TIME  COMMAND 
> 0:00.00 lpd
> 
> dmesg below.  What am I overlooking?
> 
> -- 
> 
> Edward Ahlsen-Girard
> Ft Walton Beach, FL
> 
> OpenBSD 4.8-current (GENERIC) #522: Thu Dec 23 12:23:25 MST 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel(R) Pentium(R) 4 CPU 2.66GHz ("GenuineIntel" 686-class) 2.66 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID
> real mem  = 1072746496 (1023MB)
> avail mem = 1045127168 (996MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 11/12/02, BIOS32 rev. 0 @ 0xffe90, 
> SMBIOS rev. 2.3 @ 0xf0450 (56 entries)
> bios0: vendor Dell Computer Corporation version "A03" date 11/12/2002
> bios0: Dell Computer Corporation Dimension 4550
> acpi0 at bios0: rev 0
> acpi0: sleep states S0 S1 S3 S4 S5
> acpi0: tables DSDT FACP SSDT APIC BOOT ASF!
> acpi0: wakeup devices VBTN(S4) PCI0(S3) USB0(S3) USB1(S3) USB2(S3) PCI1(S5) 
> KBD_(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: apic clock running at 132MHz
> ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 0, remapped to apid 1
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 2 (PCI1)
> acpicpu0 at acpi0
> acpibtn0 at acpi0: VBTN
> bios0: ROM list: 0xc/0xf800 0xcf800/0x800
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel 82845G Host" rev 0x01
> intelagp0 at pchb0
> agp0 at intelagp0: aperture at 0xe800, size 0x800
> ppb0 at pci0 dev 1 function 0 "Intel 82845G AGP" rev 0x01
> pci1 at ppb0 bus 1
> vga1 at pci1 dev 0 function 0 "NVIDIA GeForce4 MX 420" rev 0xa3
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> uhci0 at pci0 dev 29 function 0 "Intel 82801DB USB" rev 0x01: apic 1 int 16 
> (irq 11)
> uhci1 at pci0 dev 29 function 1 "Intel 82801DB USB" rev 0x01: apic 1 int 19 
> (irq 10)
> uhci2 at pci0 dev 29 function 2 "Intel 82801DB USB" rev 0x01: apic 1 int 18 
> (irq 9)
> ehci0 at pci0 dev 29 function 7 "Intel 82801DB USB" rev 0x01: apic 1 int 23 
> (irq 3)
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> ppb1 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0x81
> pci2 at ppb1 bus 2
> cmpci0 at pci2 dev 0 function 0 "C-Media Electronics CMI8738/C3DX Audio" rev 
> 0x10: apic 1 int 21 (irq 11)
> audio0 at cmpci0
> opl at cmpci0 not configured
> mpu at cmpci0 not configured
> vendor "Broadcom", unknown product 0x4212 (class communications subclass 
> modem, rev 0x02) at pci2 dev 1 function 0 not configured
> fxp0 at pci2 dev 8 function 0 "Intel PRO/100 VE" rev 0x81, i82562: apic 1 int 
> 20 (irq 11), address 00:07:e9:c3:c0:ba
> inphy0 at fxp0 phy 1: i82562ET 10/100 PHY, rev. 0
> ichpcib0 at pci0 dev 31 function 0 "Intel 82801DB LPC" rev 0x01
> pciide0 at pci0 dev 31 function 1 "Intel 82801DB IDE" rev 0x01: DMA, channel 
> 0 configured to compatibility, channel 1 configured to compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 16-sector PIO, LBA, 57220MB, 117187500 sectors
> wd1 at pciide0 channel 0 drive 1: 
> wd1: 16-sector PIO, LBA, 76319MB, 156301488 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
> wd1(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 5
> atapiscsi0 at pciide0 channel 1 drive 0
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0: <_NEC, DVD+RW ND-1100A, 10GE> ATAPI 5/cdrom 
> removable
> wd2 at pciide0 channel 1 drive 1: 
> wd2: 16-sector PIO, LBA, 76319MB, 156301488 sectors
> cd0(pciide0:1:0): u

Re: mic2 is unplugged whatever the physical status is

2010-12-26 Thread Jacob Meuser
On Sun, Dec 26, 2010 at 09:36:08PM +0200, Alexey Suslikov wrote:
> Jacob Meuser wrote:
> 
> > On Sun, Dec 26, 2010 at 12:46:14PM +0100, ??? ??? wrote:
> > > On Tue, Dec 14, 2010 at 4:55 PM, Jacob Meuser 
> > > wrote:
> > > >On Tue, Dec 14, 2010 at 03:39:23PM +0100, Dmitrij D. Czarkoff wrote:
> > > >> I have found my external microphone (mic2) not working under OpenBSD
> > > -current of Nov 20. Whatever I do, I get >"mixerctl outputs.mic2_sense"
> > > answering "outputs.mic2_sense=unplugged" regardless of whether it is 
> > > plugged
> > > or not.
> > > > At the same time "outputs.hp_sense" is reported correctly. Is there 
> > > > anything
> > > I can do to enable mic2?
> > > >
> > > > the last commits to azalia were in early eptember ... did it used to
> > > > change? B does the mic not work at all or is just plug sense not 
> > > > working?
> > >
> > > The mic works OK, I only noticed the problem when I was trying to find
> > > out why GStreamer doesn't pick it up as input.
> > > I never noticed that before, so I can't say what it used to report
> > > throughout it's life.
> > >
> > > > it's possible the plug sense circuitry isn't really there, or has gone
> > > > bad ...
> 
> Codec can be programmed to use non-standard numbers while generating
> unsol events, isn't it?
> 
> > >
> > > I'll try to investigate this issue by trying some Linux livecds...
> > >
> > > Anyway, is there anything I can do to alter the "outputs.mic2_sense"?
> >
> > unlikely.
> 
> Maybe sprinkle some debug across unsol events handling code path to
> see do we get any messages during plug/unplug or not?
> 
> Alexey

this isn't an unsolicited event.  the state is read by the mixer ioctl.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: mic2 is unplugged whatever the physical status is

2010-12-26 Thread Jacob Meuser
On Sun, Dec 26, 2010 at 12:46:14PM +0100, ??? ??? wrote:
> On Tue, Dec 14, 2010 at 4:55 PM, Jacob Meuser 
> wrote:
> >On Tue, Dec 14, 2010 at 03:39:23PM +0100, Dmitrij D. Czarkoff wrote:
> >> I have found my external microphone (mic2) not working under OpenBSD
> -current of Nov 20. Whatever I do, I get >"mixerctl outputs.mic2_sense"
> answering "outputs.mic2_sense=unplugged" regardless of whether it is plugged
> or not.
> > At the same time "outputs.hp_sense" is reported correctly. Is there anything
> I can do to enable mic2?
> >
> > the last commits to azalia were in early eptember ... did it used to
> > change? B does the mic not work at all or is just plug sense not working?
> 
> The mic works OK, I only noticed the problem when I was trying to find
> out why GStreamer doesn't pick it up as input.
> I never noticed that before, so I can't say what it used to report
> throughout it's life.
> 
> > it's possible the plug sense circuitry isn't really there, or has gone
> > bad ...
> 
> I'll try to investigate this issue by trying some Linux livecds...
> 
> Anyway, is there anything I can do to alter the "outputs.mic2_sense"?

unlikely.

> >> P.S.: I have Realtek ALC272 wia Intel 82801GB HD Audio.
> >>
> >> P.P.S.: mixerctl:
> >> inputs.dac-0:1=123,123
> >> inputs.dac-4:5=123,123
> >> inputs.dac-2:3=126,126
> >> record.adc-2:3_mute=off
> >> record.adc-2:3=248,248
> >> record.adc-0:1_mute=off
> >> record.adc-0:1=248,248
> >> inputs.mix_source=mic2
> >> inputs.mix_mic2=120,120
> >> inputs.mix2_source=dac-0:1,mix
> >> inputs.mix3_source=dac-4:5,mix
> >> inputs.mix4_source=dac-2:3,mix
> >> outputs.spkr_source=mix3
> >> outputs.spkr_mute=on
> >> outputs.spkr_dir=output
> >> outputs.spkr_boost=off
> >> outputs.spkr_eapd=on
> >> outputs.mic2_source=mix4
> >> outputs.mic2_mute=off
> >> inputs.mic2=255,255
> >> outputs.mic2_dir=input-vr80
> >> outputs.hp_source=mix2
> >> outputs.hp_mute=off
> >> outputs.hp_boost=off
> >> record.adc-0:1_source=mic2,mix
> >> record.adc-2:3_source=mic2,mix
> >> outputs.mic2_sense=unplugged
> >> outputs.hp_sense=plugged
> >> outputs.spkr_muters=mic2,hp
> >> outputs.master=125,125
> >> outputs.master.mute=off
> >> outputs.master.slaves=dac-0:1,dac-4:5,spkr,hp
> >> record.volume=255,255
> >> record.volume.mute=off
> >> record.volume.slaves=adc-2:3,adc-0:1
> 
> --
> Dmitrij D. Czarkoff

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Print server

2010-12-23 Thread Jacob Meuser
On Thu, Dec 23, 2010 at 10:40:27PM +0100, Jean-Francois wrote:
> Le Wednesday 22 December 2010 23:40:03, Jacob Meuser a icrit :
> > On Wed, Dec 22, 2010 at 11:20:47PM +0100, Jean-Francois wrote:
> > > Hello,
> > >
> > > I would like to use a printer on the server and share it like samba
> > > supports, have it a shared network printer through openbsd server.
> > >
> > > The printer is actually a usb one that I would like to connect to the
> > > server. Is this basically working ? supported ?
> >
> > usb printers?  see ulpt(4).  some also work as ugen(4), if the driver
> > supports that.
> >
> > > Printer is Brother HL 2030, driver seems available for Linux. Can you
> > > recommend the best way to proceed ? It's first time for me, I saw things
> > > such as cups, never dive into yet.
> > >
> > > Thanks.
> >
> > http://www.openprinting.org/printer/Brother/Brother-HL-2030
> >
> > that gives you some hints.  granted, they're talking about linux so
> > not all of that is relevant, but the recommeded driver is hl1250, which
> > is in the 'gs' binary of the ghostscript package.
> 
> Hi,
> I'm not used to install printer on Unix, not sure to understand if ulpt / ugen
> are enough to handle that printer ? Need cups or a printer driver ?

you don't /need/ cups.  it might be easier, or it might be a pain.

you do, however, need to set up a print filter (sometimes referred to
as a driver (yes, it's confusing)) because your device doesn't do
postscript natively.

> I
> Installed only samba server at the moment.

samba is a whole other issue.  get your printer working locally first.

http://onlamp.com/pub/a/bsd/2004/07/08/FreeBSD_Basics.html

should get you started

http://www.freebsd.org/doc/handbook/printing.html is a bit more verbose.
it's also somewhat dated, but lpd has not changed much over the years.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Print server

2010-12-22 Thread Jacob Meuser
On Wed, Dec 22, 2010 at 11:20:47PM +0100, Jean-Francois wrote:
> Hello,
> 
> I would like to use a printer on the server and share it like samba supports, 
> have it a shared network printer through openbsd server.
> 
> The printer is actually a usb one that I would like to connect to the server. 
> Is this basically working ? supported ?

usb printers?  see ulpt(4).  some also work as ugen(4), if the driver
supports that.

> Printer is Brother HL 2030, driver seems available for Linux. Can you 
> recommend the best way to proceed ? It's first time for me, I saw things such 
> as cups, never dive into yet.
> 
> Thanks.

http://www.openprinting.org/printer/Brother/Brother-HL-2030

that gives you some hints.  granted, they're talking about linux so
not all of that is relevant, but the recommeded driver is hl1250, which
is in the 'gs' binary of the ghostscript package.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-12-16 Thread Jacob Meuser
On Thu, Dec 16, 2010 at 01:27:28PM -0200, Shazaum wrote:
> re-wrote part of a codec, now I can listen to music.

huh?

> --
> 
> Renato dos Santos
> shazaum.wordpress.com
> 
> 
> 
> On 16 December 2010 11:28, James Hozier  wrote:
> 
> > How did you get it working?
> >
> > > From: Shazaum 
> > > Subject: Re: Azalia "No Problem" but no Audio
> > > To: misc@openbsd.org
> > > Date: Wednesday, December 15, 2010, 6:17 PM
> > > Now is Work :-)
> > >
> > > --
> > >
> > > Renato dos Santos
> > > shazaum.wordpress.com
> > >
> > >
> > >
> > > On 11 November 2010 22:37, Shazaum 
> > > wrote:
> > >
> > > > I say, I'll re-read the datasheet. (sorry)
> > > >
> > > >
> > > > --
> > > >
> > > > Renato dos Santos
> > > > shazaum.wordpress.com
> > > >
> > > >
> > > >
> > > > On 11 November 2010 22:35, Shazaum 
> > > wrote:
> > > >
> > > >> ok, I admire your interest in wanting to add value
> > > to your code (to
> > > >> increase the hardware support)
> > > >> back to read the datasheet, and try to do
> > > "something" to help those who
> > > >> use the same hardware that I use.
> > > >>
> > > >> thank a lot of your attention
> > > >>
> > > >> --
> > > >>
> > > >> Renato dos Santos
> > > >> shazaum.wordpress.com
> > > >>
> > > >>
> > > >>
> > > >> On 11 November 2010 21:18, Jacob Meuser 
> > > wrote:
> > > >>
> > > >>> On Thu, Nov 11, 2010 at 05:16:39PM -0200,
> > > Shazaum wrote:
> > > >>> > no work.
> > > >>>
> > > >>> unless you're willing to send me your machine
> > > or one like it for keeps,
> > > >>> I've done all I am willing to do.
> > > sorry.  it's just not worth my time
> > > >>> to try to fix vendor fuckups on machines I
> > > can't personally test.
> > > >>>
> > > >>> >
> > > >>> > --
> > > >>> >
> > > >>> > Renato dos Santos
> > > >>> > shazaum.wordpress.com
> > > >>> >
> > > >>> >
> > > >>> >
> > > >>> > On 6 November 2010 20:59, Jacob Meuser
> > > 
> > > >>> wrote:
> > > >>> >
> > > >>> > > On Sat, Nov 06, 2010 at 03:39:00PM
> > > -0700, James Hozier wrote:
> > > >>> > >
> > > >>> > > > I am not sure what all this
> > > code means, but would you like me to
> > > >>> test
> > > >>> > > stuff out?
> > > >>> > > > If I'm supposed to do something
> > > with this piece of code, you'll
> > > >>> have to
> > > >>> > > let me know
> > > >>> > > > what to do with it
> > > >>> > >
> > > >>> > > no, that's specific code for that
> > > specific machine he has.  yours
> > > >>> needs
> > > >>> > > special help too, that'll come later
> > > ...
> > > >>> > >
> > > >>> > > --
> > > >>> > > jake...@sdf.lonestar.org
> > > >>> > > SDF Public Access UNIX System - http://sdf.lonestar.org
> > > >>>
> > > >>> --
> > > >>> jake...@sdf.lonestar.org
> > > >>> SDF Public Access UNIX System - http://sdf.lonestar.org

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: how to know if a headphone jack is plugged in

2010-12-14 Thread Jacob Meuser
On Wed, Dec 15, 2010 at 10:06:57AM +0800, Aaron Lewis wrote:
> how to know if a headphone jack is plugged in , anyone knows ?
> 
> -- Aaron

for azalia(4):

$ mixerctl | grep _sense

other drivers, I don't think any others have such a feature.  maybe some
of the macppc audio devices ...  some ac97 codecs support it, but it's
not standardised and not supported in OpenBSD.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: mic2 is unplugged whatever the physical status is

2010-12-14 Thread Jacob Meuser
On Tue, Dec 14, 2010 at 03:39:23PM +0100, Dmitrij D. Czarkoff wrote:
> Hello!
> 
> I have found my external microphone (mic2) not working under OpenBSD -current 
> of Nov 20. Whatever I do, I get "mixerctl outputs.mic2_sense" answering 
> "outputs.mic2_sense=unplugged" regardless of whether it is plugged or not. At 
> the same time "outputs.hp_sense" is reported correctly. Is there anything I 
> can do to enable mic2?

the last commits to azalia were in early eptember ... did it used to
change?  does the mic not work at all or is just plug sense not working?
it's possible the plug sense circuitry isn't really there, or has gone
bad ...

> Thanks in advance.
> 
> --
> Dmitrij D. Czarkoff
> 
> P.S.: I have Realtek ALC272 wia Intel 82801GB HD Audio.
> 
> P.P.S.: mixerctl:
> inputs.dac-0:1=123,123
> inputs.dac-4:5=123,123
> inputs.dac-2:3=126,126
> record.adc-2:3_mute=off
> record.adc-2:3=248,248
> record.adc-0:1_mute=off
> record.adc-0:1=248,248
> inputs.mix_source=mic2
> inputs.mix_mic2=120,120
> inputs.mix2_source=dac-0:1,mix
> inputs.mix3_source=dac-4:5,mix
> inputs.mix4_source=dac-2:3,mix
> outputs.spkr_source=mix3
> outputs.spkr_mute=on
> outputs.spkr_dir=output
> outputs.spkr_boost=off
> outputs.spkr_eapd=on
> outputs.mic2_source=mix4
> outputs.mic2_mute=off
> inputs.mic2=255,255
> outputs.mic2_dir=input-vr80
> outputs.hp_source=mix2
> outputs.hp_mute=off
> outputs.hp_boost=off
> record.adc-0:1_source=mic2,mix
> record.adc-2:3_source=mic2,mix
> outputs.mic2_sense=unplugged
> outputs.hp_sense=plugged
> outputs.spkr_muters=mic2,hp
> outputs.master=125,125
> outputs.master.mute=off
> outputs.master.slaves=dac-0:1,dac-4:5,spkr,hp
> record.volume=255,255
> record.volume.mute=off
> record.volume.slaves=adc-2:3,adc-0:1

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: problems programming the TI MSP430 Launchpad

2010-12-08 Thread Jacob Meuser
mspdebug uses libusb, which means it uses ugen(4).

ls -l /dev/ugen*

On Wed, Dec 08, 2010 at 09:59:58AM +0100, Benjamin Nadland wrote:
> I just got my TI MSP430 Launchpad and saw that msp430-gcc and
> mspdebug got imported into ports. 
> >From the commit message: "One will need an upcoming umodem.c commit by 
> >jakemsr@,
> and an upcoming mspdebug port in order to actually program the devices 
> though."
> Is this the mentioned umodem.c commit:
> http://marc.info/?l=openbsd-cvs&m=129125391912134&w=2 ?
> 
> Compiling works(?) as expected. But when I try to upload the binary to
> the chip, I get the following errors:
> 
> $ mspdebug rf2500
> MSPDebug version 0.13 - debugging tool for MSP430 MCUs
> Copyright (C) 2009, 2010 Daniel Beer 
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> usbutil: unable to find a device matching 0451:f432
> 
> $ mspdebug rf2500 -U 0451:f432
> MSPDebug version 0.13 - debugging tool for MSP430 MCUs
> Copyright (C) 2009, 2010 Daniel Beer 
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> usbutil: unable to find 451:000
> 
> (might be unrelated, but why did it search for 451:000 ?)
> 
> $ mspdebug rf2500 --usb-list
> Devices on bus 000:
> Devices on bus 000:
> Devices on bus 000:
> Devices on bus 000:
> Devices on bus 000:
> 
> So it doesn't find it, but it is plugged in and recognized:
> 
> $ usbdevs -v
> Controller /dev/usb0:
> addr 1: high speed, self powered, config 1, EHCI root hub(0x), 
> Intel(0x8086), rev 1.00
>  port 1 powered
>  port 2 powered
>  port 3 powered
>  port 4 powered
>  port 5 powered
>  port 6 powered
>  port 7 addr 3: high speed, power 100 mA, unconfigured, RTL8187B(0x8198), 
> Realtek(0x0bda), rev 2.00, iSerialNumber 00e04c01
>  port 8 powered
> Controller /dev/usb1:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> Intel(0x8086), rev 1.00
>  port 1 powered
>  port 2 powered
> Controller /dev/usb2:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> Intel(0x8086), rev 1.00
>  port 1 addr 2: full speed, power 100 mA, config 1, Texas Instruments 
> MSP-FET430UIF(0xf432), Texas Instruments(0x0451), rev 1.00, iSerialNumber 
> A7FF41CE96103E46
>  port 2 powered
> Controller /dev/usb3:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> Intel(0x8086), rev 1.00
>  port 1 powered
>  port 2 powered
> Controller /dev/usb4:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> Intel(0x8086), rev 1.00
>  port 1 powered
>  port 2 powered
> 
> In my dmesg it shows that the launchpad attaches as uhidev(4), does this mean
> that the kernel is to old and does not contain the usb_quirks.c commit from
> dec 1 to prevent this? (http://marc.info/?l=openbsd-cvs&m=129127220327339&w=2)
> (Just finished upgrading to this version a few hours ago, 
> currently downloading another, newer snapshot. Might take some time though.)
> 
> $ dmesg
> OpenBSD 4.8-current (GENERIC) #510: Sat Dec  4 12:03:30 MST 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE
> real mem  = 1060163584 (1011MB)
> avail mem = 1032769536 (984MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 05/09/08, SMBIOS rev. 2.4 @ 0xe8e70 (32 
> entries)
> bios0: vendor Acer version "v0.3114" date 05/09/2008
> bios0: Acer AOA150
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT HPET APIC MCFG ASF! SLIC BOOT
> acpi0: wakeup devices P32_(S4) UHC1(S3) UHC2(S3) UHC3(S3) UHC4(S3) ECHI(S3) 
> EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) AZAL(S0) MODM(S0)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: apic clock running at 133MHz
> cpu at mainbus0: not configured
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 0, remapped to apid 4
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 4 (P32_)
> acpiprt2 at acpi0: bus 1 (EXP1)
> acpiprt3 at acpi0: bus 2 (EXP2)
> acpiprt4 at acpi0: bus -1 (EXP3)
> acpiprt5 at acpi0: bus 3 (EXP4)
> acpiec0 at acpi0
> acpicpu0 at acpi0: C3, C2, C1, PSS
> acpibtn0 at acpi0: PWRB
> acpibtn1 at acpi0: LID0
> acpibtn2 at acpi0: SLPB
> acpibat0 at acpi0: BAT1 not present
> acpiac0 at acpi0: AC unit online
> acpivideo0 at acpi0: OVGA
> acpivout0 at acpivideo0: CRT1
> acpivout1 at acpivideo0: DTV1
> acpivout2 at acpivideo0: DFP1
> acpivout3 at acpivideo0: LCD_
> acpivout4 at acpivideo0: DTV2
> acpivout5 at acpivide

Re: problems programming the TI MSP430 Launchpad

2010-12-08 Thread Jacob Meuser
On Wed, Dec 08, 2010 at 01:40:20PM +, Jacob Meuser wrote:
> mspdebug uses libusb, which means it uses ugen(4).
> 
> ls -l /dev/ugen*

oops, too quick.  libusb also uses /dev/usb* to scan for devices.

> On Wed, Dec 08, 2010 at 09:59:58AM +0100, Benjamin Nadland wrote:
> > I just got my TI MSP430 Launchpad and saw that msp430-gcc and
> > mspdebug got imported into ports. 
> > >From the commit message: "One will need an upcoming umodem.c commit by 
> > >jakemsr@,
> > and an upcoming mspdebug port in order to actually program the devices 
> > though."
> > Is this the mentioned umodem.c commit:
> > http://marc.info/?l=openbsd-cvs&m=129125391912134&w=2 ?
> > 
> > Compiling works(?) as expected. But when I try to upload the binary to
> > the chip, I get the following errors:
> > 
> > $ mspdebug rf2500
> > MSPDebug version 0.13 - debugging tool for MSP430 MCUs
> > Copyright (C) 2009, 2010 Daniel Beer 
> > This is free software; see the source for copying conditions.  There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > usbutil: unable to find a device matching 0451:f432
> > 
> > $ mspdebug rf2500 -U 0451:f432
> > MSPDebug version 0.13 - debugging tool for MSP430 MCUs
> > Copyright (C) 2009, 2010 Daniel Beer 
> > This is free software; see the source for copying conditions.  There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > usbutil: unable to find 451:000
> > 
> > (might be unrelated, but why did it search for 451:000 ?)
> > 
> > $ mspdebug rf2500 --usb-list
> > Devices on bus 000:
> > Devices on bus 000:
> > Devices on bus 000:
> > Devices on bus 000:
> > Devices on bus 000:
> > 
> > So it doesn't find it, but it is plugged in and recognized:
> > 
> > $ usbdevs -v
> > Controller /dev/usb0:
> > addr 1: high speed, self powered, config 1, EHCI root hub(0x), 
> > Intel(0x8086), rev 1.00
> >  port 1 powered
> >  port 2 powered
> >  port 3 powered
> >  port 4 powered
> >  port 5 powered
> >  port 6 powered
> >  port 7 addr 3: high speed, power 100 mA, unconfigured, RTL8187B(0x8198), 
> > Realtek(0x0bda), rev 2.00, iSerialNumber 00e04c01
> >  port 8 powered
> > Controller /dev/usb1:
> > addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> > Intel(0x8086), rev 1.00
> >  port 1 powered
> >  port 2 powered
> > Controller /dev/usb2:
> > addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> > Intel(0x8086), rev 1.00
> >  port 1 addr 2: full speed, power 100 mA, config 1, Texas Instruments 
> > MSP-FET430UIF(0xf432), Texas Instruments(0x0451), rev 1.00, iSerialNumber 
> > A7FF41CE96103E46
> >  port 2 powered
> > Controller /dev/usb3:
> > addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> > Intel(0x8086), rev 1.00
> >  port 1 powered
> >  port 2 powered
> > Controller /dev/usb4:
> > addr 1: full speed, self powered, config 1, UHCI root hub(0x), 
> > Intel(0x8086), rev 1.00
> >  port 1 powered
> >  port 2 powered
> > 
> > In my dmesg it shows that the launchpad attaches as uhidev(4), does this 
> > mean
> > that the kernel is to old and does not contain the usb_quirks.c commit from
> > dec 1 to prevent this? 
> > (http://marc.info/?l=openbsd-cvs&m=129127220327339&w=2)
> > (Just finished upgrading to this version a few hours ago, 
> > currently downloading another, newer snapshot. Might take some time though.)
> > 
> > $ dmesg
> > OpenBSD 4.8-current (GENERIC) #510: Sat Dec  4 12:03:30 MST 2010
> > dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> > cpu0: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 
> > GHz
> > cpu0: 
> > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE
> > real mem  = 1060163584 (1011MB)
> > avail mem = 1032769536 (984MB)
> > mainbus0 at root
> > bios0 at mainbus0: AT/286+ BIOS, date 05/09/08, SMBIOS rev. 2.4 @ 0xe8e70 
> > (32 entries)
> > bios0: vendor Acer version "v0.3114" date 05/09/2008
> > bios0: Acer AOA150
> > acpi0 at bios0: rev 2
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP SSDT HPET APIC MCFG ASF! SLIC BOOT
> > acpi0: wakeup devices P32_(S4) UHC1(S3) UHC2(S3) UHC3(S3) UHC4(S3) ECHI(S3) 
> > EXP1(S4) EXP2(S4) EXP3(

Re: 'cvs update' asking for password?!

2010-12-07 Thread Jacob Meuser
On Tue, Dec 07, 2010 at 05:40:39PM -0500, Dave Anderson wrote:
> No doubt I've screwed something up, but I can't figure out what.

> # echo $CVSROOT
> anoncvs.comstyle.com:/cvs
 ^
> # cvs -t -d$CVSROOT -q up -Pd
>  -> main loop with CVSROOT=anoncvs.comstyle.com:/cvs
>  -> Starting server: ssh anoncvs.comstyle.com cvs server
> r...@anoncvs.comstyle.com's password:
  ^

anon...@anoncvs

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Problems with sound card

2010-12-07 Thread Jacob Meuser
On Tue, Dec 07, 2010 at 10:39:23AM -0300, Gonzalo L. R. wrote:
> Hi misc@,
> 
> I have a Dell Vostro 1510 with -current and my sound card it's not
> supported,
> 
> Here is my dmesg and pcidump:
> 
> http://x61.com.ar/tmp/pcidump
> http://x61.com.ar/tmp/dell.dmesg
> 
> I build the kernel with AZALIA_DEBUG but nothing.
> 
> $ mixerctl -av
> mixerctl: /dev/mixer: Device not configured
> 
> $ audioctl
> audioctl: /dev/audioctl: Device not configured
> 
> 
> Any ideas?

are you sure it's not turned off in the bios?

> 
> Cheers
> -- 
> Sending from my Computer.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Disable USB Support i

2010-12-06 Thread Jacob Meuser
just curious, but why would you need to disable USB sometimes and
not always?

the answer is: you can't disable it in a running kernel.  the OpenBSD
kernel doesn't use modules.

On Mon, Dec 06, 2010 at 03:13:42PM -0600, Orestes Leal R. wrote:
> just disable when I need to, unloading modules, etc.
> ?
> 
> >Disable it from BIOS.
> >
> >On 12/06/10 17:49, Orestes Leal R. wrote:
> >>How?
> >>
> >
> 
> 
> -- 
> Using Opera's revolutionary email client: http://www.opera.com/mail/

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: rum(4) ohci scheduling overruns in current/i386

2010-12-04 Thread Jacob Meuser
you're not even using the ohci (i.e. this is most likely bad/dying
hardware)

On Sat, Dec 04, 2010 at 11:55:49PM +0100, Mattieu Baptiste wrote:
> Hi all,
> 
> I decided to upgrade my soekris net5501 (from a snapshot around
> september 7) to -current. I had in the past random ohci scheduling
> overruns, resulting in an unusable rum(4). But ifconfig down/up solves
> the problem.
> 
> Now I have a lot of ohci scheduling overruns just after boot and my
> rum(4) isn't usable. Here is a dmesg:
> 
> 
> OpenBSD 4.8-current (GENERIC) #507: Wed Dec  1 22:37:15 MST 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD"
> 586-class) 500 MHz
> cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX
> real mem  = 536440832 (511MB)
> avail mem = 517615616 (493MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 20/80/26, BIOS32 rev. 0 @ 0xfac40
> pcibios0 at bios0: rev 2.0 @ 0xf/0x1
> pcibios0: pcibios_get_intr_routing - function not supported
> pcibios0: PCI IRQ Routing information unavailable.
> pcibios0: PCI bus #0 is the last bus
> bios0: ROM list: 0xc8000/0xa800
> cpu0 at mainbus0: (uniprocessor)
> amdmsr0 at mainbus0
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> io address conflict 0x6100/0x100
> io address conflict 0x6200/0x200
> pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33
> glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
> vr0 at pci0 dev 6 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11,
> address 00:00:24:cb:19:70
> ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
> 0x004063, model 0x0034
> vr1 at pci0 dev 7 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 5,
> address 00:00:24:cb:19:71
> ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
> 0x004063, model 0x0034
> vr2 at pci0 dev 8 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 9,
> address 00:00:24:cb:19:72
> ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
> 0x004063, model 0x0034
> vr3 at pci0 dev 9 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 12,
> address 00:00:24:cb:19:73
> ukphy3 at vr3 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
> 0x004063, model 0x0034
> ral0 at pci0 dev 14 function 0 "Ralink RT2561S" rev 0x00: irq 10,
> address 00:18:f8:a5:f3:34
> ral0: MAC/BBP RT2561C, RF RT2527
> glxpcib0 at pci0 dev 20 function 0 "AMD CS5536 ISA" rev 0x03: rev 3,
> 32-bit 3579545Hz timer, watchdog, gpio
> gpio0 at glxpcib0: 32 pins
> pciide0 at pci0 dev 20 function 2 "AMD CS5536 IDE" rev 0x01: DMA,
> channel 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 4-sector PIO, LBA, 1953MB, 4001760 sectors
> wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
> pciide0: channel 1 ignored (disabled)
> ohci0 at pci0 dev 21 function 0 "AMD CS5536 USB" rev 0x02: irq 15,
> version 1.0, legacy support
> ehci0 at pci0 dev 21 function 1 "AMD CS5536 USB" rev 0x02: irq 15
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "AMD EHCI root hub" rev 2.00/1.00 addr 1
> isa0 at glxpcib0
> isadma0 at isa0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> com0: console
> com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> pckbc0 at isa0 port 0x60/5
> pckbd0 at pckbc0 (kbd slot)
> pckbc0: using irq 1 for kbd slot
> wskbd0 at pckbd0: console keyboard
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
> gpio1 at nsclpcsio0: 29 pins
> npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> usb1 at ohci0: USB revision 1.0
> uhub1 at usb1 "AMD OHCI root hub" rev 1.00/1.00 addr 1
> biomask e1c5 netmask ffe5 ttymask 
> mtrr: K6-family MTRR support (2 registers)
> rum0 at uhub0 port 1 "Ralink 802.11 bg WLAN" rev 2.00/0.01 addr 2
> rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, address 1c:af:f7:7b:5e:9d
> vscsi0 at root
> scsibus0 at vscsi0: 256 targets
> softraid0 at root
> root on wd0a swap on wd0b dump on wd0b
> ohci0: 1 scheduling overruns
> ohci0: 2 scheduling overruns
> ohci0: 161 scheduling overruns
> ohci0: 136 scheduling overruns
> ohci0: 148 scheduling overruns
> ohci0: 145 scheduling overruns
> ohci0: 151 scheduling overruns
> ohci0: 163 scheduling overruns
> ohci0: 150 scheduling overruns
> ohci0: 150 scheduling overruns
> ohci0: 175 scheduling overruns
> ohci0: 143 scheduling overruns
> ohci0: 131 scheduling overruns
> ohci0: 153 scheduling overruns
> ohci0: 163 scheduling overruns
> ohci0: 86 scheduling overruns
> ohci0: 157 scheduling overruns
> ohci0: 142 scheduling overruns
> ohci0: 107 scheduling overruns
> ohci0: 135 scheduling overruns
> ohci0: 122 scheduling overruns
> ohci0: 140 scheduling overruns
> ohci0: 132 scheduling overruns
> ohci0: 144 scheduling overruns
> rum0: could not retrieve Tx statistics - cancelling automatic rate control
> ohci0: 135 scheduling overruns
> ohci0: 119 scheduling overruns
> ohci0: 134 sche

Re: Lenovo T400 - recording with internal mic

2010-12-01 Thread Jacob Meuser
On Wed, Dec 01, 2010 at 08:30:03PM +0100, Jiri B. wrote:
> Hi,
> 
> on Lenovo T400 laptop there's internal mic (works on other OS).
> 
> Unfortunatelly I'm stupid or it doesn't work :/
> 
> I tried:
> 
> * aucat -o /tmp/file.wav
> * aucat -C0:1 -o /tmp/file.wav
> * aucat -C2:3 -o /tmp/file.wav
> * audacity record
> 
> (not really sure why '-CX:X'...)
> 
> It produces just same noise all the time...
> 
> I'm confused, I read FAQ but I don't have any record.source or
> input.mic.source.
> 
> jirib
> 
> inputs.dac-0:1=141,141
> inputs.dac-2:3=141,141
> inputs.beep=85
> record.adc-2:3_source=mic2
> record.adc-2:3=240,240
> record.adc-0:1_source=mic
> record.adc-0:1=240,240
> outputs.hp_source=dac-0:1
> outputs.hp_boost=off
> inputs.mic=252,252
> outputs.mic_dir=input-vr80
> outputs.spkr_source=dac-2:3
> outputs.spkr_eapd=on
> inputs.mic2=252,252
> outputs.hp_sense=unplugged
> outputs.mic_sense=unplugged
> outputs.master=143,143
> outputs.master.mute=off
> outputs.master.slaves=dac-0:1,dac-2:3
> record.volume=255,255
> record.volume.mute=off
> record.volume.slaves=adc-2:3,adc-0:1

this is one of those stupid codecs that has hardwired connections
between ADCs and the mics.  Lenovo and Dell use these.  stupid
vendors.

you can do this:

$ aucat -l -s default -c 0:1 -C 0:1 -s internal -c 2:3 -C 2:3

that gives you two sub-devices, "default", and "internal".  you
can then specify which device to use with the AUDIODEVICE environment
variable.  "default" is the default device if not specified.  so,

$ aucat -o junk.wav
$ aucat -i junk.wav

will record from the external mic (record.adc-0:1_source=mic)
and play it on the headphones (outputs.hp_source=dac-0:1), while

$ AUDIODEVICE=internal aucat -o junk.wav
$ AUDIODEVICE=internal aucat -i junk.wav

will record from the internal mic (record.adc-2:3_source=mic2) and
play it back on the speaker (outputs.spkr_source=dac-2:3).

and I know mic2 is the internal speaker because there is a 
'mic_sense' control, which means 'mic' is a jack.

I'm working on making mic switching automatic when a mic jack is
plugged/unplugged, but there are still some issues to be worked out.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: OpenBSD 4.8 crash unexpectedly

2010-11-27 Thread Jacob Meuser
On Sat, Nov 27, 2010 at 12:39:40PM +0330, Bahador NazariFard wrote:
> Hi
> 
> I am using of  OpenBSD 4.8 as a firewall box but it is started to annoy me
> :((
> My problem is OpenBSD crashes unexpectedly (specially when im not at my
> desk)
> 
> How can I find the source of this problem.

http://www.openbsd.org/faq/faq2.html#Bugs

read it through.  hint: you have serial ports.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Unattended OpenBSD Installation

2010-11-13 Thread Jacob Meuser
On Sun, Nov 14, 2010 at 10:43:47AM +0400, OpenBSD Geek wrote:
> Hi,
> 
> I read FAQ, and found nothing about "install.site" script.

the you must have missed section 4.14 ->

http://www.openbsd.org/faq/faq4.html#site

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-11-11 Thread Jacob Meuser
On Thu, Nov 11, 2010 at 05:16:39PM -0200, Shazaum wrote:
> no work.

unless you're willing to send me your machine or one like it for keeps,
I've done all I am willing to do.  sorry.  it's just not worth my time
to try to fix vendor fuckups on machines I can't personally test.

> 
> --
> 
> Renato dos Santos
> shazaum.wordpress.com
> 
> 
> 
> On 6 November 2010 20:59, Jacob Meuser  wrote:
> 
> > On Sat, Nov 06, 2010 at 03:39:00PM -0700, James Hozier wrote:
> >
> > > I am not sure what all this code means, but would you like me to test
> > stuff out?
> > > If I'm supposed to do something with this piece of code, you'll have to
> > let me know
> > > what to do with it
> >
> > no, that's specific code for that specific machine he has.  yours needs
> > special help too, that'll come later ...
> >
> > --
> > jake...@sdf.lonestar.org
> > SDF Public Access UNIX System - http://sdf.lonestar.org

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: swfdec and Firefox 3.6.8

2010-11-09 Thread Jacob Meuser
On Tue, Nov 09, 2010 at 11:07:20PM -0500, Predrag Punosevac wrote:
> I just installed swfdec-0.8.4 on 4.8 (i386) snapshot of 22nd of August
> (should be epsilon close to release) and I do not see the plugin when 
> I type
> 
> about:plugins
> 
> nor in 
> 
> /usr/local/mozilla-firefox/plugins
> 
> I do not recall manually linking libswfdecmozilla.so to 
> /usr/lib/mozilla/plugins/flashplugin-alternative.so on 4.6 release 
> (amd64). Swfdec actually used to work fairly well for me at that time (
> I know that the development has ceased almost two years ago).
> 
> Does swfdec-0.8.4 even work on Firefox 3.6.8? Also has anybody being
> able to use swfdec-0.8.4 on Midori? 
> 
> Cheers,
> Predrag

the plugin is in the swfdec-plugin package.  did you install that?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Linux-2.6.36-libre: turning Linux's Free Bait into Free Software

2010-11-09 Thread Jacob Meuser
On Wed, Nov 10, 2010 at 01:14:19AM +0100, frantisek holop wrote:
> hmm, on Tue, Nov 09, 2010 at 03:53:59PM -0500, Brynet said that
> > Why are you sending this crap here? the inclusion of binary
> > firmware/microcode in OpenBSD is considered acceptable so long as the
> > license allows for redistribution.
> 
> maybe you could read first what's it about...

indeed.  it's condemning Torvalds and the main Linux kernel maintainers
for not being careful about firmware licenses.  the Keyspan license in
particular is a big trap that people probably aren't aware of.

> perhaps it would have been better for advoc...@.

probably, as it shows how OpenBSD is more careful about protecting
your freedom than Linux.

> i was just thinking about sending it in as well,
> it's quite interesting to see what others are doing
> with other open source licenses.
> 
> there is so much crap on this list, an honest OT
> once in a while can only do good.
> 
> -f
> -- 
> what a nice night for an evening.  -- steven wright

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: How to test if sound is working?

2010-11-08 Thread Jacob Meuser
On Mon, Nov 08, 2010 at 06:55:59PM -0800, James Hozier wrote:
> > From: Fred Crowson 
> > Subject: Re: How to test if
> sound is working?
> > To: "James Hozier" 
> > Cc:
> misc@openbsd.org
> > Date: Monday, November 8, 2010, 10:55 PM
> > On 8 November
> 2010 22:04, James
> > Hozier 
> > wrote:
> > >
> > > $ cat
> azalia_codec.c.rej
> > > @@ -64,6 +64,13 @@
> > >this->name = NULL;
> > >   
> this->qrks = AZ_QRK_NONE;
> > >switch (this->vid) {
> > > +case
> 0x10134206:
> > > +this->name = "Cirrus
> > Logic CS4206";
> > > +if
> (this->subid ==
> > 0x106b4d00) {/* APPLE_MBP55 */
> > > +   
> >
> this->qrks |= AZ_QRK_GPIO_UNMUTE_1 |
> > > + 
> >  
> AZ_QRK_GPIO_UNMUTE_3;
> > > +}
> > > +break;
> > >case
> 0x10ec0260:
> > >this->name = "Realtek
> > ALC260";
> > >break;
> > >
> > > What does this mean? It looks like a snippet of code
> > from the original
> patch
> > file?
> > 
> > Hi James,
> > 
> > For some reason patch(1) did not insert the
> code into
> > azalia_codec.c
> > - I would guess that the reason was that patch
> file had
> > some
> > formatting that patch(1) did not like. Have another go at
> >
> creating and
> > patching the file, or you can either manually add those 7
> > new
> lines to
> > azailia_codec.c after line 77 of azaila_codec.c
> > 
> > Thus when you
> rebuilt your kernel - it did not have this
> > new bit of code in.
> > 
> > hth
> > 
> >
> Fred
> > 
> > 
> 
> Hmm...added those lines to azalia_codec.c after line 66 (without
> the + signs in front
> of the lines), re-compiled and rebooted but still
> nothing. I guess it's something
> else, then...but I'm curious as to why the
> patch didn't work.


judging by the formatting of your emails, the patch got mangled by
your mailer.

inlining patches in email messages (as opposed to MIME attachments)
is part of OpenBSD culture.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: How to test if sound is working?

2010-11-07 Thread Jacob Meuser
On Sun, Nov 07, 2010 at 04:18:34PM -0800, James Hozier wrote:

> Oh, I've tried a lot of different combos
> yesterday and this was one of them. Tried
> both settings with my speakers, and
> tried both settings with my headphones plugged
> in.

it appears you don't get any sound because the outputs are controlled
by gpio pins.  see if the following fixes it.

1. save this mail as a plain text file somewhere.
2. make sure you have kernel sources installed.  (see the faq if necessary)
3. cd /sys/dev/pci && patch -p 0 < 
4. build and install kernel. (see faq if necessary)
5. reboot

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia_codec.c
===
RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.151
diff -u -p azalia_codec.c
--- azalia_codec.c  10 Sep 2010 15:11:23 -  1.151
+++ azalia_codec.c  8 Nov 2010 04:29:59 -
@@ -64,6 +64,13 @@ azalia_codec_init_vtbl(codec_t *this)
this->name = NULL;
this->qrks = AZ_QRK_NONE;
switch (this->vid) {
+   case 0x10134206:
+   this->name = "Cirrus Logic CS4206";
+   if (this->subid == 0x106b4d00) {/* APPLE_MBP55 */
+   this->qrks |= AZ_QRK_GPIO_UNMUTE_1 |
+   AZ_QRK_GPIO_UNMUTE_3;
+   }
+   break;
case 0x10ec0260:
this->name = "Realtek ALC260";
break;



Re: Azalia "No Problem" but no Audio

2010-11-06 Thread Jacob Meuser
On Sat, Nov 06, 2010 at 03:39:00PM -0700, James Hozier wrote:

> I am not sure what all this code means, but would you like me to test stuff 
> out?
> If I'm supposed to do something with this piece of code, you'll have to let 
> me know
> what to do with it

no, that's specific code for that specific machine he has.  yours needs
special help too, that'll come later ...

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-11-06 Thread Jacob Meuser
On Wed, Nov 03, 2010 at 03:32:21PM -0200, Shazaum wrote:
> a little test in freebsd 6.2 audio worked

going by what they kept in their current driver, and what alsa does,
perhaps this helps.  probably doesn't fix the internal speaker, but
might get headphone output working.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia.h
===
RCS file: /cvs/src/sys/dev/pci/azalia.h,v
retrieving revision 1.62
diff -u -p azalia.h
--- azalia.h10 Sep 2010 15:11:23 -  1.62
+++ azalia.h6 Nov 2010 21:54:24 -
@@ -510,6 +510,8 @@
 #define AZ_QRK_WID_BEEP_1D 0x2000
 #define AZ_QRK_WID_OVREF50 0x4000
 #define AZ_QRK_WID_AD1981_OAMP 0x8000
+#define AZ_QRK_WID_OVREF1000x0001
+#define AZ_QRK_WID_HP_0F   0x0002
 
 /* memory-mapped types */
 typedef struct {
Index: azalia_codec.c
===
RCS file: /cvs/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.151
diff -u -p azalia_codec.c
--- azalia_codec.c  10 Sep 2010 15:11:23 -  1.151
+++ azalia_codec.c  6 Nov 2010 21:54:24 -
@@ -96,6 +96,9 @@ azalia_codec_init_vtbl(codec_t *this)
break;
case 0x10ec0861:
this->name = "Realtek ALC861";
+   if (this->subid == 0x90751584) {/* CCE_X20II ??? */
+   this->qrks |= AZ_QRK_WID_OVREF100 | AZ_QRK_WID_HP_0F;
+   }
break;
case 0x10ec0880:
this->name = "Realtek ALC880";
@@ -1928,6 +1931,8 @@ azalia_mixer_set(codec_t *this, nid_t nid, int target,
value |= CORB_PWC_OUTPUT;
if (this->qrks & AZ_QRK_WID_OVREF50)
value |= CORB_PWC_VREF_50;
+   if (this->qrks & AZ_QRK_WID_OVREF100)
+   value |= CORB_PWC_VREF_100;
} else {
value &= ~CORB_PWC_OUTPUT;
value |= CORB_PWC_INPUT;
@@ -2434,6 +2439,13 @@ azalia_codec_widget_quirks(codec_t *this, nid_t nid)
((nid == 0x05) || (nid == 0x06) || (nid == 0x07) ||
(nid == 0x09) || (nid == 0x18))) {
azalia_ampcap_ov(w, COP_OUTPUT_AMPCAP, 31, 33, 6, 30, 1);
+   }
+
+   if ((this->qrks & AZ_QRK_WID_HP_0F) && (nid == 0x0f)) {
+   azalia_pin_config_ov(w, CORB_CD_DEVICE_MASK, CORB_CD_HEADPHONE);
+   azalia_pin_config_ov(w, CORB_CD_PORT_MASK, CORB_CD_JACK);
+   w->widgetcap |= COP_AWCAP_STEREO;
+   w->enable = 1;
}
 
return(0);



Re: How to test if sound is working?

2010-11-06 Thread Jacob Meuser
On Sat, Nov 06, 2010 at 01:08:40PM -0700, James Hozier wrote:
> > From: Jacob Meuser 
> > Subject: Re: How to test if sound is working?
> > To: misc@openbsd.org
> > Date: Saturday, November 6, 2010, 7:14 PM
> > On Sat, Nov 06, 2010 at 10:48:52AM
> > -0700, James Hozier wrote:
> > > I've been trying to get my sound working and tried
> > playing an audio file with mplayer,
> > > xmms, and vlc, and it seems like it's playing fine (I
> > can even see the visual bars
> > > moving in xmms) but I get no sound at all with my
> > speakers up all the way. Here is
> > > what I have done so far:
> > > 
> > > As per the FAQ's instructions:
> > > 
> > > $ cat > /dev/audio < /dev/zero &
> > > [1] 6310
> > > $ audioctl play.{seek,samples,errors}
> > > play.seek=48000
> > > play.samples=1833600
> > > play.errors=0
> > > $ audioctl play.{seek,samples,errors}
> > > play.seek=57600
> > > play.samples=4089600
> > > play.errors=0
> > > $ audioctl play.{seek,samples,errors}
> > > play.seek=57600
> > > play.samples=5299200
> > > play.errors=0
> > > $ kill %1
> > > $ fg %1
> > > cat > /dev/audio < /dev/zero 
> > > Terminated
> > > 
> > > It seems as if it's okay with the samples increasing
> > each time,
> > > 
> > > mixer settings:
> > > 
> > > $ mixerctl
> > > inputs.dac-0:1_mute=off
> > > inputs.dac-0:1=200,200
> > > inputs.dac-2:3_mute=off
> > > inputs.dac-2:3=126,126
> > > record.adc-0:1_source=mic
> > > record.adc-0:1_mute=off
> > > record.adc-0:1=124,124
> > > outputs.hp_source=dac-0:1
> > > outputs.hp_boost=off
> > > outputs.spkr_source=
> > > outputs.spkr2_source=dac-2:3
> > > inputs.mic=85,85
> > > outputs.mic_dir=input-vr80
> > > outputs.SPDIF_source=dig-dac-0:1
> > > outputs.hp_sense=plugged
> > > outputs.spkr2_muters=hp
> > > outputs.master=200,200
> > > outputs.master.mute=off
> > > outputs.master.slaves=dac-0:1,dac-2:3
> > > record.volume=124,124
> > > record.volume.mute=off
> > > record.volume.slaves=adc-0:1
> > > outputs.mode=analog
> > > 
> > > Everything seems to be at a reasonable volume and
> > nothing is muted,
> > > 
> > > And I'm not sure how to figure out what kind of audio
> > hardware I have, so I just
> > > tried this:
> > > 
> > > $ dmesg | grep audio
> > > audio0 at azalia0
> > > 
> > > What else can I try?
> > 
> > full dmesg and mixerctl -v output.
> > 
> > -- 
> > jake...@sdf.lonestar.org
> > SDF Public Access UNIX System - http://sdf.lonestar.org
> > 
> > 
> 
> mixerctl -v:
> 
> $ mixerctl -v
> inputs.dac-0:1_mute=off  [ off on ]
> inputs.dac-0:1=200,200 
> inputs.dac-2:3_mute=off  [ off on ]
> inputs.dac-2:3=254,254 
> record.adc-0:1_source=mic  [ mic ]
> record.adc-0:1_mute=off  [ off on ]
> record.adc-0:1=0,0 
> outputs.hp_source=dac-0:1  [ dac-0:1 ]
> outputs.hp_boost=off  [ off on ]
> outputs.spkr_source=  [ ]
> outputs.spkr2_source=dac-2:3  [ dac-2:3 ]
> inputs.mic=85,85 
> outputs.mic_dir=input-vr80  [ none input input-vr0 input-vr50 input-vr80 ]
> outputs.SPDIF_source=dig-dac-0:1  [ dig-dac-0:1 ]
> outputs.hp_sense=plugged  [ unplugged plugged ]
> outputs.spkr2_muters=hp  { hp }
> outputs.master=200,200 
> outputs.master.mute=off  [ off on ]
> outputs.master.slaves=dac-0:1,dac-2:3  { dac-0:1 dac-2:3 }
> record.volume=0,0 
> record.volume.mute=on  [ off on ]
> record.volume.slaves=adc-0:1  { adc-0:1 mic }
> outputs.mode=analog  [ analog digital ]
> 
> full dmesg:
> 
> $ dmesg
> OpenBSD 4.8 (GENERIC.MP) #359: Mon Aug 16 09:16:26 MDT 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
> RTC BIOS diagnostic error 
> f7
> cpu0: Intel(R) Core(TM)2 Duo CPU P7550 @ 2.26GHz ("GenuineIntel" 686-class) 
> 2.26 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE
> real mem  = 2926321664 (2790MB)
> avail mem = 2868469760 (2735MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 07/29/05, SMBIOS rev. 2.4 @ 0xe (42 
> entries)
> bios0: vendor Apple Inc. version "MBP55.88Z.00AC.B03.0906151708" date 06/15/09
> bios0: Apple Inc. MacBookPro5,5

a

Re: How to test if sound is working?

2010-11-06 Thread Jacob Meuser
On Sat, Nov 06, 2010 at 10:48:52AM -0700, James Hozier wrote:
> I've been trying to get my sound working and tried playing an audio file with 
> mplayer,
> xmms, and vlc, and it seems like it's playing fine (I can even see the visual 
> bars
> moving in xmms) but I get no sound at all with my speakers up all the way. 
> Here is
> what I have done so far:
> 
> As per the FAQ's instructions:
> 
> $ cat > /dev/audio < /dev/zero &
> [1] 6310
> $ audioctl play.{seek,samples,errors}
> play.seek=48000
> play.samples=1833600
> play.errors=0
> $ audioctl play.{seek,samples,errors}
> play.seek=57600
> play.samples=4089600
> play.errors=0
> $ audioctl play.{seek,samples,errors}
> play.seek=57600
> play.samples=5299200
> play.errors=0
> $ kill %1
> $ fg %1
> cat > /dev/audio < /dev/zero 
> Terminated
> 
> It seems as if it's okay with the samples increasing each time,
> 
> mixer settings:
> 
> $ mixerctl
> inputs.dac-0:1_mute=off
> inputs.dac-0:1=200,200
> inputs.dac-2:3_mute=off
> inputs.dac-2:3=126,126
> record.adc-0:1_source=mic
> record.adc-0:1_mute=off
> record.adc-0:1=124,124
> outputs.hp_source=dac-0:1
> outputs.hp_boost=off
> outputs.spkr_source=
> outputs.spkr2_source=dac-2:3
> inputs.mic=85,85
> outputs.mic_dir=input-vr80
> outputs.SPDIF_source=dig-dac-0:1
> outputs.hp_sense=plugged
> outputs.spkr2_muters=hp
> outputs.master=200,200
> outputs.master.mute=off
> outputs.master.slaves=dac-0:1,dac-2:3
> record.volume=124,124
> record.volume.mute=off
> record.volume.slaves=adc-0:1
> outputs.mode=analog
> 
> Everything seems to be at a reasonable volume and nothing is muted,
> 
> And I'm not sure how to figure out what kind of audio hardware I have, so I 
> just
> tried this:
> 
> $ dmesg | grep audio
> audio0 at azalia0
> 
> What else can I try?

full dmesg and mixerctl -v output.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: diskmap(4) interface and live USB fstab file

2010-11-05 Thread Jacob Meuser
fwiw, in -current, USB attach order should be quite predictable.  there
are no longer multiple threads attaching USB devices.  attachment is
now done in a single thread, and it is done in the same order every
time.

of course, if you change which USB ports the devices are connected to
between boots, or disconnect/reconnect while booted then the order
might change.

On Fri, Nov 05, 2010 at 08:37:37PM +0800, Marcus wrote:
> http://www.openbsd.org/faq/faq1.html#WhatsNew
> says:
> diskmap(4) interface
> People using USB attached storage or softraid(4) configurations often
> had difficulty with drive identifiers changing from boot to boot, or
> between hardware configurations. diskmap(4) allows you to mount drives
> by unique disklabel UIDs rather than how they are attached, so now you
> can use the same /etc/fstab on your USB flash disk without worrying
> wheter it would come up as sd0, sd1 sd2, etc.
> 
> http://www.openbsd.org/faq/faq14.html#flashmemLive
> says:
> If your target machine has an ahci(4) or SCSI interface, you will
> probably find your USB drive's identifier changing. Having multiple
> versions of your /etc/fstab file may make this easier to "fix" (in
> single user mode).
> 
> ---Question
> Would somebody rewrite  #flashmemLive section for the diskmap interface 
> change?
> or how to edit the /etc/fstab  for live USB device without worrying
> wheter it would come up as sd0, sd1 sd2, etc.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-10-31 Thread Jacob Meuser
On Sun, Oct 31, 2010 at 06:54:47PM -0200, Shazaum wrote:
> --
> 
> Renato dos Santos
> shazaum.wordpress.com
> 
> 
> 
> On 30 October 2010 16:07, Jacob Meuser  wrote:
> 
> > On Fri, Oct 29, 2010 at 09:53:33PM +, Jacob Meuser wrote:
> > > On Fri, Oct 29, 2010 at 09:22:12AM -0200, Shazaum wrote:
> > > > well, with Linux I have no problem ...
> > >
> > > linux support for realtek codecs alone is 5x as large as our
> > > driver for all of azalia.  likely they have some quirk for
> > > your specific bios/codec combo.
> >
> the bios has no options for audio

that's not what I'm saying/asking.  I'm saying your BIOS/device is broken.

> >
> > alsa has 2 different sets of quirks that match your bio/codec, one
> > is commented out.  so, when you say "Linux", what does that mean?
> > a vanilla kernel from kernel.org?  which version?  some distros
> > version?
> >
> kernel: 2.6.32.25 ... distro any...debian, ubuntu, fedora, slackware
> 
> *
> *
> 
> >
> > it seems this is a laptop?  if so, are you not getting sound on the
> > speaker, or not getting sound on the output jack, or both?
> >
> yes, this is a laptop, and both outputs..

ok then, your device is broken at the hardware/BIOS level.  it's saying
there is no speaker, but obviously there is one, right?

it works on linux because instead of having a driver based on the HDA spec,
they have a driver based on knowing specific detail about most devices.

this is simply not practical to maintain, especially when people who have
problems can't be bothered to test the latest code or provide descriptions
of their machines without a long back and forth of emails.

your device *could* work with OpenBSD's driver, but that would require
adding quirks to deal with your out-of-spec device.  to add insult to
injury, one of the quirks for your device in the linux driver does
something which is disallowed by the HDA spec.

that said, if you can get it working with some quirks, I would be ok to
commit it to our driver.  but I don't have time or desire to try to figure
out how to make it work, sorry.  and unfortunately for you, I'm probably
the only one who can help you ...

> >
> > > > I have done all sorts of changes in controls, and no sound effect
> > > > 'll find which way do I change the codec, thanks
> > >
> > > have you tried -current yet?  it's not clear if you have or
> > > haven't.
> >
> > still wondering about this ...
> >
> nops, not tried it, I'm using the 4.7, 'll do it now
> 
> >
> > --
> > jake...@sdf.lonestar.org
> > SDF Public Access UNIX System - http://sdf.lonestar.org

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: uaudio

2010-10-31 Thread Jacob Meuser
On Sun, Oct 31, 2010 at 03:03:39PM +0100, Jan Stary wrote:
> > > > > I use a m-audio mobilepre for recording and listening music;
> > > > > it's class compliant does 16-bit stereo at 48kHz, and the
> > > > > sound is excellent. It has a stereo preamp and a phantom
> > > > > power, which is handy.
> 
> I have been using this for some time now (thanks again for the tip, the
> sund really is good). Looking at
> http://www.m-audio.com/products/en_us/MobilePre.html
> today, it says the MobilePre can do 48000/24b; the image
> seems to be something else than what I see at my desk, too.
> Is there a new version of MobilePre out? Has someone used it under > 4.7?
> 
> > > > > > More generally, what is the status of uaudio(4)?
> > > > > 
> > > > > It works reliably, 24-bit encodings are not supported
> > > > > though; recently Jacob fixed various bugs, including a very
> > > > > annoying limitation of the block size.
> 
> Ah, so does the MobilePre in fact support 24b, but only 16b under OpenBSD?
> 
> > > > uaudio supports (most of) USB 1.x/USB Audio 1.x standards.  there may
> > > > be issues with USB 2.x/USB Audio 2.x devices, however, these types of
> > > > devices aren't all that common yet, unles you're looking for high-end
> > > > equipment (> 6 channels), but there are some out there.  for example,
> > > > the newer m-audio fast tracks are USB 2.0.
> > > 
> > > Is someone using one of these?
> > > 
> > > http://www.m-audio.com/products/en_us/FastTrack.html
> > > http://www.m-audio.com/products/en_us/FastTrackPro.html
> > > http://www.m-audio.com/products/en_us/FastTrackUltra.html
> > > 
> > > (If not, I will probably settle for the MobilePre.)
> > > 
> > > > creative/e-mu have some
> > > > USB 2.0 devices.  I have looked at USB 2.0 support for uaudio, and I 
> > > > have
> > > > ideas about how to proceed, but without the hardware in hand ... hmm
> > > > I see the e-mu 0202 is now ~$100, I should probably ask for one on
> > > > want.html.
> > > 
> > > I suppose this is not supported then, right?
> > > http://www.emu.com/products/product.asp?category=610&subcategory=611&product=15186
> > 
> > not yet.  I did receive an 0202, and have it working (this includes
> > support for multiple/sync endpoints and other improvements to uaudio
> > in general), but it requires some changes in audio(4) itself ...
> > it's coming.
> 
> Any news on this?

that was committed.  uaudio supports 24-bit encodings in OpenBSD 4.8.

>   Thank you
> 
>   Jan

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-10-30 Thread Jacob Meuser
On Fri, Oct 29, 2010 at 09:53:33PM +, Jacob Meuser wrote:
> On Fri, Oct 29, 2010 at 09:22:12AM -0200, Shazaum wrote:
> > well, with Linux I have no problem ...
> 
> linux support for realtek codecs alone is 5x as large as our
> driver for all of azalia.  likely they have some quirk for
> your specific bios/codec combo.

alsa has 2 different sets of quirks that match your bio/codec, one
is commented out.  so, when you say "Linux", what does that mean?
a vanilla kernel from kernel.org?  which version?  some distros
version?

it seems this is a laptop?  if so, are you not getting sound on the
speaker, or not getting sound on the output jack, or both?

> > I have done all sorts of changes in controls, and no sound effect
> > 'll find which way do I change the codec, thanks
> 
> have you tried -current yet?  it's not clear if you have or
> haven't.

still wondering about this ...

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-10-29 Thread Jacob Meuser
On Fri, Oct 29, 2010 at 09:22:12AM -0200, Shazaum wrote:
> well, with Linux I have no problem ...

linux support for realtek codecs alone is 5x as large as our
driver for all of azalia.  likely they have some quirk for
your specific bios/codec combo.

> I have done all sorts of changes in controls, and no sound effect
> 'll find which way do I change the codec, thanks

have you tried -current yet?  it's not clear if you have or
haven't.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-10-28 Thread Jacob Meuser
On Thu, Oct 28, 2010 at 09:07:14AM -0200, Shazaum wrote:
> this:
> 
> inputs.dac-0:1_mute=off  [ off on ]
> inputs.dac-2:3_mute=off  [ off on ]
> inputs.dig-dac-0:1_mut=off  [ off on ]
> record.adc-0:1_source=mic  [ mic cd mix2 ]
> record.adc-0:1_mute=off  [ off on ]
> record.adc-0:1=114,114
> outputs.line_boost=off  [ off on ]
> outputs.mic_source=mix5  [ mix5 ]
> outputs.mic_dir=input-vr50  [ none output input input-vr50 ]
> outputs.SPDIF_source=dig-dac-0:1  [ dig-dac-0:1 ]
> inputs.mix_source=mic  { mic }
> outputs.mix2_mute=off  [ off on ]
> outputs.mix2=126,126
> inputs.mix2_source=cd,mix  { cd mix }
> inputs.mix2_cd=121,121
> inputs.mix2_mix=121,121
> inputs.line_source=dac-0:1,mix2  { dac-0:1 mix2 }
> inputs.mix5_source=dac-2:3,mix2  { dac-2:3 mix2 }
> inputs.mix6_source=mix2  { mix2 }
> inputs.beep_mute=off  [ off on ]
> inputs.beep=119
> outputs.master=0,0
> outputs.master.mute=off  [ off on ]
> outputs.master.slaves=dac-0:1  { dac-0:1 dac-2:3 dig-dac-0:1 mix2 beep }
> record.volume=114,114
> record.volume.mute=off  [ off on ]
> record.volume.slaves=adc-0:1  { adc-0:1 }
> outputs.mode=analog  [ analog digital ]

so, 

> inputs.dac-0:1_mute=off  [ off on ]
> inputs.line_source=dac-0:1,mix2  { dac-0:1 mix2 }

your line-out is connected directly to your first dac, and you don't
have any volume control for the dac.

> outputs.line_boost=off  [ off on ]

maybe you need to set this to on?  sometimes it has an effect, sometimes
it doesn't.

if that doesn't work, either you're playing something that is simply
not loud enough to hear, or your codec nodes aren't correctly labeled.
if the latter, maybe a bios update would fix it, maybe not.

> 
> or
> this
> 
> outputs.line_boost=off  [ off on ]
> outputs.mic_source=mix5  [ mix5 ]
> outputs.mic_dir=input-vr50  [ none output input input-vr50 ]
> outputs.SPDIF_source=dig-dac-0:1  [ dig-dac-0:1 ]
> outputs.mix2_mute=off  [ off on ]
> outputs.mix2=126,126
> outputs.master=0,0
> outputs.master.mute=off  [ off on ]
> outputs.master.slaves=dac-0:1  { dac-0:1 dac-2:3 dig-dac-0:1 mix2 beep }
> outputs.mode=analog  [ analog digital ]

since both the controls that affect your dac output are labeled 'inputs',
this is a great example of why only looking at 'outputs' is simply wrong.



> 
> 
> --
> 
> Renato dos Santos
> shazaum.wordpress.com
> 
> 
> 
> On 27 October 2010 14:33, Jacob Meuser  wrote:
> 
> > On Wed, Oct 27, 2010 at 01:20:20PM -0200, Shazaum wrote:
> > > but this is the GENERIC, debug the azalia was active in the prime
> > > --
> > >
> > > Renato dos Santos
> > > shazaum.wordpress.com
> > >
> > >
> > >
> > > On 27 October 2010 11:10, Jacob Meuser  wrote:
> > >
> > > > I would prefer to just see mixerctl -v output from -current GENERIC.
> >
> >
> > things have changed since 4.7, and the problem may have already been fixed.
> >
> > also, I want to see mixerctl -v output as it is a boot, before you do
> > anything else with mixerctl.
> >
> > > >
> > > > --
> > > > jake...@sdf.lonestar.org
> > > > SDF Public Access UNIX System - http://sdf.lonestar.org
> >
> > --
> > jake...@sdf.lonestar.org
> > SDF Public Access UNIX System - http://sdf.lonestar.org

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Azalia "No Problem" but no Audio

2010-10-27 Thread Jacob Meuser
I would prefer to just see mixerctl -v output from -current GENERIC.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: how to repeat messages about manual configuration

2010-10-21 Thread Jacob Meuser
On Thu, Oct 21, 2010 at 02:34:03PM -0500, Carson Chittom wrote:
> On Thu, Oct 21, 2010 at 01:20:40PM -0500, Jay K wrote:
> 
> > 1) There should be a way to repeat all these messages for all installed
> > packages.
> >   Maybe there already is.
> 
> $ less /var/db/pkg/*/+DISPLAY

pkg_info -M is nicer

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: -current/amd64 @ macbook3,1

2010-10-16 Thread Jacob Meuser
On Sat, Oct 16, 2010 at 12:52:17PM +0200, Jan Stary wrote:

> but the sizes are still not recognized:
> 
> h...@mac:hans$ video -v
> video device /dev/video:
>   encodings: uyvy
>   sizes: 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
> 0x0, 0x0, 0x0
>   controls: brightness, saturation, gamma, sharpness
> Xv adaptor 0, Intel(R) Textured Video:
>   encodings: yuy2, uyvy
>   max size: 1280x800
> using uyvy encoding
> using frame size 0x0 (0 bytes)
> video: /dev/video: returned size not as requested


> Is this a video(1) problem?
> Is it a uvideo(4) problem?
> Is it a uvideo-firmware problem?


> bLength=38
> bDescriptorType=0x24 (CS_INTERFACE)
> bDescriptorSubtype=0x05 (UDESCSUB_VS_FRAME_UNCOMPRESSED)
> bLength=38
> bDescriptorType=0x24
> bDescriptorSubtype=0x05
> bFrameIndex=0x01
> bmCapabilities=0x00
> wWidth=640
> wHeight=480
> dwMinBitRate=383976960
> dwMaxBitRate=383976960
> dwMaxVideoFrameBufferSize=614400
> dwDefaultFrameInterval=33
> bFrameIntervalType=0x00
> 
> bLength=38
> bDescriptorType=0x24 (CS_INTERFACE)
> bDescriptorSubtype=0x05 (UDESCSUB_VS_FRAME_UNCOMPRESSED)
> bLength=38
> bDescriptorType=0x24
> bDescriptorSubtype=0x05
> bFrameIndex=0x02
> bmCapabilities=0x00
> wWidth=352
> wHeight=288
> dwMinBitRate=383976960
> dwMaxBitRate=383976960
> dwMaxVideoFrameBufferSize=202752
> dwDefaultFrameInterval=33
> bFrameIntervalType=0x00
> 
> bLength=38
> bDescriptorType=0x24 (CS_INTERFACE)
> bDescriptorSubtype=0x05 (UDESCSUB_VS_FRAME_UNCOMPRESSED)
> bLength=38
> bDescriptorType=0x24
> bDescriptorSubtype=0x05
> bFrameIndex=0x03
> bmCapabilities=0x00
> wWidth=320
> wHeight=240
> dwMinBitRate=383976960
> dwMaxBitRate=383976960
> dwMaxVideoFrameBufferSize=153600
> dwDefaultFrameInterval=33
> bFrameIntervalType=0x00


it's a bug in uvideo(4).  bFrameIntervalType affects frame rates, not frame
sizes.  patch below should fix it.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: uvideo.c
===
RCS file: /cvs/src/sys/dev/usb/uvideo.c,v
retrieving revision 1.142
diff -u -p uvideo.c
--- uvideo.c9 Oct 2010 09:48:03 -   1.142
+++ uvideo.c16 Oct 2010 19:40:33 -
@@ -2769,20 +2777,11 @@ uvideo_enum_fsizes(void *v, struct v4l2_frmsizeenum *f
/* no more frames left */
return (EINVAL);
 
-   if (sc->sc_fmtgrp[idx].frame[i]->bFrameIntervalType == 0) {
-   /* TODO */
-   fsizes->type = V4L2_FRMSIZE_TYPE_CONTINUOUS;
-   fsizes->un.stepwise.min_width = 0;
-   fsizes->un.stepwise.min_height = 0;
-   fsizes->un.stepwise.max_width = 0;
-   fsizes->un.stepwise.max_height = 0;
-   } else {
-   fsizes->type = V4L2_FRMSIZE_TYPE_DISCRETE;
-   fsizes->un.discrete.width =
-   UGETW(sc->sc_fmtgrp[idx].frame[i]->wWidth);
-   fsizes->un.discrete.height =
-   UGETW(sc->sc_fmtgrp[idx].frame[i]->wHeight);
-   }
+   fsizes->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+   fsizes->un.discrete.width =
+   UGETW(sc->sc_fmtgrp[idx].frame[i]->wWidth);
+   fsizes->un.discrete.height =
+   UGETW(sc->sc_fmtgrp[idx].frame[i]->wHeight);
 
return (0);
 }



Re: ffmpeg vs uvideo

2010-10-16 Thread Jacob Meuser
On Sat, Oct 16, 2010 at 05:46:24PM +0200, Jan Stary wrote:
> (I have changed the subject,
> because the subject has changed.)
> 
> On Oct 14 01:59:39, Jacob Meuser wrote:
> > On Thu, Oct 14, 2010 at 12:05:09AM +, Jacob Meuser wrote:
> > > On Thu, Oct 14, 2010 at 12:59:37AM +0200, Jan Stary wrote:
> > > > On Oct 13 22:07:27, Jacob Meuser wrote:
> > > > > On Wed, Oct 13, 2010 at 11:51:47PM +0200, Jan Stary wrote:
> > > > > > This is a fresh upgrade of current/amd64 on a Macbook3,1.
> > > > > > Basically, everything works except the wifi and uvideo.
> > > > > 
> > > > > > I installed the uvideo firmware as documented in uvideo(4).
> > > > > > I can capture an image with 'fswebcam image.jpg';
> > > > > > I have problems capturing a video stream with
> > > > > > ffmpeg -y -f video4linux2 -s vga -r 25 -i /dev/video0 /tmp/out.mpg
> > > > > > (the fps eventually drops to 0 and results in a tiny file
> > > > > > containing just a few frames) but I haven't really tried
> > > > > > tweaking the format options.
> > > > > 
> > > > > ffmpeg doesn't work with video(4).  frankly, I don't understand why
> > > > > video(4) support is enabled in ffmpeg, giving the the impression it's
> > > > > supposed to work, when it clearly doesn't.
> > > > 
> > > > On another machine (HP EliteBook 8530w running a recent -current)
> > > > I can capture video(4) just fine - using certain resolutions and frame
> > > > rates, that is.
> > > 
> > > with ffmpeg?  can you share your command, I've never gotten it to work.
> 
> This _sometimes_ works:
> ffmpeg -y -f video4linux2 -r 25 -s vga -i /dev/video out.mpg
> Other times, the fps gradually drops to zero.
> 
> With the current ffmpeg (just built form svn),
> it consistently results in
> 
> ffmpeg -y -f video4linux2 -r 25 -s vga -i /dev/video0 /tmp/out.m>
> FFmpeg version SVN-r25502, Copyright (c) 2000-2010 the FFmpeg developers
> built on Oct 16 2010 14:05:50 with gcc 4.2.1 20070719 
> configuration: 
> libavutil 50.32. 3 / 50.32. 3
> libavcore  0. 9. 1 /  0. 9. 1
> libavcodec52.92. 0 / 52.92. 0
> libavformat   52.83. 0 / 52.83. 0
> libavdevice   52. 2. 2 / 52. 2. 2
> libavfilter1.52. 0 /  1.52. 0
> libswscale 0.12. 0 /  0.12. 0
> [video4linux2 @ 0x83f3d080] ioctl set time per frame(1/25) failed
> /dev/video0: Input/output error
> 
> It fails this way with any other framerate, too.
> So you are right: it doesn't work.

I'm pretty sure this is because video/uvideo doesn't allow setting the
frame rate.  also, many webcams don't deliver a consistent frame rate;
some of them will deliver a higher frame rate if they receive more light.

> > fwiw, this is what I use, because using ffmpeg to capture directly from
> > video(4) has never worked for me:
> > 
> > $ video -f /dev/video1 -e yuy2 -s 640x480 -r 20 -o - | ffmpeg -y \
> > -f rawvideo -pix_fmt yuyv422 -s 640x480 -r 20 -i - \
> > -itsoffset 0.5 -f sndio -ar 16000 -ac 1 -i sun:1 out.avi
> 
> This is much more reliable;
> without audio, I can capture just fine with
> 
> $ video -f /dev/video -e yuy2 -s 640x480 -r 20 -o - \
> | ffmpeg -y -f rawvideo -pix_fmt yuyv422 -s 640x480 -r 20 -i - out.avi
> 
> However, the audio part does not work for me.
> The ffmpeg-20100512p4 package says
> 
> $ video -f /dev/video -e yuy2 -s 640x480 -r 20 -o - \
> | ffmpeg -y -f rawvideo -pix_fmt yuyv422 -s 640x480 -r 20 -i - \
> -f sndio -ar 16000 -ac 1 -i sun:1 out.avi
> FFmpeg version SVN-r23102, Copyright (c) 2000-2010 the FFmpeg developers
>   built on Oct 11 2010 18:27:01 with gcc 4.2.1 20070719 
>   configuration: --enable-shared --cc=cc --disable-altivec --disable-armv5te 
> --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-debug 
> --disable-indev=jack --disable-indev=oss --disable-iwmmxt --disable-neon 
> --disable-optimizations --disable-outdev=oss --enable-gpl --enable-libfaac 
> --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libschroedinger 
> --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 
> --enable-nonfree --enable-postproc --enable-pthreads 
> --enable-runtime-cpudetect --enable-x11grab 
> --extra-cflags=-I/usr/local/include -I/usr/X11R6/include 
> --extra-libs=-L/usr/local/lib -L/usr/X11R6/lib --mandir=/usr/local/man
>   libavutil 50.15. 2 / 50.15. 2
>   libavcodec52.67. 0 / 52.67. 0
>   libavformat   52.62. 0 / 52.62. 0
>   libavdevice   52. 2. 0 / 52. 2. 0
&

Re: Intel Link 5150 causes 05-Oct-10 snapshot hang on boot

2010-10-15 Thread Jacob Meuser
On Fri, Oct 15, 2010 at 11:39:20PM +0200, Dmitrij Czarkoff wrote:
> 2010/10/9 PPP2 :
> > Sorry, the last dmesg was of 05-Oct-10 snapshot, not of 4.7.
>
> As of 14-Oct-10 snapshot issue is still there.

trying to figure out how to sanely track usb transfers to see what's
hanging.  in the meantime, perhaps try enabling EHCI_DEBUG with
ehcidebug = 3?

--
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: -current/amd64 @ macbook3,1

2010-10-15 Thread Jacob Meuser
On Fri, Oct 15, 2010 at 02:24:27PM +0200, Jan Stary wrote:
> On Oct 14 01:59:39, Jacob Meuser wrote:
> > On Thu, Oct 14, 2010 at 12:05:09AM +0000, Jacob Meuser wrote:
> > > On Thu, Oct 14, 2010 at 12:59:37AM +0200, Jan Stary wrote:
> > > > On Oct 13 22:07:27, Jacob Meuser wrote:
> > > > > On Wed, Oct 13, 2010 at 11:51:47PM +0200, Jan Stary wrote:
> > > > > > This is a fresh upgrade of current/amd64 on a Macbook3,1.
> > > > > > Basically, everything works except the wifi and uvideo.
> > > > > 
> > > > > > I installed the uvideo firmware as documented in uvideo(4).
> > > > > > I can capture an image with 'fswebcam image.jpg';
> > > > > > I have problems capturing a video stream with
> > > > > > ffmpeg -y -f video4linux2 -s vga -r 25 -i /dev/video0 /tmp/out.mpg
> > > > > > (the fps eventually drops to 0 and results in a tiny file
> > > > > > containing just a few frames) but I haven't really tried
> > > > > > tweaking the format options.
> > > > > 
> > > > > ffmpeg doesn't work with video(4).  frankly, I don't understand why
> > > > > video(4) support is enabled in ffmpeg, giving the the impression it's
> > > > > supposed to work, when it clearly doesn't.
> > > > 
> > > > On another machine (HP EliteBook 8530w running a recent -current)
> > > > I can capture video(4) just fine - using certain resolutions and frame
> > > > rates, that is.
> > > 
> > > with ffmpeg?  can you share your command, I've never gotten it to work.
> 
> Yes, with ffmpeg.
> I will get my hands on the HP during the weekend and will come back.
> 
> > fwiw, this is what I use, because using ffmpeg to capture directly from
> > video(4) has never worked for me:
> > 
> > $ video -f /dev/video1 -e yuy2 -s 640x480 -r 20 -o - | ffmpeg -y \
> > -f rawvideo -pix_fmt yuyv422 -s 640x480 -r 20 -i - \
> > -itsoffset 0.5 -f sndio -ar 16000 -ac 1 -i sun:1 out.avi
> 
> Thank you for mentioning video(1), I didn't even know it existed.
> However, it only segfaults on this macbook
> 
> $ video
> video: /dev/video: returned size not as requested
> Segmentation fault (core dumped) 

probably the segfault is because of symbol conflicts with libxcb, which
has already been fixed, but I'd need to see a backtrace to know
for sure.

> $ video -O video.raw -r 25 -s 640x480 -v
> video device /dev/video:
>   encodings: uyvy
>   sizes: 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
> 0x0, 0x0, 0x0
>   controls: brightness, saturation, gamma, sharpness
> Xv adaptor 0, Intel(R) Textured Video:
>   encodings: yuy2, uyvy
>   max size: 1280x800
> using yuy2 encoding
> using frame size 0x0 (0 bytes)
> video: /dev/video: returned size not as requested
> Segmentation fault (core dumped) 
> 
> I have tried various options (-r 15, -r 25, -s 640, -s 1280, -s 320)
> with always the same result.
> 
> Why is it that the only sizes supported are 0x0, 0x0, etc?
> Is this the problem ("returned size not as requested")?

video(1) isn't getting the sizes correctly for some reason.
can you compile a kernel with UVIDEO_DEBUG defined (or just
add a #define it in sys/dev/usb/uvideo.c) and send me the
resulting dmesg?

> The video(1) manpage contains a few typos, see diff below.

thanks.

> The camera is a bultin Micron iSight; the manpage mentions
> "Apple builtin iSight" as known to work.
> 
> Also, the driver seems to first attach to bluetooth, then detach,
> and later attach to the camera:
> 
> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Apple Computer 
> Bluetooth" rev 2.00/0.0c addr 2
> uvideo0 detached
> uvideo0 at uhub1 port 4 configuration 1 interface 0 "Micron Built-in iSight" 
> rev 2.00/1.84 addr 2
> video0 at uvideo0
> 
> Is this normal?

looks like it is from what I see in uvideo.c.

> 
>   Thank you for your time
> 
>   Jan
> 
> 
> 
> --- video.1.orig  Fri Oct 15 09:43:18 2010
> +++ video.1   Fri Oct 15 09:43:32 2010
> @@ -108,7 +108,7 @@
>  is
>  .Ql - ,
>  frames will be read from standard input.
> -.It Fl O Ar ouput
> +.It Fl O Ar output
>  File to which frames will be written.
>  If
>  .Ar output
> @@ -121,7 +121,7 @@
>  .Nm
>  will also display the frames via
>  .Xr Xv 3 .
> -.It Fl o Ar ouput
> +.It Fl o Ar output
>  File to which frames will be written.
>  If
>  .Ar output

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: -current/amd64 @ macbook3,1

2010-10-13 Thread Jacob Meuser
On Thu, Oct 14, 2010 at 12:05:09AM +, Jacob Meuser wrote:
> On Thu, Oct 14, 2010 at 12:59:37AM +0200, Jan Stary wrote:
> > On Oct 13 22:07:27, Jacob Meuser wrote:
> > > On Wed, Oct 13, 2010 at 11:51:47PM +0200, Jan Stary wrote:
> > > > This is a fresh upgrade of current/amd64 on a Macbook3,1.
> > > > Basically, everything works except the wifi and uvideo.
> > > 
> > > > I installed the uvideo firmware as documented in uvideo(4).
> > > > I can capture an image with 'fswebcam image.jpg';
> > > > I have problems capturing a video stream with
> > > > ffmpeg -y -f video4linux2 -s vga -r 25 -i /dev/video0 /tmp/out.mpg
> > > > (the fps eventually drops to 0 and results in a tiny file
> > > > containing just a few frames) but I haven't really tried
> > > > tweaking the format options.
> > > 
> > > ffmpeg doesn't work with video(4).  frankly, I don't understand why
> > > video(4) support is enabled in ffmpeg, giving the the impression it's
> > > supposed to work, when it clearly doesn't.
> > 
> > On another machine (HP EliteBook 8530w running a recent -current)
> > I can capture video(4) just fine - using certain resolutions and frame
> > rates, that is.
> 
> with ffmpeg?  can you share your command, I've never gotten it to work.

fwiw, this is what I use, because using ffmpeg to capture directly from
video(4) has never worked for me:

$ video -f /dev/video1 -e yuy2 -s 640x480 -r 20 -o - | ffmpeg -y \
-f rawvideo -pix_fmt yuyv422 -s 640x480 -r 20 -i - \
-itsoffset 0.5 -f sndio -ar 16000 -ac 1 -i sun:1 out.avi

the audio is just slightly ahead (out of sync) without the -itsoffset.
the sndio backend in ffmpeg has fairly accurate timestamping; the
stamps should represent when the sound actually happened.  video(1) otoh
is just outputting a stream of raw frames, so ffmpeg assumes the
frames' timestamp is when they are read from stdin.  apparently on this
system with this camera it takes about a half second for images to be
captured and sent to stdout.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: -current/amd64 @ macbook3,1

2010-10-13 Thread Jacob Meuser
On Thu, Oct 14, 2010 at 12:59:37AM +0200, Jan Stary wrote:
> On Oct 13 22:07:27, Jacob Meuser wrote:
> > On Wed, Oct 13, 2010 at 11:51:47PM +0200, Jan Stary wrote:
> > > This is a fresh upgrade of current/amd64 on a Macbook3,1.
> > > Basically, everything works except the wifi and uvideo.
> > 
> > > I installed the uvideo firmware as documented in uvideo(4).
> > > I can capture an image with 'fswebcam image.jpg';
> > > I have problems capturing a video stream with
> > > ffmpeg -y -f video4linux2 -s vga -r 25 -i /dev/video0 /tmp/out.mpg
> > > (the fps eventually drops to 0 and results in a tiny file
> > > containing just a few frames) but I haven't really tried
> > > tweaking the format options.
> > 
> > ffmpeg doesn't work with video(4).  frankly, I don't understand why
> > video(4) support is enabled in ffmpeg, giving the the impression it's
> > supposed to work, when it clearly doesn't.
> 
> On another machine (HP EliteBook 8530w running a recent -current)
> I can capture video(4) just fine - using certain resolutions and frame
> rates, that is.

with ffmpeg?  can you share your command, I've never gotten it to work.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: USB devices don't attach when urtw is under load

2010-10-13 Thread Jacob Meuser
On Thu, Oct 14, 2010 at 12:33:34AM +0200, ??? ??? wrote:
> On Thu, Oct 14, 2010 at 12:01 AM, Jacob Meuser 
> wrote:
> > On Wed, Oct 13, 2010 at 09:32:59PM +0200, ??? ??? wrote:
> >> % ps -akx | grep usb
> >> B  B  8 ?? B DK B  B  B 0:00.26 (usbtask)
> >> 24889 p1 B S+ B  B  B 0:00.01 grep usb
> >
> > is that while the urtw is causing problems? B maybe try
> > 'top -S -n200 | grep usb' too.
> 
> After inserting a usb device (3COM WiFi adapter mentioned in the first
> mail) I get no notice on dmesg and following:
> 
> % ps -akx | grep usb
> 8 ??  DK  0:00.26 (usbtask)
>  7243 p1  S+  0:00.01 grep usb
> % top -S -n 200 | grep usb
> 8 root  -600K   19M idle  usbsyn0:00  0.00% usbtask

"usbsyn" - there's a synchronous usb transfer not finishing.  does this
recover (i.e. usbtask thread is not waiting in usbsyn) when you remove
the device?  does this happen with all usb devices?  does it happen in
all usb ports?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: -current/amd64 @ macbook3,1

2010-10-13 Thread Jacob Meuser
On Wed, Oct 13, 2010 at 11:51:47PM +0200, Jan Stary wrote:
> This is a fresh upgrade of current/amd64 on a Macbook3,1.
> Basically, everything works except the wifi and uvideo.

> I installed the uvideo firmware as documented in uvideo(4).
> I can capture an image with 'fswebcam image.jpg';
> I have problems capturing a video stream with
> ffmpeg -y -f video4linux2 -s vga -r 25 -i /dev/video0 /tmp/out.mpg
> (the fps eventually drops to 0 and results in a tiny file
> containing just a few frames) but I haven't really tried
> tweaking the format options.

ffmpeg doesn't work with video(4).  frankly, I don't understand why
video(4) support is enabled in ffmpeg, giving the the impression it's
supposed to work, when it clearly doesn't.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: USB devices don't attach when urtw is under load

2010-10-13 Thread Jacob Meuser
On Wed, Oct 13, 2010 at 09:32:59PM +0200, ??? ??? wrote:
> On Wed, Oct 13, 2010 at 12:49 PM, Jacob Meuser 
> wrote:
> > On Wed, Oct 13, 2010 at 10:56:24AM +0200, ??? ??? wrote:
> >> Under 05-Oct-2010 snapshot:
> >>
> >> 1. Plug in urtw device (I have a LevelOne device, don't know model as
> >> its plastic body is lost).
> >> 2. Start bittorrent client (or ftp or whatever loading urtw device).
> >> 3. Plug in any usb device - device doesn't get configured, lines not
> >> appended to dmesg, usbdevs hangs, otherwise operating system fully
> >> operational.
> >> 4. Stop loading urtw device.
> >> 5. Plug in and out any usb device - device gets configured, lines
> >> appended to dmesg.
> >
> > sounds like the device is messing up the usb task thread. B do you see
> > 'usbtask' in 'top -S' or 'ps akx' output?
> 
> I do:
> 
> % ps -akx | grep usb
> 8 ??  DK  0:00.26 (usbtask)
> 24889 p1  S+  0:00.01 grep usb

is that while the urtw is causing problems?  maybe try
'top -S -n200 | grep usb' too.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: USB devices don't attach when urtw is under load

2010-10-13 Thread Jacob Meuser
On Wed, Oct 13, 2010 at 10:56:24AM +0200, ??? ??? wrote:
> Under 05-Oct-2010 snapshot:
> 
> 1. Plug in urtw device (I have a LevelOne device, don't know model as
> its plastic body is lost).
> 2. Start bittorrent client (or ftp or whatever loading urtw device).
> 3. Plug in any usb device - device doesn't get configured, lines not
> appended to dmesg, usbdevs hangs, otherwise operating system fully
> operational.
> 4. Stop loading urtw device.
> 5. Plug in and out any usb device - device gets configured, lines
> appended to dmesg.

sounds like the device is messing up the usb task thread.  do you see
'usbtask' in 'top -S' or 'ps akx' output?

> Couldn't reproduce it with my 3COM 3RUSB10075 as it gets device
> timeout shortly and stops operating at all. As I have no other usb
> WiFi devices, can't say whether the problem is urtw-specific, or is
> valid for any usb WiFi or just urtw (or just my urtw).
> 
> % usbdevs -dv
> Controller /dev/usb0:
> addr 1: high speed, self powered, config 1, EHCI root hub(0x),
> Intel(0x8086), rev 1.00
>   uhub0
>  port 1 addr 2: high speed, power 98 mA, config 1, WebCam(0x62c0),
> Sonix Technology Co., Ltd.(0x0c45), rev 1.00
>uvideo0
>  port 2 powered
>  port 3 powered
>  port 4 powered
>  port 5 addr 3: high speed, power 100 mA, unconfigured,
> RTL8187(0x8187), Realtek(0x0bda), rev 1.00, iSerialNumber 00116B1604AE
>urtw0
>  port 6 powered
>  port 7 powered
>  port 8 powered
> Controller /dev/usb1:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x),
> Intel(0x8086), rev 1.00
>   uhub1
>  port 1 powered
>  port 2 addr 2: low speed, power 100 mA, config 1, Optical
> Mouse(0x003a), Genius(0x0458), rev 1.00
>uhidev0
> Controller /dev/usb2:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x),
> Intel(0x8086), rev 1.00
>   uhub2
>  port 1 powered
>  port 2 powered
> Controller /dev/usb3:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x),
> Intel(0x8086), rev 1.00
>   uhub3
>  port 1 powered
>  port 2 powered
> Controller /dev/usb4:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x),
> Intel(0x8086), rev 1.00
>   uhub4
>  port 1 powered
>  port 2 powered
> 
> dmesg (05-Oct-2010 snapshot), notice no dmesg lines between inserting
> and removing flash usb module:
> 
> OpenBSD 4.8-current (GENERIC.MP) #456: Tue Oct  5 20:18:06 MDT 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
> RTC BIOS diagnostic error 80
> cpu0: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE
> real mem  = 1060163584 (1011MB)
> avail mem = 1032794112 (984MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 10/06/08, SMBIOS rev. 2.4 @
> 0xe91c0 (31 entries)
> bios0: vendor Acer version "v0.3110" date 10/06/2008
> bios0: Acer AO531h
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT HPET APIC MCFG ASF! SLIC BOOT
> acpi0: wakeup devices P32_(S4) UHC1(S3) UHC2(S3) UHC3(S3) UHC4(S3)
> ECHI(S3) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) AZAL(S0) MODM(S0)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: apic clock running at 133MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Atom(TM) CPU N270 @ 1.60GHz ("GenuineIntel" 686-class) 1.60 GHz
> cpu1: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 20, 24 pins
> ioapic0: misconfigured as apic 0, remapped to apid 4
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus 3 (P32_)
> acpiprt2 at acpi0: bus 1 (EXP1)
> acpiprt3 at acpi0: bus -1 (EXP2)
> acpiprt4 at acpi0: bus -1 (EXP3)
> acpiprt5 at acpi0: bus 2 (EXP4)
> acpiec0 at acpi0
> acpicpu0 at acpi0: C3, C2, C1, PSS
> acpicpu1 at acpi0: C3, C2, C1, PSS
> acpitz0 at acpi0: critical temperature 95 degC
> acpibtn0 at acpi0: PWRB
> acpibtn1 at acpi0: LID0
> acpibtn2 at acpi0: SLPB
> acpibat0 at acpi0: BAT1 not present
> acpiac0 at acpi0: AC unit online
> acpivideo0 at acpi0: OVGA
> acpivout0 at acpivideo0: CRT1
> acpivout1 at acpivideo0: DTV1
> acpivout2 at acpivideo0: DFP1
> acpivout3 at acpivideo0: LCD_
> acpivout4 at acpivideo0: DTV2
> acpivout5 at acpivideo0: DFP2
> bios0: ROM list: 0xc/0xec00!
> cpu0: Enhanced SpeedStep 1597 MHz: speeds: 1600, 1333, 1066, 800 MHz
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel 82945GME Host" rev 0x03
> vga1 at pci0 dev 2 function 0 "Intel 82945GME Video" rev 0x03
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emu

Re: MPlayer man page

2010-10-12 Thread Jacob Meuser
On Wed, Oct 13, 2010 at 02:18:27AM +, Mikle Krutov wrote:
> Hello, list!
> While reading the man page of MPlayer, i've noticed lots of headers of
> it. That is kind of wrong. Version of MPlayer package is 
> mplayer-20090708p4-sdl
> 
> 
> With headers i mean:
> 
> The MPlayer Project 2009-03-25  1
> 
> MPlayer(1)   The Movie Player  MPlayer(1)
> 

so, what's wrong?  mplayer doesn't update their manual?  go tell the
mplayer people; reporting that here does nothing.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Intel Link 5150 causes 05-Oct-10 snapshot hang on boot

2010-10-08 Thread Jacob Meuser
On Fri, Oct 08, 2010 at 06:22:25PM +0200, Dmitrij D. Czarkoff wrote:
> Hello, everyone!
> 
> After some investigation about 05-Oct-10 snapshot's hang on Acer Aspire One
> 531h I got that Intel Link 5150 card containing both WiFi and WiMax devices
> causes that.
> 
> So, I've tried to boot two different netbooks with Intel Link 5150 with the
> 05-Oct-10 snapshot and got both of them hang just at the same string of dmesg
> that in 4.7 is followed by the messages:
> 
>uhub0: port 7, set config at addr 3 failed
>uhub0: device problem, disabling port 7

you get those messages on 4.7, but on -current it hangs, is that correct?

how about a full dmesg from 4.7, or a dmesg from -current up to the
point where it hangs?

> These messages refer to the Intel's WiMax hardware which resides on the same
> module as WiFi does, but is attached to USB interface.
> 
> The netbook with another wireless card and similar configuration booted
> normally, as did my Acer after I removed Intel Link 5150 from the slot.
> 
> Just in case anyone cares.

what happens if you insert the device after booting?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: AD1986A Data Sheet Available. Could somebody please fix the Sound Driver?

2010-10-05 Thread Jacob Meuser
On Wed, Oct 06, 2010 at 09:16:01AM +0530, Siju George wrote:

> $ mixerctl -av
> outputs.dig-dac-0:1_sou=hdaudio  [ hdaudio adc-0:1 ]
> inputs.dac-0:1_mute=off  [ off on ]
> inputs.dac-0:1=248,248
> inputs.dac-2:3_mute=off  [ off on ]
> inputs.dac-2:3=248,248
> inputs.dac-4:5_mute=off  [ off on ]
> inputs.dac-4:5=248,248
> inputs.mix_source=dac-0:1,mix3,sel8,cd,sel7  { dac-0:1 mix3 sel8 cd sel7 }
> inputs.mix2_source=mix  { mix }
> outputs.mix3_mute=off  [ off on ]
> inputs.mix3_source=dac-2:3,dac-4:5  { dac-2:3 dac-4:5 }
> inputs.hp_source=mix  [ mix dac-2:3 dac-4:5 ]
> inputs.line-grn_source=mix  [ mix dac-2:3 ]
> inputs.line-blu_source=dac-2:3  [ dac-2:3 mix ]
> inputs.line-pnk_source=dac-4:5  [ dac-4:5 mix2 ]
> inputs.sel6_source=mic  [ mic line-in line-pnk line-pnk mix4 mix5 mix6 mix7 ]
> outputs.sel6=255,255
> inputs.sel7_source=line-in  [ line-in line-blu mic ]
> inputs.sel8_source=sel6  [ sel6 mix8 ]
> record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]
> record.adc-0:1_mute=off  [ off on ]
> record.adc-0:1=255,255
> inputs.sel8_mute=off  [ off on ]
> inputs.sel8=248,248
> inputs.cd_mute=off  [ off on ]
> inputs.cd=248,248
> inputs.sel7_mute=off  [ off on ]
> inputs.sel7=248,248
> outputs.hp_mute=off  [ off on ]
> outputs.hp=248,248
> outputs.hp_boost=off  [ off on ]
> outputs.line-grn_mute=off  [ off on ]
> outputs.line-grn=248,248
> outputs.line-grn_boost=off  [ off on ]
> outputs.line-grn_eapd=on  [ off on ]
> outputs.line-blu_mute=off  [ off on ]
> outputs.line-blu=248,248
> outputs.line-blu_dir=output  [ none output input ]
> outputs.line-pnk_mute=off  [ off on ]
> outputs.line-pnk=248,248
> outputs.line-pnk_dir=output  [ none output input input-vr0 input-vr50
> input-vr80 ]
> outputs.mic_dir=input-vr80  [ none input input-vr0 input-vr50 input-vr80 ]
> outputs.line-in_dir=input  [ none input input-vr0 input-vr50 input-vr80 ]
> outputs.SPDIF_source=dig-dac-0:1  [ dig-dac-0:1 ]
> inputs.mix4_source=mic,line-pnk  { mic line-pnk }
> inputs.mix5_source=mic,line-in  { mic line-in }
> inputs.mix6_source=line-pnk,line-in  { line-pnk line-in }
> inputs.mix7_source=mic,line-pnk,line-in  { mic line-pnk line-in }
> inputs.mix8_source=sel6  { sel6 }
> outputs.hp_sense=unplugged  [ unplugged plugged ]
> outputs.line-grn_sense=plugged  [ unplugged plugged ]
> outputs.line-blu_sense=plugged  [ unplugged plugged ]
> outputs.line-pnk_sense=unplugged  [ unplugged plugged ]
> outputs.mic_sense=unplugged  [ unplugged plugged ]
> outputs.line-in_sense=unplugged  [ unplugged plugged ]
> outputs.master=255,255
> outputs.master.mute=off  [ off on ]
> outputs.master.slaves=dac-0:1,hp,line-grn  { dac-0:1 dac-2:3 dac-4:5
> mix3 sel6 sel8 cd sel7 hp line-grn line-blu line-pnk }
> record.volume=255,255
> record.volume.mute=off  [ off on ]
> record.volume.slaves=adc-0:1  { adc-0:1 }
> outputs.mode=analog  [ analog digital ]
> $

first, 'line-pnk' is almost certainly the rear mic input, and 'mic'
is the front mic input.  let's stick with the rear jacks for now.

so you want this:
> outputs.line-pnk_dir=output  [ none output input input-vr0 input-vr50
> input-vr80 ]

to get to this:
> record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]

first step, set line-pnk to be a mic input:

$ mixerctl outputs.line-pnk=input-vr80

I bet that's what kills it for other OSes.  shame on the BIOS vendor for
naming it like that and shame on the board vendor for using such a silly
codec.  anyway ...

now we want to see what line-pnk can feed into:

$ mixerctl -v | grep '_source=.*line-pnk'
inputs.sel6_source=mic  [ mic line-in line-pnk line-pnk mix4 mix5 mix6 mix7 ]
inputs.mix4_source=mic,line-pnk  { mic line-pnk }
inputs.mix6_source=line-pnk,line-in  { line-pnk line-in }
inputs.mix7_source=mic,line-pnk,line-in  { mic line-pnk line-in }

hmm, we're trying to get to
> record.adc-0:1_source=sel8  [ sel8 cd sel7 mix mix2 ]
but none of sel6, mix4, mix6 or mix7 are choices.  let's see what sel6
can feed:
$ mixerctl -v | grep '_source=.*sel6'
inputs.sel8_source=sel6  [ sel6 mix8 ]
inputs.mix8_source=sel6  { sel6 }

aha, we can have line-pnk -> sel6 -> sel8 -> adc-0:1, and that appears
to be the shortest routing (there are others, but ignore those for now).

there's only one more thing to change:

$ mixerctl inputs.sel6_source=line-pnk

now, it's strange there are two line-pnk choices for sel6_source.
that's really a bug in azalia(4).  oh well.  most likely, one is the
jack itself and one is an amp.  it's hard to tell, even with a
datasheet, what's really going on, as nodes can be labeled by the BIOS.
I'm guessing you don't have the code to the BIOS.  you could build a
kernel with AZALIA_DEBUG defined and get a better picture.

anyway, I think that's all you should have to do to record from the rear
mic jack:

$ mixerctl outputs.line-pnk_dir=input-vr80
$ mixerctl inputs.sel6_source=line-pnk
$ mixerctl inputs.sel8_source=sel6
$ mixerctl record.adc-0:1_source=sel8

alternatively, to get around the "double line-pnk choice" in sel6, route
through mix

Re: audio has dropouts playing music cds

2010-09-22 Thread Jacob Meuser
kaffeine uses libcdio, which I don't think has ever worked quite
right on OpenBSD.  kaffeine crashes for me on amd64 when I try to
play an audio CD.  kscd tries to use '/dev/cdrom' by default, which
is totally bogus.

use cdio(1)'s 'cdplay' command to play audio CDs.  cdio(1) is in
base.  it works.

older CD player software on UNIX generally tries to have the CD reader
decode the data to analog signals and send that to the audio device
through a direct connection.  this is what cdio(1)'s 'play' command
does too, btw.  there is no guarantee that there is an analog connection
from the CD device to the soundcard (and no way to check other that
visual examination or experimentation), especially on newer laptops.
I didn't look at the code, but this is probably why you don't hear
anything with kscd (assuming you fixed it to use the right device).

On Wed, Sep 22, 2010 at 02:07:56PM -0400, Len Zaifman wrote:
> Running OpenBSD 4.8 GENERIC.MP#383 i386 ie a recent -current snapshot I can
> run both commercial DVDs and videos downloaded from the web ( flv and mp3,4
> files) using kaffeine and the audio is perfectly fine.
> 
> I use  kaffeine-0.8.8p2 from the packages directory.
> 
> When I try to use kaffeine to play commercial CDs I hear dropouts about every
> 5-10 seconds. It is very annoying. Since DVDs have much higher bandwidth
> requirements than music CDs, it may be a software issue. I tried kscd and
> there is no audio output.
> 
> Is there a fix for kaffeine and music cds?? can I get kscd to output audio?
> Another CD player on openbsd I can try?
> 
> For Hardware I am on a Lenovo W500 Laptop
> 
> Intel(R) Core(TM)2 Duo CPU T9600 @ 2.80GHz
> 
> real mem  = 3214176256 (3065MB)
> avail mem = 3151605760 (3005MB)
> 
> cd0 at scsibus0 targ 1 lun 0:  ATAPI 5/cdrom
> removable
> azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: apic 1 int
> 17 (irq 11)
> azalia0: codecs: Conexant CX20561, Conexant/0x2c06, using Conexant CX20561
> audio0 at azalia0
> 
> Len Zaifman
> Systems Manager, High Performance Systems
> The Centre for Computational Biology
> The Hospital for Sick Children
> 555 University Ave.
> Toronto, Ont M5G 1X8
> 
> tel: 416-813-5513
> email: leona...@sickkids.ca
> 
> This e-mail may contain confidential, personal and/or health
> information(information which may be subject to legal restrictions on use,
> retention and/or disclosure) for the sole use of the intended recipient. Any
> review or distribution by anyone other than the person for whom it was
> originally intended is strictly prohibited. If you have received this e-mail
> in error, please contact the sender and delete all copies.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Popping sounds with azalia(4) device

2010-09-16 Thread Jacob Meuser
On Thu, Sep 16, 2010 at 02:17:36AM -0400, Joe Gidi wrote:
> I'm getting frequent popping sounds from the azalia device on my system,
> roughly every 15-30 seconds. I have a pair of stereo speakers plugged in
> to the green speaker jack, and the pops always seem to alternate channels
> (one on the left, the next one on the right).
> 
> The pops do not occur under Windows, so I don't believe there's a hardware
> problem.
> 
> Mixerctl -v output and dmesg follow. The pops are quieter if I take "mix"
> off of inputs.mix2_source so it's just using dac-0:1, but they are still
> present.
> 
> Any ideas?

do you hear the noise only when playing something, or do you hear it
even when nothing is playing?


> dmesg:
> 
> OpenBSD 4.8-current (GENERIC.MP) #409: Wed Sep  8 17:36:44 MDT 2010
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 3487105024 (3325MB)
> avail mem = 3380445184 (3223MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.5 @ 0x9f000 (66 entries)
> bios0: vendor American Megatrends Inc. version "1401" date 06/11/2010
> bios0: ASUSTeK Computer INC. M4A88TD-V EVO/USB3
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S1 S3 S4 S5
> acpi0: tables DSDT FACP APIC MCFG OEMB SRAT HPET SSDT
> acpi0: wakeup devices PCE2(S4) PCE3(S4) PCE4(S4) PCE5(S4) PCE6(S4)
> PCE7(S4) PCE9(S4) PCEA(S4) PCEB(S4) PCEC(S4) SBAZ(S4) P0PC(S4) GEC_(S4)
> UHC1(S4) UHC2(S4) USB3(S4) UHC4(S4) USB5(S4) UHC6(S4) UHC7(S4) PE20(S4)
> PE21(S4) RLAN(S4) PE22(S4) PE23(S4) PS2M(S4) PS2K(S4) UAR1(S4)
> acpitimer0 at acpi0: 3579545 Hz, 32 bits
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: AMD Athlon(tm) II X4 640 Processor, 3013.70 MHz
> cpu0:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
> cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
> 64b/line 16-way L2 cache
> cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
> cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
> cpu0: apic clock running at 200MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: AMD Athlon(tm) II X4 640 Processor, 3013.38 MHz
> cpu1:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
> cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
> 64b/line 16-way L2 cache
> cpu1: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
> cpu1: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
> cpu2 at mainbus0: apid 2 (application processor)
> cpu2: AMD Athlon(tm) II X4 640 Processor, 3013.38 MHz
> cpu2:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
> cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
> 64b/line 16-way L2 cache
> cpu2: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
> cpu2: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
> cpu3 at mainbus0: apid 3 (application processor)
> cpu3: AMD Athlon(tm) II X4 640 Processor, 3013.38 MHz
> cpu3:
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,MWAIT,CX16,POPCNT,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
> cpu3: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
> 64b/line 16-way L2 cache
> cpu3: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
> cpu3: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
> ioapic0 at mainbus0: apid 4 pa 0xfec0, version 21, 24 pins
> acpihpet0 at acpi0: 14318180 Hz
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (P0P1)
> acpiprt2 at acpi0: bus 1 (PCE2)
> acpiprt3 at acpi0: bus -1 (PCE3)
> acpiprt4 at acpi0: bus -1 (PCE4)
> acpiprt5 at acpi0: bus -1 (PCE9)
> acpiprt6 at acpi0: bus 2 (PCEA)
> acpiprt7 at acpi0: bus 3 (P0PC)
> acpiprt8 at acpi0: bus 4 (PE20)
> acpiprt9 at acpi0: bus 5 (PE21)
> acpiprt10 at acpi0: bus -1 (PE22)
> acpiprt11 at acpi0: bus -1 (PE23)
> acpiec0 at acpi0
> acpicpu0 at acpi0: PSS
> acpicpu1 at acpi0: PSS
> acpicpu2 at acpi0: PSS
> acpicpu3 at acpi0: PSS
> aibs0 at acpi0
> acpibtn0 at acpi0: PWRB
> pci0 at mainbus0 bus 0
> pchb0 at pci0 dev 0 function 0 "AMD RS780 Host" rev 0x00
> ppb0 at pci0 dev 2 function 0 "AMD RS780 PCIE" rev 0x00: apic 4 int 18
> (irq 10)
> pci1 at ppb0 bus 1
> vga1 at pci1 dev 0 function 0 "ATI Radeon HD 4350" rev 0x00
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> radeondrm0 at vga1: apic 4 int 18 (irq 10)
> drm0 at radeondrm0
> azalia0 at pci1 dev 0 function 1 "ATI Radeon HD 4000 HD Audio" rev 0x00:
> apic 4 int 19 (irq 11)
> 

Re: linux emulation

2010-09-12 Thread Jacob Meuser
On Mon, Sep 13, 2010 at 12:51:29AM -0400, Predrag Punosevac wrote:
> Elmar Bschorer  wrote:
> >hi list,
> 
> >i tried to get skype up and running with linux emulation on openbsd 4.7.
> >skype starts up and i can log in but i can't see any contacts or chat 
> >with others. looks like i am not really connected.
> >does anyone has skype running? any ideas what the problem might be?
> 
> Of course. I got Skype running on OpenBSD
> 
> http://www.daemonforums.org/showthread.php?t=2616&highlight=Skype+OpenBSD
> >tia
> >elmar
> 
> The problem is that you can only use chat. You can NOT use VoIP since
> OpenBSD does not have enough Linux emulation even for old Skype v 1.2
> compiled with static OSS(Linux version) let alone v. 2.xxx which 
> requires Alsa.
> 
> 
> This is how we do VoIP on OpenBSD
> 
> http://www.ryanflannery.net/howtos/obsd_voicechat.php

pjsua and ekiga may fulfill your voip needs as well.  they both have
their issues though, imo.  a truly usable, simple to configure voip
client would be nice.

> You can also get old Skype version 1.2 compiled with static OSS if you
> look hard enough on the Internet and add the support to Linux emulator
> layer if you have enough programming skill. I am sure Jake and Alexander
> will give you their notes about aucat and tell you what needs to be
> done.
> 
> Cheers,
> Predrag


-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: azalia0 misbehaving

2010-09-04 Thread Jacob Meuser
On Sat, Sep 04, 2010 at 07:39:27AM +, Jacob Meuser wrote:
> On Fri, Sep 03, 2010 at 11:26:01PM -0700, Aaron Stellman wrote:
> > Hello,
> > 
> > Having some issues with azalia(4) in a thinkpad T61, and perhaps aucat
> > may have something to do with it too.
> > Very simple setup, listening to mpd playing audio streams from another
> > mpd running on another machine. Sound skips at times, coinciding with
> > the following messages in dmesg:
> 
> when did this start?
> 
> > azalia0: stream 1: sts=28

> > OpenBSD 4.8-beta (GENERIC.MP) #297: Thu Aug  5 21:35:12 MDT 2010

you want changes that went in the next day.  and maybe the next few days
too.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: azalia0 misbehaving

2010-09-04 Thread Jacob Meuser
On Fri, Sep 03, 2010 at 11:26:01PM -0700, Aaron Stellman wrote:
> Hello,
> 
> Having some issues with azalia(4) in a thinkpad T61, and perhaps aucat
> may have something to do with it too.
> Very simple setup, listening to mpd playing audio streams from another
> mpd running on another machine. Sound skips at times, coinciding with
> the following messages in dmesg:

when did this start?

> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=2c
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=2c
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> azalia0: stream 1: sts=28
> 
> $ dmesg  | grep azalia | wc -l
>  582
> 
> Sometimes aucat just exits by itself, sometimes doesn't.
> $ sudo aucat -
> sio(default|): created
> default: recording s16le,0:1,44100
> default: playing s16le,0:1,44100
> mix(play): newin, will use 11648
> default: block size is 2912 frames, using 4 blocks
> defa...@default: rec=0:1 play=0:1 vol=32768
> listen(/tmp/aucat/softaudio0|): created
> sock(sock|): created
> sock/hel|rmsg|widl: HELLO message
> sock/hel|rmsg|widl: hello from , proto = 1, ver 3
> default: option found
> device requested
> ctl(ctl): new control name is mpd0
> ctl(ctl): overwritten slot 0
> sock/hel|rmsg|widl: no read buffer to set volume yet
> mpd0(127)/off: changing volume to 127
> mpd0/ini|rmsg|widl: SETPAR message
> mpd0/ini|rmsg|widl: using 16bits, 2 bytes per sample
> mpd0/ini|rmsg|widl: using playback channels 0..1
> mpd0/ini|rmsg|widl: using 44100Hz sample rate, 2912 fr block size
> mpd0/ini|rmsg|widl: using 11648 buffer size
> mpd0: buffer size = 11648, play = s16le,0:1,44100
> mpd0/ini|rmsg|widl: GETPAR message
> mpd0/ini|rret|widl: RRET done
> mpd0/ini|rmsg|widl: GETPAR message
> mpd0/ini|rret|widl: RRET done
> mpd0/ini|rmsg|widl: GETPAR message
> mpd0/ini|rret|widl: RRET done
> mpd0/ini|rmsg|widl: START message
> mpd0/sta|rmsg|widl: allocating 11648/23296 fr buffers, rmax = 93184
> mpd0/run|rmsg|widl: attaching at 0
> rsock(sock)->mix(play): setmaster: 32768/32768
> syncing device, mix(play): todo = 0: lat = 0, sub(rec): lat = 0
> rsock(sock)->mix(play): setting volume to 32768
> starting device
> sio(default|): started
> sio(default|): busy loop, disconnecting
> sio(default|): disconnected
> sio(default|eh): eof
> rsio(default): eof
> rsio(default): terminating...
> rsio(default): done
> rsio(default)->sub(rec): eof requested
> sub(rec): terminating...
> sub(rec): free delayed
> wsio(default): terminating...
> wsio(default): done
> mix(play)->wsio(default): hup requested
> mix(play): hup
> mix(play): terminating...
> rsock(sock)->mix(play): hup requested
> rsock(sock): hup
> rsock(sock): terminating...
> rsock(sock): done
> mpd0/ini|rmsg|widl: freeing buffers
> wsock(sock): terminating...
> wsock(sock): done
> wsock(sock): freed
> sock(sock|w): terminating...
> sock(sock|w): destroyed
> device released
> rsock(sock): freed
> mix(play): free delayed
> sio(default|Reh): terminating...
> wsio(default): free delayed
> rsio(default): free delayed
> sio(default|hZ): terminating...
> sio(default|hZ): destroyed
> sio(default|hZ): stopped
> device disappeared
> closing device
> ctl(ctl): terminating...
> ctl(ctl): done
> ctl(ctl): free delayed
> zomb(play): freed
> zomb(default): freed
> zomb(rec): freed
> zomb(default): freed
> zomb(ctl): freed
> listen(/tmp/aucat/softaudio0|): closing
> listen(/tmp/aucat/softaudio0|Z): terminating...
> listen(/tmp/aucat/softaudio0|Z): destroyed
> nothing to do...
> 
> These events tend to happen when I switch virtual screens in scrotwm..
> Haven't tried on other WMs.
> 
> Usually I run it like this:
> $ grep aucat /etc/rc.conf.local 
> aucat_flags="-l"# for normal use: ""
> 
> 
> OpenBSD 4.8-beta (GENERIC.MP) #297: Thu Aug  5 21:35:12 MDT 2010
> dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> real mem = 2103115776 (2005MB)
> avail mem = 2033311744 (1939MB)
> mainbus0 at root
> bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (73 entries)
> bios0: vendor LENOVO version "7LETC7WW (2.27 )" date 04/08/2010
> bios0: LENOVO 7658CTO
> acpi0 at bios0: rev 2
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT ASF! SSDT 
> SSDT SSDT SSDT
> acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) IGBE(S4) EXP0(S4) 
> EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) 
> USB3(S3) USB4(S3) EHC0(S3) EHC1(S3) HDEF(S4)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpiec0 at acpi0
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz, 2394.40 MHz
> cpu0: 
> FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CF

Re: multiple tun interfaces with qemu [SOLVED] - bug? creating /dev/tunX

2010-08-23 Thread Jacob Meuser
On Mon, Aug 23, 2010 at 05:39:49PM -0700, Barry Grumbine wrote:
> When using qemu, /dev/tunX interfaces are being created with the wrong
> permissions.  It's not a /dev/MAKEDEV problem
> # cd /dev && ./MAKEDEV tun4
> works just peachy.  The problem is when /dev/tunX is created on the fly.
> 
> ...Are /dev/tunX created on the fly?

man 4 tun

A tun interface can be created at runtime using the 'ifconfig tunN create'
command or by opening the character special device /dev/tunN.

> hmmm... maybe that happens when I run my qemu command?
> sudo -C 4 -u qemu /usr/local/bin/qemu -hda
> /home/qemu/4.4/i386/stable/stable_44_i386.img -m 256 -net
> nic,model=rtl8139,macaddr=52:54:00:c7:44:01 -net tap,fd=3 -nographic
> -localtime -no-fd-bootchk -pidfile /home/qemu/4.4/i386/stable/qemu.pid
> 3<>/dev/tun10

that overwrites /dev/tun10 if you have not created the interface with
ifconfig.

so, you need to do the following for each N device:

# cd /dev && ./MAKEDEV tunN
# ifconfig tunN create

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: undeadly article

2010-08-18 Thread Jacob Meuser
On Wed, Aug 18, 2010 at 04:39:30PM -0400, Tony Abernethy wrote:
> Personally, I liked the article.
> Small change in perspective changes an ordeal into an adventure.
> 
> Jacob Meuser wrote:
> > On Wed, Aug 18, 2010 at 04:28:57PM +0300, Mihai Popescu B.S. wrote:
> > > Hello,
> > >
> > > My post was not intended as a direct hit for the article. I told my
> > > opinion to misc@ because undeadly ask for subscription, no more
> > > anonymous coward post. Am I wrong ?
> > >
> > > I target airport behaviour with my comment. I use the airport for 6
> > > flight until now, no problem at all with security teams. I was quick
> > > and polite in answers and the time with them was short. Most of them
> > > have the "nose" to see what they are dealing with.
> > 
> > bullshit.  sorry, but that is not true.
> "Smart" security will inevitably outsmart itself.
> Add respect to polite in the brew.
> He inspects you. You inspect him. You respect each other. Works better.

sure.  I am always very polite wih "authority".  there was never any
disrespect put out by me.  as I said, I *want* these people to do
a good job.  they've got good people, it's the things/ways they
are/aren't taught that is the problem.

> > 
> > I regularly get picked on by "authority", but it's alwasy just been
> > a pointless hassle.  I'll never forget the time a cop stopped me
> > in my own neighborhood, in the rain, for walking against a signal,
> > when his car was the only moving vehicle within a half mile.  the
> > best part was when he dropped his papers in a puddle.
> > 
> > > If you start
> > > playing, they will answer accordingly, not because you look like a
> > > suspect, it is more like an answer.
> > 
> > the only playing was their own game.  after all, it is they who
> > choose to start the games.
> If they are wasting your time they will keep it up.
> If you are wasting their time they will drop you in a hurry.
> The best tactic is when you are obviously suppressing a laugh.

well, they held us there, for nothing but having more than one laptop
and looking like a poor hippie.  I didn't care, I figured it was all
going to happen anyway.  but maybe while they were busy with us, they
were letting some slick and polite well dressed one laptop carrying
creep go who they should have looked at closer?  who knows.

> > 
> > > Have fun ! (but not in sensible areas).
> > 
> > but see, if authority can't take that you're laughing because their
> > questions and assumptions *really are* ridiculous ...
> > 
> > the lady in the office where jcr was "held" when we met him was
> > in charge of the place.  and it's clear why she was in charge.
> > she was sharp and no-nonsense.  of course, you want such people
> > in charge of such places.
> > 
> > even after we got out of that office I still had to deal with
> > another person who inspected my bags.  with this uy though, I
> > shared a good laugh, even though he was pretty thorough.
> Watch how a person laughs. Even more a window into the soul than the eyes.
> Customs tends to be sharper than security.
> They probably do have a sense of humor, 
> but it is never shared with "outsiders".
> 
> > 
> > --
> > jake...@sdf.lonestar.org
> > SDF Public Access UNIX System - http://sdf.lonestar.org
> 

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: undeadly article

2010-08-18 Thread Jacob Meuser
On Wed, Aug 18, 2010 at 04:28:57PM +0300, Mihai Popescu B.S. wrote:
> Hello,
> 
> My post was not intended as a direct hit for the article. I told my
> opinion to misc@ because undeadly ask for subscription, no more
> anonymous coward post. Am I wrong ?
> 
> I target airport behaviour with my comment. I use the airport for 6
> flight until now, no problem at all with security teams. I was quick
> and polite in answers and the time with them was short. Most of them
> have the "nose" to see what they are dealing with.

bullshit.  sorry, but that is not true.

I regularly get picked on by "authority", but it's alwasy just been
a pointless hassle.  I'll never forget the time a cop stopped me
in my own neighborhood, in the rain, for walking against a signal,
when his car was the only moving vehicle within a half mile.  the
best part was when he dropped his papers in a puddle.

> If you start
> playing, they will answer accordingly, not because you look like a
> suspect, it is more like an answer.

the only playing was their own game.  after all, it is they who
choose to start the games.

> Have fun ! (but not in sensible areas).

but see, if authority can't take that you're laughing because their
questions and assumptions *really are* ridiculous ...

the lady in the office where jcr was "held" when we met him was
in charge of the place.  and it's clear why she was in charge.
she was sharp and no-nonsense.  of course, you want such people
in charge of such places.

even after we got out of that office I still had to deal with
another person who inspected my bags.  with this uy though, I
shared a good laugh, even though he was pretty thorough.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: anyone tried the freebsd version of teamspeak3 with the freebsd emulation?

2010-08-17 Thread Jacob Meuser
On Tue, Aug 17, 2010 at 10:12:50AM +0530, Siju George wrote:
> On Sun, Aug 15, 2010 at 11:48 PM, Frank Bax  wrote:
> 
> > Siju George wrote:
> >
> >> On Sat, Aug 14, 2010 at 6:08 PM, Stuart Henderson 
> >> wrote:
> >>
> >>> On 2010-08-14, Sevan / Venture37  wrote:
> >>>
>  On 14 August 2010 10:46, Stuart Henderson  wrote:
> 
> > no, but in general you want to use Linux emulation not FreeBSD
> > emulation.
> > also, if it's threaded software, use GENERIC not GENERIC.MP.
> >
>  Hi Stuart,
>  I'm just curious is that because of limitations in our freebsd
>  compatibility layer?
> 
> >>> It's even less maintained than the linux one (and there's very little
> >>> point in doing so; most things you might run as a binary are going to be
> >>> available for Linux in either the same or a newer version as FreeBSD).
> >>>
> >>>
> >> You don't get sound in linux emulation right?
> >> I could never make sound work
> >>
> >
> >
> > I'm running Ventrilo with linux emulation; does that count?
> >
> >
> It Counts Very much! Thanks a million :-)
> Do you get sound in Opera for flash?

yes.  a lot of flash audio uses 22.05kHz sample rates, so if your
audio device doesn't do 22.05kHz it either won't work or will sound
wrong.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: anyone tried the freebsd version of teamspeak3 with the freebsd emulation?

2010-08-14 Thread Jacob Meuser
On Sat, Aug 14, 2010 at 07:08:18PM +0100, Stuart Henderson wrote:
> On 2010/08/14 19:18, Siju George wrote:
> > On Sat, Aug 14, 2010 at 6:08 PM, Stuart Henderson  
> > wrote:
> > > On 2010-08-14, Sevan / Venture37  wrote:
> > >> On 14 August 2010 10:46, Stuart Henderson  wrote:
> > >>> no, but in general you want to use Linux emulation not FreeBSD 
> > >>> emulation.
> > >>> also, if it's threaded software, use GENERIC not GENERIC.MP.
> > >>
> > >> Hi Stuart,
> > >> I'm just curious is that because of limitations in our freebsd
> > >> compatibility layer?
> > >
> > > It's even less maintained than the linux one (and there's very little
> > > point in doing so; most things you might run as a binary are going to be
> > > available for Linux in either the same or a newer version as FreeBSD).
> > >
> > 
> > You don't get sound in linux emulation right?
> > I could never make sound work
> 
> Never tried, the only thing I've ever wanted it for is softmaker office.

there is OSSv3 emulation for linux binaries.  it works as well as using
libossaudio.  i.e. there is no sndio/aucat integration, so there is no
concurrent access support, there is no resampling, and format/channel
conversions are limited.

to be honest, I'm perfectly fine with people thinking it doesn't exist
or doesn't work enough to be useful.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: no sound Intel 82801I HD Audio in -current

2010-08-10 Thread Jacob Meuser
On Tue, Aug 10, 2010 at 09:09:58AM +, Jacob Meuser wrote:
> On Mon, Aug 09, 2010 at 09:28:34PM -0700, Luis Cortes wrote:

> > azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03:
> > apic 1 int 22 (irq 255)
> > azalia0: invalid CORBSZCAP: 0x 0
> > azalia0: initialization failure, detaching
> 
> don't think I've ever seen that one before.

linux always uses 256 CORB/RIRB entries for all controllers, and intel
docs say intel controllers always use 256 entries, so it's likely the
following will work (assuming the controller isn't just foobarred in
some other way).

if this doesn't work, I'd like a dmesg from a kernel with
AZALIA_DEBUG defined.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: azalia.c
===
RCS file: /cvs/src/sys/dev/pci/azalia.c,v
retrieving revision 1.183
diff -u -p azalia.c
--- azalia.c8 Aug 2010 05:25:30 -   1.183
+++ azalia.c10 Aug 2010 17:34:47 -
@@ -775,8 +775,10 @@ azalia_get_ctrlr_caps(azalia_t *az)
az->corb_entries = 2;
az->corbsize |= HDA_CORBSIZE_CORBSIZE_2;
} else {
-   printf("%s: invalid CORBSZCAP: 0x%2x\n", XNAME(az), cap);
-   return(-1);
+   DPRINTF(("%s: invalid CORBSZCAP: 0x%02x, using 256 entries\n",
+   XNAME(az), cap));
+   az->corb_entries = 256;
+   az->corbsize |= HDA_CORBSIZE_CORBSIZE_256;
}
 
/* determine RIRB size */
@@ -793,8 +795,10 @@ azalia_get_ctrlr_caps(azalia_t *az)
az->rirb_entries = 2;
az->rirbsize |= HDA_RIRBSIZE_RIRBSIZE_2;
} else {
-   printf("%s: invalid RIRBSZCAP: 0x%2x\n", XNAME(az), cap);
-   return(-1);
+   DPRINTF(("%s: invalid RIRBSZCAP: 0x%02x, using 256 entries\n",
+   XNAME(az), cap));
+   az->rirb_entries = 256;
+   az->rirbsize |= HDA_RIRBSIZE_RIRBSIZE_256;
}
 
return(0);



Re: Thinkpad SL510 woes

2010-08-10 Thread Jacob Meuser
On Tue, Aug 10, 2010 at 07:05:55PM +0200, Tomas Vavrys wrote:
> You can officially call OpenBSD world first UNIX-like OS which fully
> support Thinkpad SL510. Everything works fine (suspend/resume, Fn
> keys), only external mute sound/microphone keys next to the keyboard
> don't work properly.

that particular codec supports unsolicited responses from the GPIO
pins, and I'm guessing that's how the key presses are conveyed to
the codec.  mail me off-list if you want to try some experiments
to figure out if that's how it's supposed to work.

> I'll buy pizza to the whole team one day. :-] Thank you!
> 
> OpenBSD 4.8 (GENERIC.MP) #357: Mon Aug  9 12:12:25 MDT 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
> cpu0: Intel(R) Core(TM)2 Duo CPU T6570 @ 2.10GHz ("GenuineIntel"
> 686-class) 2.10 GHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE
> real mem  = 2004135936 (1911MB)
> avail mem = 1961361408 (1870MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 06/24/10, BIOS32 rev. 0 @
> 0xfdbf0, SMBIOS rev. 2.5 @ 0xe0010 (44 entries)
> bios0: vendor LENOVO version "6JET81WW (1.39 )" date 06/24/2010
> bios0: LENOVO 28477TG
> acpi0 at bios0: rev 4
> acpi0: sleep states S0 S3 S4 S5
> acpi0: tables DSDT FACP HPET MCFG APIC BOOT SSDT SSDT SSDT
> acpi0: wakeup devices P0P2(S4) P0P1(S4) USB0(S3) USB1(S3) USB2(S3)
> USBR(S3) EHC1(S3) USB3(S3) USB4(S3) USB5(S3) EHC2(S3) HDEF(S4)
> PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4)
> RP04(S4) PXSX(S4) RP05(S4) RP06(S4) BLAN(S4) LID_(S3) SLPB(S3)
> acpitimer0 at acpi0: 3579545 Hz, 24 bits
> acpihpet0 at acpi0: 14318179 Hz
> acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
> cpu0 at mainbus0: apid 0 (boot processor)
> cpu0: apic clock running at 199MHz
> cpu1 at mainbus0: apid 1 (application processor)
> cpu1: Intel(R) Core(TM)2 Duo CPU T6570 @ 2.10GHz ("GenuineIntel"
> 686-class) 2.10 GHz
> cpu1: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,XSAVE
> ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
> acpiprt0 at acpi0: bus 0 (PCI0)
> acpiprt1 at acpi0: bus -1 (P0P2)
> acpiprt2 at acpi0: bus 9 (P0P1)
> acpiprt3 at acpi0: bus 2 (RP01)
> acpiprt4 at acpi0: bus 3 (RP02)
> acpiprt5 at acpi0: bus 4 (RP03)
> acpiprt6 at acpi0: bus 5 (RP04)
> acpiprt7 at acpi0: bus 6 (RP05)
> acpiprt8 at acpi0: bus 8 (RP06)
> acpiec0 at acpi0
> acpicpu0 at acpi0: C2, C1, PSS
> acpicpu1 at acpi0: C2, C1, PSS
> acpitz0 at acpi0: critical temperature 105 degC
> acpithinkpad0 at acpi0
> acpiac0 at acpi0: AC unit online
> acpibat0 at acpi0: BAT1 model "42T4708" serial 40475 type LION oem "LGC 11"
> acpibtn0 at acpi0: LID_
> acpibtn1 at acpi0: PWRB
> acpibtn2 at acpi0: SLPB
> bios0: ROM list: 0xc/0xfc00! 0xe/0x2000! 0xe2000/0x1800!
> cpu0: Enhanced SpeedStep 2095 MHz: speeds: 2101, 2100, 1600, 1200 MHz
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
> vga1 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> intagp0 at vga1
> agp0 at intagp0: aperture at 0xd000, size 0x1000
> inteldrm0 at vga1: apic 2 int 16 (irq 10)
> drm0 at inteldrm0
> "Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
> uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 2
> int 16 (irq 10)
> uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 2
> int 21 (irq 10)
> uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 2
> int 19 (irq 10)
> ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 2
> int 19 (irq 10)
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03:
> apic 2 int 22 (irq 10)
> azalia0: codecs: Realtek ALC269, Intel/0x2802, using Realtek ALC269
> audio0 at azalia0
> ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: apic 2
> int 17 (irq 11)
> pci1 at ppb0 bus 2
> "JMicron SD/MMC" rev 0x00 at pci1 dev 0 function 0 not configured
> sdhc0 at pci1 dev 0 function 2 "JMicron SD Host Controller" rev 0x00:
> apic 2 int 16 (irq 10)
> sdmmc0 at sdhc0
> "JMicron Memory Stick" rev 0x00 at pci1 dev 0 function 3 not configured
> "JMicron xD" rev 0x00 at pci1 dev 0 function 4 not configured
> ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: apic 2
> int 16 (irq 10)
> pci2 at ppb1 bus 3
> ppb2 at pci0 dev 28 function 2 "Intel 82801I PCIE" rev 0x03: apic 2
> int 18 (irq 10)
> pci3 at ppb2 bus 4
> ppb3 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: apic 2
> int 19 (irq 10)
> pci4 at ppb3 bus 5
> "

Re: AD1984A sound card on -current issue

2010-08-10 Thread Jacob Meuser
On Tue, Aug 10, 2010 at 04:03:24PM +0300, Oleksii Zhmyrov wrote:
> Hi, misc@
> 
> I'm trying to run -current (20100809) on HP 2133 MiniNote laptop.
> It seems to me strange that sound card AD1984A on VIA VT8237S
> HDA controller doesn't appear in dmesg at all.

your problem is that the controller, which is a PCI device, is not
found.  probably has nothing at all to do with the AD1984A codec.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: no sound Intel 82801I HD Audio in -current

2010-08-10 Thread Jacob Meuser
On Mon, Aug 09, 2010 at 09:28:34PM -0700, Luis Cortes wrote:
> Hello,
> 
> I've got -current running on a Toshiba Tecra M10-S3454 laptop.
> Everything seems to be working ok.  However, I've got no audio and I
> really would like to get this working.
> 
> I also noticed the patch that was provided earlier in this thread but
> I'm reluctant to try it since I get nothing from mixerctl and
> audioctl.

well, you shouldn't apply patches unless you know what they are for.
your problem is something completely different.

> Not sure what else to try.  Can someone point me in the right direction.

> azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03:
> apic 1 int 22 (irq 255)
> azalia0: invalid CORBSZCAP: 0x 0
> azalia0: initialization failure, detaching

don't think I've ever seen that one before.

build a kernel with AZALIA_DEBUG defined (you can uncomment the #define
in src/sys/dev/pci/azalia.h), boot it and send me the dmesg off-list.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: 4.8-beta no keyboard or mouse on Toshiba tecra-8000

2010-08-05 Thread Jacob Meuser
man pckbc, second paragraph of DESCRIPTION

On Thu, Aug 05, 2010 at 12:35:38PM +0200, Jasper Valentijn wrote:
> Hi list,
>
> When the machine is booted without an external ps2 keyboard connected
> the built-in keyboard and pointer won't work.
> Built-in keyboard works at bootloader and UKC, not after loading the
kernel.
>
> >From what I can see the behaviour started somewhere after 4.6, as the
> keyboard worked at that time.
>
> If the machine is booted with an external ps2 keyboard connected both
> built-in keyboard and pointer work, same for the external keyboard.
>
> 2 dmesgs below first without external keyboard, second with.
>
> Thanks,
>
> Jasper
>
> OpenBSD 4.8-beta (GENERIC) #68: Tue Aug  3 09:03:21 MDT 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 300 MHz
> cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PSE36,MMX,FXSR
> real mem  = 200830976 (191MB)
> avail mem = 187625472 (178MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @ 0xfc4c0
> apm0 at bios0: Power Management spec V1.2
> apm0: AC on, battery charge unknown
> pcibios0 at bios0: rev 2.1 @ 0xf/0x1
> pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf1320/128 (6 entries)
> pcibios0: PCI Interrupt Router at 000:05:0 ("Intel 82371FB ISA" rev 0x00)
> pcibios0: PCI bus #21 is the last bus
> bios0: ROM list: 0xc/0xc000
> cpu0 at mainbus0: (uniprocessor)
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel 82443BX" rev 0x02
> vga1 at pci0 dev 4 function 0 "Neomagic Magicgraph NM2200" rev 0x12
> wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> piixpcib0 at pci0 dev 5 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
> pciide0 at pci0 dev 5 function 1 "Intel 82371AB IDE" rev 0x01: DMA,
> channel 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: 
> wd0: 16-sector PIO, LBA, 9590MB, 19640880 sectors
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
> atapiscsi0 at pciide0 channel 1 drive 0
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0:  ATAPI 5/cdrom removable
> cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
> uhci0 at pci0 dev 5 function 2 "Intel 82371AB USB" rev 0x01: irq 11
> piixpm0 at pci0 dev 5 function 3 "Intel 82371AB Power" rev 0x02: SMI
> iic0 at piixpm0
> admtemp0 at iic0 addr 0x4e: adm1021
> spdmem0 at iic0 addr 0x50: 64MB SDRAM non-parity PC66CL2
> "Toshiba Fast Infrared Type O" rev 0x23 at pci0 dev 9 function 0 not
> configured
> cbb0 at pci0 dev 11 function 0 "Toshiba ToPIC97 CardBus" rev 0x05: irq 11
> cbb1 at pci0 dev 11 function 1 "Toshiba ToPIC97 CardBus" rev 0x05: irq 11
> isa0 at piixpcib0
> isadma0 at isa0
> com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> pckbc0 at isa0 port 0x60/5
> pms0 at pckbc0 (aux slot)
> pckbc0: using irq 12 for aux slot
> wsmouse0 at pms0 mux 0
> sb0 at isa0 port 0x220/24 irq 5 drq 1: dsp v3.01
> midi0 at sb0: 
> audio0 at sb0
> opl at sb0 not configured
> wss0 at isa0 port 0x530/8 irq 10 drq 0: CS4231 or AD1845 (vers 4)
> audio1 at wss0
> pcppi0 at isa0 port 0x61
> spkr0 at pcppi0
> npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> usb0 at uhci0: USB revision 1.0
> uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> cardslot0 at cbb0 slot 0 flags 0
> cardbus0 at cardslot0: bus 20 device 0 cacheline 0x0, lattimer 0x0
> pcmcia0 at cardslot0
> cardslot1 at cbb1 slot 1 flags 0
> cardbus1 at cardslot1: bus 21 device 0 cacheline 0x0, lattimer 0x0
> pcmcia1 at cardslot1
> biomask ebcf netmask ebcf ttymask fbdf
> mtrr: Pentium Pro MTRR support
> ep1 at pcmcia0 function 0 "3Com, Megahertz 574B, B" port 0xa000/32:
> address 00:50:04:8a:fb:da
> tqphy0 at ep1 phy 0: 78Q2120 10/100 PHY, rev. 10
> softraid0 at root
> root on wd0a swap on wd0b dump on wd0b
>
>
> OpenBSD 4.8-beta (GENERIC) #68: Tue Aug  3 09:03:21 MDT 2010
> dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel Pentium II ("GenuineIntel" 686-class, 512KB L2 cache) 300 MHz
> cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PSE36,MMX,FXSR
> real mem  = 200830976 (191MB)
> avail mem = 187625472 (178MB)
> mainbus0 at root
> bios0 at mainbus0: AT/286+ BIOS, date 12/31/99, BIOS32 rev. 0 @ 0xfc4c0
> apm0 at bios0: Power Management spec V1.2
> apm0: AC on, battery charge unknown
> pcibios0 at bios0: rev 2.1 @ 0xf/0x1
> pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf1320/128 (6 entries)
> pcibios0: PCI Interrupt Router at 000:05:0 ("Intel 82371FB ISA" rev 0x00)
> pcibios0: PCI bus #21 is the last bus
> bios0: ROM list: 0xc/0xc000
> cpu0 at mainbus0: (uniprocessor)
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel 82443BX" rev 0x02
> vga1 at pci0 dev 4 function 0 "Neomagi

Re: 24->16 bit audio

2010-08-02 Thread Jacob Meuser
On Mon, Aug 02, 2010 at 02:10:56PM +0200, Remco wrote:
> I was looking at the Alesis iO|2 USB audio interface. It seems like a nice 
> device, especially since it appears to comply to both the USB-audio as well 
> as the USB-MIDI standard, see:
> http://www.linuxquestions.org/
> questions/linux-hardware-18/2-soundcards-alesis-io|2-and-nvidia-ck804-512025/
> 
> However, it appears to limit audio to 24-bits @ 44.1/48kHz.
> 
> To my understanding, applications accessing this device through libsndio will 
> use its native resolution. For applications requiring 16-bit audio I could 
> run 
> an aucat server on top of this device.
> 
> According to BUGS in aucat(1), aucat uses 16-bit processing. Does that mean 
> that aucat will always record/playback only the 16 most significant bits for 
> resolutions > 16 bit (always limiting the dynamic range) ?
> 
> Apart from limiting the dynamic range, I was wondering if a pure 24-bit 
> device 
> could potentially be troublesome in any way. e.g. will running an aucat 
> server in 16-bit mode add any kind of additional distortion or noise, or can 
> i expect it to behave as a device doing 16-bits @ 44.1/48kHz ?
> Will applications work without issues ?

I believe mplayer should work at 24 bits with a 24-bit uaudio.
I don't recall if I tried that or not.

yes, not many applications support 24-bit audio, so you'll need
aucat for "general use".  works fine for me.  note: if you have
an azalia you might be able to make it use 24-bit in the hardware
to get an idea.

there may be some applications/libraries that could support 24-bit
but don't.  perhaps there are some ports that could support 24-bit
formats but don't.  gstreamer comes to mind.  24-bit support wasn't
really a priority when I did the sndio backends.  until a few weeks
ago 24-bit support assumed a 4-byte sample size ...

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Sound problems on Realtek ALC272

2010-07-21 Thread Jacob Meuser
On Wed, Jul 21, 2010 at 04:11:07PM +0400, Dmitrij D. Czarkoff wrote:
> Jacob Meuser  wrote:
> 
> > you're saying the volume made a difference in how often there were
> > underruns?  that is quite odd.  hmmm.
> 
> Well I'm saying that I had less underruns while being at 150/255 volume. It
> might be a coincidence.
> 
> > > At the moment of volume switching I also hear the drops (as far as I can 
> > > get,
> > > the drops of a higher of switching volumes either on gettting volume 
> > > lower or
> > > higher).
> >
> > that is strange too.  I have, somewhere, a program that twiddles every
> > control on the mixer as fast as possible, several thousand mixer set/get
> > cycles a second, and it hassn't caused dropouts on machines I've run
> > it on.
> 
> Well, that's what I'm quite sure about. The drops accure on every volume
> switch I performed.
> 
> > do you have clock issues?  are you running ntpd?
> 
> I'm running ntpd and it is quite active in switching time.
> 
> Well, after pkilling ntpd I got 13 drops (with 8 of them long enough to
> distinguish start and end speaker "cklicks") during 3 minutes with actually
> close output:
> 
> % ./audrops 
> pre=16 ch=2 bpf=4 block_size=4096 rate=48000 block_usec=21333
> early return at 1279713267.091162: 399 < 21333
> early return at 1279713267.091246: 84 < 21333
> late return at 1279713267.968778: 558599 > 21333
> late return at 1279713276.422734: 564385 > 21333
> late return at 1279713283.216141: 573650 > 21333
> early return at 1279713283.219052: 2911 < 21333
> late return at 1279713293.508187: 561489 > 21333
> late return at 1279713313.472366: 578602 > 21333
> late return at 1279713330.094540: 560445 > 21333
> early return at 1279713330.094700: 160 < 21333
> early return at 1279713330.094787: 87 < 21333
> early return at 1279713330.094890: 103 < 21333
> early return at 1279713330.095015: 125 < 21333
> early return at 1279713330.095142: 127 < 21333
> early return at 1279713330.095211: 69 < 21333
> early return at 1279713330.095286: 75 < 21333
> early return at 1279713330.095353: 67 < 21333
> early return at 1279713330.095422: 69 < 21333
> early return at 1279713330.095490: 68 < 21333
> early return at 1279713330.095558: 68 < 21333
> early return at 1279713330.095626: 68 < 21333
> early return at 1279713330.095694: 68 < 21333
> early return at 1279713330.095760: 66 < 21333
> early return at 1279713330.095828: 68 < 21333
> early return at 1279713330.095895: 67 < 21333
> early return at 1279713330.095963: 68 < 21333
> early return at 1279713330.096030: 67 < 21333
> early return at 1279713330.096097: 67 < 21333
> early return at 1279713330.096165: 68 < 21333
> early return at 1279713330.096233: 68 < 21333
> early return at 1279713330.096301: 68 < 21333
> early return at 1279713330.096368: 67 < 21333
> early return at 1279713330.096436: 68 < 21333
> early return at 1279713330.096503: 67 < 21333
> late return at 1279713353.314772: 569539 > 21333
> early return at 1279713353.321255: 6483 < 21333
> late return at 1279713355.167678: 566406 > 21333
> early return at 1279713355.177299: 9621 < 21333
> late return at 1279713372.491682: 567395 > 21333
> early return at 1279713372.500329: 8647 < 21333
> late return at 1279713400.362901: 555313 > 21333
> late return at 1279713412.040398: 563321 > 21333
> early return at 1279713412.040537: 139 < 21333
> early return at 1279713412.040624: 87 < 21333
> early return at 1279713412.040693: 69 < 21333
> early return at 1279713412.040763: 70 < 21333
> early return at 1279713412.040830: 67 < 21333
> early return at 1279713412.040904: 74 < 21333
> early return at 1279713412.041010: 106 < 21333
> early return at 1279713412.041079: 69 < 21333
> early return at 1279713412.041155: 76 < 21333
> early return at 1279713412.041221: 66 < 21333
> early return at 1279713412.041289: 68 < 21333
> early return at 1279713412.041357: 68 < 21333
> early return at 1279713412.041425: 68 < 21333
> early return at 1279713412.041491: 66 < 21333
> early return at 1279713412.041560: 69 < 21333
> early return at 1279713412.041628: 68 < 21333
> early return at 1279713412.041696: 68 < 21333
> early return at 1279713412.041764: 68 < 21333
> early return at 1279713412.041832: 68 < 21333
> early return at 1279713412.041899: 67 < 21333
> early return at 1279713412.041966: 67 < 21333
> early return at 1279713412.042034: 68 < 21333
> early return at 1279713412.042101: 67 < 21333
> early return

Re: Sound problems on Realtek ALC272

2010-07-21 Thread Jacob Meuser
On Wed, Jul 21, 2010 at 03:10:45PM +0400, Dmitrij D. Czarkoff wrote:
> Jacob Meuser  wrote:
> 
> > can you try running the following?  save it to a file, let's call
> > it audrops.c then build it with 'make LDFLAGS=-lm audrops'.
> >
> > let that run for a while, at least as long as it takes for you to
> > normally hear drops and echos.  start it with simply ./audrops.  it
> > should play a steady tone.  does it print much?  do you hear drops
> > and/or echos?
> 
> I let it run for three minutes. During this run I've heard 9 drops with 5 of
> them being either long or double (sounded as two clicks one right after
> another).
> 
> I actually ran it twice, but the first time I lowered volume with "mixerctl
> outputs.master=150" and that led to having less drops. I didn't actually
> mesured the effect, but I can if it would help.

you're saying the volume made a difference in how often there were
underruns?  that is quite odd.  hmmm.

> At the moment of volume switching I also hear the drops (as far as I can get,
> the drops of a higher of switching volumes either on gettting volume lower or
> higher).

that is strange too.  I have, somewhere, a program that twiddles every
control on the mixer as fast as possible, several thousand mixer set/get
cycles a second, and it hassn't caused dropouts on machines I've run
it on.

there is a possibility for contention there, but the window should be
very small.  mixer commands should complete within a few microseconds.

> The output of the max volume run (I actually have the volume at max by
> default, because I use built-in speakers that are actually weak):
> 
> % ./audrops
> pre=16 ch=2 bpf=4 block_size=4096 rate=48000 block_usec=21333
> early return at 1279710059.088985: 416 < 21333
> early return at 1279710059.089085: 100 < 21333
> late return at 1279710065.556951: 559520 > 21333
> late return at 1279710099.639360: 571912 > 21333

these measurements are in microseconds.  the above is two times where
a single write() of 4096 bytes, which should take approx 21 ms,
to complete, took over a half second.

> early return at 1279710099.643480: 4120 < 21333
> late return at 1279710109.588648: 426470 > 21333

> early return at 1279710109.588793: 145 < 21333
> early return at 1279710109.588900: 107 < 21333
> early return at 1279710109.589009: 109 < 21333
> early return at 1279710109.589134: 125 < 21333
> early return at 1279710109.589252: 118 < 21333
> early return at 1279710109.589372: 120 < 21333
> early return at 1279710109.589448: 76 < 21333
> early return at 1279710109.589513: 65 < 21333
> early return at 1279710109.589581: 68 < 21333
> early return at 1279710109.589650: 69 < 21333
> early return at 1279710109.589718: 68 < 21333
> early return at 1279710109.589785: 67 < 21333
> early return at 1279710109.589854: 69 < 21333
> early return at 1279710109.589922: 68 < 21333
> early return at 1279710109.589991: 69 < 21333
> early return at 1279710109.590059: 68 < 21333
> early return at 1279710109.590127: 68 < 21333
> early return at 1279710109.590195: 68 < 21333
> early return at 1279710109.590271: 76 < 21333

this is very strange.  that block of write()s should have taken 0.404327
seconds to complete, but it completed in 0.002625 seconds.

do you have clock issues?  are you running ntpd?

> late return at 1279710144.015969: 549096 > 21333
> early return at 1279710144.021564: 5595 < 21333
> late return at 1279710149.541125: 570146 > 21333
> early return at 1279710149.547019: 5894 < 21333
> late return at 1279710161.240031: 556813 > 21333
> early return at 1279710205.846800: 7957 < 21333
> late return at 1279710212.051492: 551253 > 21333
> early return at 1279710212.054930: 3438 < 21333
> early return at 1279710236.439423: 10074 < 21333
> ^Cpre=16 ch=2 bpf=4 block_size=4096 rate=48000 block_usec=21333
> bytes written = 34627584
> bytes processed = 34545664
> bytes errors = 73728

this is about the simplest possible audio application.  no reading
data from disk, not synthesizing the samples.  I don't see how
this could have underrun so much.  what else was running while you
ran this?

> bytes buffered = 8192
> 34627584 == 34627584 ?
> run time = 183.473831 s
> avg rate = 47071 

one final question, do you have any sort of power management features
enabled in the BIOS?

hmmm, if the codec is somehow under powered, I guess that could explain
the correlation between higher volume and more dropouts?  maybe?

iirc, you have an eapd mixer control.  have you tried switching that
to off?  I've heard rumors that these are sometimes inverted ...
eapd (external amp power down) is a tricky name.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Sound problems on Realtek ALC272

2010-07-21 Thread Jacob Meuser
On Wed, Jul 21, 2010 at 10:27:29AM +0400, Dmitrij D. Czarkoff wrote:
> Hello!
> 
> I've got a Realtec ALC272 codec on my netbook under OpenBSD 4.7 release:
> 
> % dmesg | grep azalia
> azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: apic 4
> int 16 (irq 11)
> azalia0: codecs: Realtek ALC272
> audio0 at azalia0
> 
> While it actually works, it has kind a performance problem - the frequent gaps
> and echos on playback. The longer playback lasts, the worse the situation
> goes.
> 
> Interestingly, pausing and continuing playing make the situation better for
> some time, but after that problem is back.
> 
> The situation is worse with music and is slightly better with video regardless
> of audio file codec and player software.
> 
> Any things I can do?

I've been told this by a few people now.  unfortunately, I don't have
any idea where the problem is.

can you try running the following?  save it to a file, let's call
it audrops.c then build it with 'make LDFLAGS=-lm audrops'.

let that run for a while, at least as long as it takes for you to
normally hear drops and echos.  start it with simply ./audrops.  it
should play a steady tone.  does it print much?  do you hear drops
and/or echos?

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

/*
 * Copyright (c) 2010 Jacob Meuser 
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define DEFAULT_DEVICE  "/dev/audio"

#define AUDIO_BPS(bits) ((bits) <= 8 ? 1 : (((bits) <= 16) ? 2 : 4))

volatile sig_atomic_t quit;
extern char *__progname;

void
usage(void)
{
fprintf(stderr,
"Usage: %s [-b blocksize] [-c channels] [-f device]\n"
"  [-p precision] [-r rate] [-w hiwat]\n",
__progname);
}

void
sigint(int s)
{
quit = 1;
}

void
setsig(void)
{
struct sigaction sa;

quit = 0;
sigfillset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
sa.sa_handler = sigint;
if (sigaction(SIGINT, &sa, NULL) < 0)
err(1, "sigaction(int) failed");
if (sigaction(SIGTERM, &sa, NULL) < 0)
err(1, "sigaction(term) failed");
if (sigaction(SIGHUP, &sa, NULL) < 0)
err(1, "sigaction(hup) failed");
}

int
set_params(int fd, u_int precision, u_int rate, u_int channels, u_int hiwat,
u_int *bpf, size_t *block_size)
{
audio_info_t info;

AUDIO_INITINFO(&info);

info.mode = AUMODE_PLAY;
info.play.precision = precision;
info.play.channels = channels;
info.play.sample_rate = rate;
info.play.encoding = AUDIO_ENCODING_SLINEAR;
info.play.block_size = *block_size;

info.hiwat = hiwat;
info.lowat = hiwat - 1;

if (ioctl(fd, AUDIO_SETINFO, &info) < 0) {
warn("AUDIO_SETINFO");
return 0;
}

if (ioctl(fd, AUDIO_GETINFO, &info) < 0) {
warn("AUDIO_GETINFO");
return 0;
}

if (info.play.precision != precision) {
warnx("unable to set play precision: tried %u, got %u",
precision, info.play.precision);
return 0;
}
if (info.play.channels != channels) {
warnx("unable to set play channels: tried %u, got %u",
channels, info.play.channels);
return 0;
}
if (info.play.sample_rate != rate) {
warnx("unable to set play sample_rate: tried %u, got %u",
rate, info.play.sample_rate);
return 0;
}

*bpf = AUDIO_BPS(info.play.precision) * info.play.channels;
*block_size = info.play.block_size;

return 1;
}

int
paint_samples(uint8_t *samples, u_int precision, u_int rate, u_int channels)
{
float d, m;
double playfreq = 440.0;
   

Re: uaudio0: audio descriptors make no sense, with logitech webcam

2010-07-19 Thread Jacob Meuser
On Mon, Jul 19, 2010 at 09:23:49AM +0200, Remco wrote:
> Jona Joachim wrote:
> 
> > Hi,
> > I have a Logitech C200 webcam which includes a uvideo and a uaudio
> > device for voice recording.
> > 
> > The video part works correctly and is usable, however uaudio is not so
> > happy, it complains in dmesg and no audio(4) device is attached:
> > uaudio0: audio descriptors make no sense, error=4
> > 
> 
> > 
> > Does anybody know what may be wrong here?
> > 
> 
> A USB device has descriptions of its capabilities stored in descriptor
> subsets.
> 
> What may be wrong is that one of the descriptor subsets has its size
> specified off by one (e.g., the size is one byte too small). In such case
> this specific descriptor subset will not parse. I've got a Logitech C500
> that seems to have this problem. (also for one of the audio descriptor
> subsets)
> 
> Ignoring the sizes of the descriptor subsets will make the descriptors parse
> properly. The only size check will be a boundary check based on the full
> descriptor set. (I haven't managed to implement this in the driver though
> and I'm not sure this is a good idea anyway because it removes a sanity
> check)
> 
> I found this out by fooling around with parsing descriptors from user space.
> (after disabling uaudio and having the device attach as ugen)
> 
> So likely you've got a device that doesn't adhere to the USB audio
> specifications.

it's not all that uncommon for fields at the end to be "missing".
usually, such fields should be treated as if their value is 0.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org




Re: uaudio0: audio descriptors make no sense, with logitech webcam

2010-07-19 Thread Jacob Meuser
On Mon, Jul 19, 2010 at 08:54:26AM +0200, Jona Joachim wrote:
> Hi,
> I have a Logitech C200 webcam which includes a uvideo and a uaudio
> device for voice recording.
> 
> The video part works correctly and is usable, however uaudio is not so
> happy, it complains in dmesg and no audio(4) device is attached:
> uaudio0: audio descriptors make no sense, error=4
> 
> Here's what I get from usbdevs:
> 
> port 2 addr 2: high speed, power 500 mA, config 1, Webcam C200(0x0802), 
> Logitech(0x046d), rev 0.09, iSerialNumber A0AC6750
> 
> And here's the full dmesg output related to this device:
> 
> uvideo0 at uhub0 port 2 configuration 1 interface 0 "Logitech Webcam C200" 
> rev 2.00/0.09 addr 2
> video0 at uvideo0
> uaudio0 at uhub0 port 2 configuration 1 interface 2 "Logitech Webcam C200" 
> rev 2.00/0.09 addr 2
> uaudio0: audio descriptors make no sense, error=4
> 
> solo% uname -a
> OpenBSD solo.my.domain 4.7 GENERIC#117 i386
> 
> 
> Does anybody know what may be wrong here?

probably a descriptor length is not what uaudio(4) expects.

apply the following and see if you get any better info (or just send it
to me off list).

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: uaudio.c
===
RCS file: /cvs/src/sys/dev/usb/uaudio.c,v
retrieving revision 1.76
diff -u -p uaudio.c
--- uaudio.c19 Jul 2010 05:50:37 -  1.76
+++ uaudio.c19 Jul 2010 07:06:57 -
@@ -64,12 +64,12 @@
 
 #include 
 
-/* #define UAUDIO_DEBUG */
+#define UAUDIO_DEBUG
 /* #define UAUDIO_MULTIPLE_ENDPOINTS */
 #ifdef UAUDIO_DEBUG
 #define DPRINTF(x) do { if (uaudiodebug) printf x; } while (0)
 #define DPRINTFN(n,x)  do { if (uaudiodebug>(n)) printf x; } while (0)
-intuaudiodebug = 0;
+intuaudiodebug = 10;
 #else
 #define DPRINTF(x)
 #define DPRINTFN(n,x)



Re: uaudio

2010-07-13 Thread Jacob Meuser
On Tue, Jul 13, 2010 at 05:55:21PM +0200, pet...@schwertfisch.de wrote:
> Jacob Meuser  wrote:
> 
> > E-Mu 0202 USB.  it was a gift from patrick keshishian (thanks!).
> >
> > it's also a USB 2.0 device, so there's also USB 2.0 support for uaudio
> > in that patchset.  the 0202 also uses a sync endpoint for playback, so
> > that's finally implemented (the first implementation for *BSD, btw).
> 
> Does this mean that any USB 2.0 audio device should be supported in
> future releases of OpenBSD, e.g., the devices from this list:
> http://www.tweakheadz.com/audio_interface_usb2_comparison_chart.htm

not necessarily, but it does mean there would be less work ... much less
work for the other E-Mu devices listed there ;)

it really depends whether or not the devices are USB Audio 1.x compliant.
for the most part, the E-Mu devices are.  there is a USB Audio 2.x
standard now, which mostly just builds on the USB Audio 1.0 standard
but does change a few things.  it's my understanding that very few
devices are using the USB Audio 2.x standard, but that's based on
hearsay.

to be clear, a device can be USB 2.x compliant and USB Audio 1.x
compliant at the same time.  there is a small issue with that though:
USB Audio 1.x didn't predict how USB 2.x would work, so there is a
bit of wiggle room as to what "USB packet" and "USB frame" mean in
that case.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: uaudio

2010-07-13 Thread Jacob Meuser
On Tue, Jul 13, 2010 at 11:38:11AM +0200, pet...@schwertfisch.de wrote:
> Jacob Meuser  wrote:
> 
> > On Tue, Jul 13, 2010 at 09:10:35AM +0200, Jan Stary wrote:
> > > On Feb 21 14:04:01, Alexandre Ratchov wrote:
> > > > On Sun, Feb 21, 2010 at 12:29:15AM +0100, Jan Stary wrote:
> > > > > 
> > > > > More generally, what is the status of uaudio(4)?
> > > > 
> > > > It works reliably, 24-bit encodings are not supported
> > > > though; recently Jacob fixed various bugs, including a very
> > > > annoying limitation of the block size.
> > > 
> > > To support the dynamic range of the bleeding artist inside,
> > > I will buy me a 24bit (uaudio) card once 24bits is supported.
> > > Can I ask politely about the current status?
> >
> > ready to commit as far as I'm concerned, but it breaks audio(4)
> > binary compat ...
> 
> This is good news (the first part of your statement).

well, the "binary compat" issue isn't really much of an issue, afaics.
rebuilding things that use sys/audioio.h is all that's needed; it just
adds a couple new members to structs audio_encoding and audio_prinfo.
actually, if you rebuild libossaudio and libsndio (whic would be done
for you already if you update via snapshots), there are only 2 ports
in -current that would need to be rebuilt: graphics/xanim and
lang/squeak.  of course if you're using static libs, it's a little
different, but iirc, as far as ports/packages go, that only affects
the vax platform; I don't recall any port specifically using static
linkage.  besides, we live in a source code world ... or something
like that.

or maybe I'm completely off base and people really are using OpenBSD
native binaries they don't have the source to that use the OpenBSD
native audio(4) API.  if so, I'd really like to know.

this doesn't affect Linux binary emulation in any way.

> Which devices did you use for testing?

E-Mu 0202 USB.  it was a gift from patrick keshishian (thanks!).

it's also a USB 2.0 device, so there's also USB 2.0 support for uaudio
in that patchset.  the 0202 also uses a sync endpoint for playback, so
that's finally implemented (the first implementation for *BSD, btw).

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: uaudio

2010-07-13 Thread Jacob Meuser
On Tue, Jul 13, 2010 at 09:10:35AM +0200, Jan Stary wrote:
> On Feb 21 14:04:01, Alexandre Ratchov wrote:
> > On Sun, Feb 21, 2010 at 12:29:15AM +0100, Jan Stary wrote:
> > > 
> > > More generally, what is the status of uaudio(4)?
> > 
> > It works reliably, 24-bit encodings are not supported
> > though; recently Jacob fixed various bugs, including a very
> > annoying limitation of the block size.
> 
> To support the dynamic range of the bleeding artist inside,
> I will buy me a 24bit (uaudio) card once 24bits is supported.
> Can I ask politely about the current status?

ready to commit as far as I'm concerned, but it breaks audio(4)
binary compat ...

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: uaudio - MAudio MobilePre USB

2010-07-13 Thread Jacob Meuser
On Tue, Jul 13, 2010 at 08:55:03AM +0200, Jan Stary wrote:
> On Feb 21 14:04:01, Alexandre Ratchov wrote:
> > On Sun, Feb 21, 2010 at 12:29:15AM +0100, Jan Stary wrote:
> > > can people recommend a good uaudio card?
> > 
> > It depends on what you want to use it for.
> > 
> > I use a m-audio mobilepre for recording and listening music;
> > it's class compliant does 16-bit stereo at 48kHz, and the
> > sound is excellent. It has a stereo preamp and a phantom
> > power, which is handy.
> 
> Thank you for the recommendation. I just bought me one,
> and I am very satisfied with the sound.
> 
> I disabled the onboard azalia, so that the mobilepre
> becomes audio0. Now the device reports as
> 
> uaudio0 at uhub1 port 2 configuration 1 interface 0 "M Audio MobilePre" rev 
> 1.10/1.03 addr 2
> uaudio0: audio rev 1.00, 9 mixer controls
> audio0 at uaudio0
> 
> Indeed, mixerctl says (using zero configuration,
> that is, no /etc/mixerctl.conf):
> 
>   inputs.line.mute=on
>   inputs.line=0,0
>   record.line.mute=off
>   record.line=205,205
>   inputs.dac.mute=off
>   inputs.dac=205,205
>   outputs.mix8-i7=0,0
>   outputs.spkr.mute=off
>   outputs.spkr=230,230
> 
> Can you please share your mixerctl output on the Mobile Pre?
> 
> I am pleasantly surprised that there are so few controls.
> Last time I saw this was on an old Compaq laptop that has
> just a mic in and line out, and has controls for just that,
> plus the record/master volume.

non-ac97 codec envy(4) have even fewer.

> My current HP laptop doesn't
> really have much more, but has 54 (azalia) controls.

they are useful.  probably not to everyone, and probably not to
most people most of the time, but they can be *quite* useful.

> BTW, why is it that the details of mixerctl controls
> are described in azalia(4), which is just one of possible
> audio interfaces? Surely non-azalia devices can be
> mixerctl'ed too, and the control names mean the same,
> right?

for the most part, yes, the description of the controls in azalia(4)
apply to most devices.

why were mixer controls never really documented?  dunno, that's
a good question.  I suppose it's not really easy, for one thing,
and for another, they should "just make sense".  but for them to
"just make sense", you have to know a bit about how the mixer
interface works.

for example, someone was wondering how to make their laptop play
louder at the recent hackathon.  I said "you need to increase
inputs.dac", to which was replied, "But that's an input."  and
yes, by the name, it sure sounds like an input, like a line input
or a mic input ... but *generally speaking*, mixer control classes
(the first part of a mixer control name, before the first '.'), are
relative to ... the mixer.

a picture is worth a thousand words (or so I've heard):

class   |  widgets
+
inputs  |line   mic  dac  beep
|   | |  ||
|   +---+ |  | +--+
|   | |  | |
|  +-+
|  |the mixer|
|  +-+
| | |  |
| master
outputs | | |  |
|  line hp spkr
|

that's basically what a simple "single mixer" mixer device (essentially
everything pre-azalia) looks like.  there may also be a mixer (usually
a much simpler mixer) specifically for recording, and most controls
associated with it will be in the "record" class.

in azalia, you could have multiple mixers, so it gets really hard to
distinguish "input" vs "output", because you could have an output
from one mixer lead to the input of another mixer.

> Also, why is the mixer named 'outputs.mix8-i7' (and not just 'outputs.mix8')?
> What is the i7 'property' (in azalia terms)?

that mean it's "unit 8" of type "mixer" with source terminal "7".

terrible name, but it should be unique, and that's the most important
aspect.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: Donation issues with OpenBSD?

2010-07-04 Thread Jacob Meuser
On Sun, Jul 04, 2010 at 01:25:11PM -0400, bofh wrote:
> One interesting thing I have noticed about some Americans is the need
> to expose their opinions, no matter how right or wrong, *or
> unnecessary*
> 
> They honestly believe their opinions are of value and everyone should
> listen to them, without any qualifications.
> 
> I blame the education system that places a priority on self esteem (at
> least one state has an actual law where the school *must* promote a
> student up to the next grade after a kid has been in a grade for 3
> years, even if the kid refuses to learn and constantly fails - reason
> - it could hurt their self esteem if you hold them back too much)

indeed (and yes, I'm born, raised and still American.  U.S. American even).

> On 7/4/10, Brent Shumacher  wrote:

> > What started off as fishing for philosophical discussion has turned
> > into either personal attacks or narcissistic explanations for rude
> > behavior. So there is something valuable in the piece that I linked
> > to, regardless of what anyone may label it.
> >
> > Lack of time to waste does not necessitate incivility. Asperger
> > Syndrome, maybe, but not lack of time.

and now who's throwing "personal attacks"?

see, I'm wasting my time thanks to you, Brent Schumacher.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: mplayer segfault

2010-06-25 Thread Jacob Meuser
On Fri, Jun 25, 2010 at 10:12:03PM +0200, Adam Borbely wrote:

> > > > Starting program: /usr/local/bin/mplayer -monitoraspect 16:10 -xy 2 
> > > > -fstype none -zoom -vo x11 tv:// -tv driver=bsdbt848:freq=224.25
> > > > Breakpoint 1 at 0xe40da4c: file /usr/src/lib/libsndio/sndio.c, line 292.
> > > > MPlayer SVN-r29414-snapshot-3.3.5 (C) 2000-2009 MPlayer Team
> > > > 
> > > > Playing tv://.
> > > > TV file format detected.
> > > > Selected driver: bsdbt848
> > > >  name: Brooktree848 Support
> > > >  author: Charles Henrich
> > > >  comment: in development
  ^^  but it's like 10 tears old and
more or less abandoned.

> upgraded to current solved the segfault problem but now i do not have
> any picture from the tv card only a big blue screen. there are no error
> messages in /var/log/messages or dmesg|tail so the driver reports everything
> is okay. what is the way to have any more detailed info/debug messages  from
> the kernel/driver to see what is going wrong?

maybe try fiddling with the 'input' option.  probably it's using the
composite input or something.  you probably want 'input=1' (see
description of METEORSINPUT in bkrt(4)).

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



  1   2   3   4   5   6   7   >