summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2007-07-23Some style/knf nits.Michael Knudsen
Also, don't restrict to only opening dev minor 0.
2007-07-23Add glue for a control device for bthub(4). Will be used to configureMichael Knudsen
device inquiry/discovery parameters, pairings, and what else might be needed. From discussion with gwk. MAKEDEV goo follows later. ok and lots of input from miod.
2007-07-23STAC7661:Deanna Phillips
- enable internal mic and select it as the default recording source, - create mixerctl record.source for selecting between internal and external mics, - mute input by default.
2007-07-23Fix a typo in a comment: VAIO SE -> VAIO SZ.Deanna Phillips
2007-07-23STAC7661: rename "inputs.mic" to "record.volume". This is what theDeanna Phillips
audio layer wants, and is a more accurate description. Use the correct number of steps.
2007-07-23STAC7661:Deanna Phillips
- Add set_port and get_port functions and use them to create a stereo master volume out of the headphone and speaker dacs. Unbreaks setting the volume in ports like xmms. - Use the correct number of steps for the dac volumes.
2007-07-23We will never make a mixer item out of the pin control operation, soDeanna Phillips
move it out of azalia_generic_mixer_set into its own function, azalia_generic_mixer_pinctrl. From kent@netbsd. In azalia_stac9200_mixer_init, let the unsolicited event handler make the initial headphone vs speaker choice. Removes some duplicate code. These changes only affect STAC9200. Tested by krw@ on a Latitude D620.
2007-07-22clear the IFF_ALLMULTI flag when the interface goes down.David Gwynne
2007-07-22the softc variable is sc, not sp.David Gwynne
2007-07-21no need to say in two ways "a set of usb devices went away"; ok by a fewTheo de Raadt
2007-07-20Don't show debug output when an interrupt is not for us.Marc Balmer
From Marc Winiger <mw@msys.ch> ok dlg, claudio.
2007-07-18- when traversing mixer fields in the attach routine and connectingJacob Meuser
the mixer layer to the audio layer, differentiate between the 'monitor' class and the 'outputs' class instead of lumping them together. not all mixers have a monitor class entry which was causing the outputs class to be ignored. - look for monitor port in the monitor class, but if the monitor port is not found in the monitor class look in the outputs class as well. the code was effectively looking in both the monitor and outputs classes before, so this is no real change. sets up audio_info.play.[gain|balance] correctly on at least emu(4), auich(4), auvia(4) and snapper(4) ... probably most other AC'97 devices as well. as a result, audioctl(1) works much better and the overall volume can be set with /dev/audio instead of needing to go through /dev/mixer. from deanna@ thanks again to those who tested this change
2007-07-18unbreak build.Damien Bergamini
pointed out by mglocker@
2007-07-18move the processing of the pause attribute to the end of audiosetinfo(),Jacob Meuser
to allow buffer sizes and pointer to the buffer to be set to reasonable values for the sample size of the data to be read/written. fixes kernel corruption seen with azalia and probably other drivers that are using something other than 8kHz monaural mulaw as the default encoding when doing 'dd if=/dev/audio of=foo' as the first audio operation after boot. problem reported by deanna@
2007-07-18convert code under #if 0 to the new ieee80211_key structure.Damien Bergamini
2007-07-18replace the ieee80211_wepkey structure with a more generic ieee80211_keyDamien Bergamini
one that can be used with other ciphers than WEP.
2007-07-17Add missing '};' to end struct declaration. Compiles again.Kenneth R Westerback
2007-07-17more places where the difference between the hardware sample sizeJacob Meuser
and the userland sample size matters. there may be different sample size factors for play and record, so use the appropriate factor when userland sets the blocksize. the reported blocksize, hiwat and lowat are only for the play buffer. IMO, it would be good to report the record blocksize, hiwat and lowat as well, but that is another issue. tested with emu(4) and an auvia(4) modified to only do stereo in hardware.
2007-07-17ident/ansify/de-registerJasper Lievisse Adriaanse
2007-07-17- the data in the read buffer, that was put there by the hardware,Jacob Meuser
may not be the same sample size as what userland is to receive. account for the discrepency between the sample sizes when comparing how much to copy out with what userland expects. - only copy out the part of the buffer that is in the format userland expects. emu(4) can now record with all encodings it claims to be able to. that is, dd if=/dev/audio of=foo does as audio(4) says (monaural mu-law) and does it correctly. AFAIKS, the only other driver that sets a read factor is uaudio(4), and that depends on what the hardware supports. tested on i386, amd64 and sgi with 3 different emu(4) cards
2007-07-17when looping through an array and advancing your pointer to the arrayJacob Meuser
2x on each loop, only loop .5x times fixes hard hangs on i386 and "hiccups" on sgi when these functions are used through e.g. dd if=/dev/audio of=foo, since mulaw is the default encoding. the commit history wrt this code is interesting. I am responsible for introducing this braindamage to OpenBSD ... and note that linear16_to_linear8_[lb]e had it right ...
2007-07-16The logic determining the value of rl_eewidth for the 9346 and 9356Todd C. Miller
eeproms was backwards. This resulted in a bogus MAC address being read from the eeprom on certain cards. From FreeBSD. OK pvalchev@
2007-07-15Delay switching to the real serial console until we attach the serial device.Mark Kettenis
The variety of different serial devices is just too big to make a decision up front. This should make the second serial port on four-digit B/C/J-class workstation work as a serial console too. ok miod@
2007-07-14- ANSI function declarationsJacob Meuser
- remove argument names from function prototypes OK jasper@, ray@, "Didn't notice any errors" marc@
2007-07-11Use the full 64 bits available when reporting sizes; now bioctl showsOtto Moerbeek
the correct size for my 4.TB volume. Original diff from dlg@ with some tweaks by me; ok dlg@
2007-07-11endiannessDamien Bergamini
2007-07-10emu(4) incorrectly overrides the requested recoding format, settingJacob Meuser
it to 16-bit slinear_le. this appears to be the result of a mistake in porting the driver from NetBSD. when this driver was ported, NetBSD had some members in it's 'audio_params' structure that OpenBSD doesn't have. in particular, NetBSD had 'hw_encoding' and 'hw_precision', which store what the hardware is presenting. the 'encoding' and 'precision' members store what the audio layer is presenting (both in NetBSD and OpenBSD) and can be different than what the hardware is presenting. the original NetBSD code was setting 'hw_encoding' and 'hw_precision', and in porting was changed to 'encoding' and 'precision'. with this change the hardware is still presenting 16-bit slinear_le; having the variable 'b16' set to '1' is enough to ensure this. however now the audio layer will convert it to the requested format, instead of always outputting 16-bit slinear_le.
2007-07-10change firmware loading code to adopt the new 2.14.4 firmware layout.Damien Bergamini
while i'm here, fix allocation of the Rx ring descriptors so we don't waste memory. IMPORTANT: you must upgrade your wpi-firmware package to rev. 2.14.4 or the driver will stop working.
2007-07-10fix the bug rev 1.56 uncovered and rev 1.62 worked around.Jacob Meuser
data is expanded before it goes in the buffer. all sizes and offsets used internally are of this expanded data. there's no need to compensate for this fact except when showing information to the user in case their actions depend on how many bytes are in the buffer.
2007-07-09take into account possible expansion and be more careful not toJacob Meuser
try to go past the end of the buffer. this and the last commit allow ffplay and gnash to work properly on devices that may need to do mono to stereo conversion, like auich(4). problem reported by and much debugging deanna@
2007-07-09give the user what they expect instead of what we're working withJacob Meuser
by taking into account expansion we may have done in cases such as playing monoaural media on a device that only plays stereo, like auich(4).
2007-07-09don't always spew massive debug messages just because AUDIO_DEBUG isJacob Meuser
defined.
2007-07-08ansify/de-registerJasper Lievisse Adriaanse
ok krw@
2007-07-08Process scan command results. Enable 'ifconfig -M'.Marcus Glocker
2007-07-08As pointed out by Mickey, "-I/usr/includes" is not required forKenneth R Westerback
successful compilation of assembler or generating microcode.
2007-07-07Restore missing '(' to allow successful compilation. Bad pyr@.Kenneth R Westerback
2007-07-07Make the scan command work, finally.Marcus Glocker
2007-07-07Add support for Realtek ALC883. This is the "value" edition of theDeanna Phillips
ALC882, and differs only by lacking an ADC and a mixer, so have it use ALC882's get_port(), set_port() and a slightly modified version of its mixer init. This also works around a problem where the generic mixer init creates truncated mixer item names which can't be manipulated (noticed by steven@). Tested by steven@, ckuethe@ and jmc@.
2007-07-06typo in an error message.Damien Bergamini
reported a while back by Laurence Tratt, reminded more recently by brad@
2007-07-06- enable full-duplex mode by default if a device is openedJacob Meuser
read-write and it supports full-duplex operation. - update documentation to match this behaviour. see http://marc.info/?l=openbsd-tech&m=118310788926431&w=2 for more background on this change "patches look correct to me" marc@
2007-07-06the AUDIO_WSEEK ioctl should return the number of bytes in the playJacob Meuser
buffer, not the record buffer. inspired by recent similar change in NetBSD. "patches look correct to me" marc@
2007-07-06be sure to respect the pause attributeJacob Meuser
originally from Alexandre Ratchov "patches look correct to me" marco@
2007-07-06- there is no need for audio_init_ringbuffer() to always set the "pause"Jacob Meuser
attribute to '0'. this function may be called when executing an AUDIO_SETINFO ioctl where the pause attribute was set to '1', and setting it to '0' in this function will cause unexpected bahaviour. - according to audio(4), the AUDIO_FLUSH ioctl "restarts recording and playback". therefor, it should set the pause attributes to '0'. this was previously accomplished indirectly, because it calls audio_init_ringbuffer(), which was setting pause to '0'. - the pause attribute must be set to '0' in audio_open() so that recording and playback buffers can be "activated" when the device is opened. this was apparently forgotten when audiosetinfo() was split off of audio_open() and the logic in audiosetinfo() was changed to accomodate being run at times other than open(). also, this only really affects read() with poll(), which may explain why the problem was not noticed for some time. originally part of a patch Alexandre Ratchov sent to tech@ a while back fixes PR 3813 "patches look correct to me" marco@
2007-07-06The poll(2) syscall doesn't work correctly on audio(4) devices.Jacob Meuser
For instance, it may not set POLLIN when samples become available, or may set POLLOUT when write(2) will block. Fix this by making conditions used by poll (FILTREAD and FILTWRITE macros) match the blocking conditions in audio_read() and audio_write(). originally from Alexandre Ratchov, with a small tweak by me. "patches look correct to me" marco@
2007-07-05fixes my previous commit.Damien Bergamini
the ESS bit must be set in (re)assocation requests.
2007-07-05don't set IEEE80211_CAPINFO_ESS bit since we're not operating as an AP.Damien Bergamini
2007-07-05move the logic of determining whether an extended supported rates IE isDamien Bergamini
needed or not to the callers (instead of doing nothing in add_xrates).
2007-07-04bye byeHenning Brauer
2007-07-04remove fe(4). hasn't been enabled in 10 years, doesn't compile, no manpage.Henning Brauer
from brad, ok millert beck miod krw igor deraadt
2007-07-04Revert r1.42 of if_bnx.c, "Enable IPv4 transmit TCP/UDP checksumKenneth R Westerback
offload", and associated man page change. To use IPv4 transmit TCP/UDP checksum offloading you must again define BNX_CSUM. As requested by mbalmer@ via deraadt@ on suggestion of reyk@ in response to PR #5437.