summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Power up the external amplifiers additionally to powering up the DAC and ADC.netchild2005-09-111-0/+8
| | | | | | PR: 47029 Submitted by: Anish Mistry <mistry.7@osu.edu> Tested by: David Murphy <dm@dmz.ie>
* Add some ad_wait_init() calls to fix some problems in some configs (e.g.netchild2005-09-111-1/+5
| | | | | | | PC98, CS4231A, "pcm0: play interrupt timeout"). PR: 45682 Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
* Allow to record non 8bit-mono formats even in half-duplex configurations.netchild2005-09-111-1/+2
| | | | | PR: 45679 Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
* Do not destroy the queue mutex until the thread is done with it.phk2005-09-111-1/+1
|
* Fix misdetection of the sound chip on PC98 systems. The submitter doesn'tnetchild2005-09-111-0/+2
| | | | | | | | | | | | believe that there are PC98 systems with an OPTi chip. I don't know enough about this special PC architecture to be sure about this, so let's find out by letting people with such a system complain in case this commit breaks the sound system for them. It's easy to revert then. PR: 45673 Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
* Fix a bug in volume calculation, this sometimes gives a USB audio device annetchild2005-09-111-2/+2
| | | | | | unexpected value (when the volume is high). Submitted by: Kazuhito HONDA <kazuhito@ph.noda.tus.ac.jp>
* Change hw.pci.do_powerstate from a boolean to a range. 0 means theimp2005-09-111-15/+34
| | | | | | | | | | | | | | | | | | | | | same as today: do no power management. 1 means be conservative about what you power down (any device class that has caused problems gets added here). 2 means be agressive about what gets powered down (any device class that's fundamental to the system is here). 3 means power them all down, reguardless. The default is 1. The effect in the default system is to add mass storage devices to the list that we don't power down. From all the pciconf -l lists that I've seen for the aac and amr issue, the bad device has been a mass storage device class. This is an attempt at a compromise between the very small number of systems that have extreme issues with powerdown, and the very large number of systems that gain real benefits from powerdown (I get about 20% more battery life when I attach a minimal set of drivers on my Sony). Hopefully it will strike the proper balance. MFC After: 3 days (before next beta)
* Allow one to access the cached values for CMDREG, CACHELNSZ, MINGNT,imp2005-09-112-6/+33
| | | | | | MAXLAT and LATTIMER. Improve error message when a bogus RID type is requested for a bar.
* Don't pollute the entire kernel build with -I$S/dev/twa.obrien2005-09-115-12/+12
|
* - channel.hnetchild2005-09-104-231/+350
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New definition CHN_F_HAS_VCHAN. - channel.c * Use CHN_F_HAS_VCHAN to mark channel with vchan capability instead of relying on SLIST_EMPTY(&channel->children) == true for better clarification and future possible usages of children (like 'slave' channel). * Various fixes, including blocksize / format bps allignment, better 24bit seeking (mplayer, others). * Improve format chain building, it's now possible to record something to a format non-native to the soundcard through various feeder format converters or to higher sampling rate. This also gains another feature, like doing vchan mixing on non s16le soundcard such as sb8. - sound.c * Increase robustness within various function that handle vchan creation / termination (these function need a total rewrite, but that would cause other major rewrite within various places too!). As far as its robustness can be guaranteed, leave it as is. * Optimize channel ordering, prefer *real* hardware playback channels over virtual channels. cat /dev/sndstat should look better. * Increase sndstat verbosity to include bufsoft/bufhard allocation. - vchan.c * Fix LOR 119. - http://sources.zabbadoz.net/freebsd/lor.html#119 * Reorder / increase robustness of vchan_create() / destroy(). Enforce destroy_dev() during destroy operation, fix possible panic / dangling character device. - http://lists.freebsd.org/pipermail/freebsd-current/2005-May/050308.html * Tolerate a little bit more during mixing process, this should help non s16le soundcards. Note: Recoring in a non-native rate/format may result in overruns. A friendly application is wavrec from audio/wavplay. The problem is under investigation. Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
* Release lock for a while during chn_reset() / pcm_chnalloc() operationnetchild2005-09-101-2/+6
| | | | | | | | | | | while malloc()ing, this fixes LOR 129. See - http://lists.freebsd.org/pipermail/freebsd-current/2005-June/051157.html - http://lists.freebsd.org/pipermail/freebsd-current/2005-August/054620.html - http://sources.zabbadoz.net/freebsd/lor.html#129 Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
* - fake.cnetchild2005-09-104-37/+233
| | | | | | | | | | | | | | | * Add missing A_LAW / MU_LAW format. - feeder.c * Fix format chain building. Traverse backward instead of forward during format chainning. - feeder_fmt.c * Add missing alaw/mulaw converter. * Add 16 -> 24/32bit converter. * whitespace cleanup. - sound.h * alaw / mulaw are member of AFMT_8BIT. Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
* - Few buggy codecs (STAC9704, probably others) return inconsistentnetchild2005-09-102-24/+84
| | | | | | | | | ac97_rdcd() value. Enable aggresive workaround. - Fix mixer resolution detection for 5/6 bit register, carefully not to overflow others. PR: 84728 Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
* Fix panic caused by full duplex operation.netchild2005-09-101-2/+3
| | | | | | | | | | | | | From the PR: ---snip--- The vibra16X supports full duplex. I traced the Windows driver, and what is does is that it programs one DMA channel 8-bit, and the other 16-bit. There might be some kind of auto detection logic here, because it always uses 8-bit for playback, even if I play 16-bit sound ... ---snip--- PR: 80977 Submitted by: Hans Petter Selasky <hselasky@c2i.net>
* MFp4:imp2005-09-102-5/+6
| | | | | | | | | | | | | Reduce the size of ed a little by removing some CIS based entries (others likely can be removed too): o The D-Link DFE-670TXD doesn't need its own entry based on strings. o The Xircom CompactCard appears to be a TDK design, so list it there by ID and remove the strings. Increase the size of ed a little: o Add support for the Addtron AE-660CT and Addtron AE-660. This is a very generic NE-2000 clone (so generic that its CIS tags say NE-2000 generic card!).
* Minor improvement for the suspend case for Ricoh based (and others)imp2005-09-081-0/+1
| | | | CardBus bridges.
* The ed driver lock is already held in the mii frobbing routines. Removeimp2005-09-081-11/+0
| | | | locking from these routines.
* Add note about what ED_DEFAULT_MAC_OFFSET applies toimp2005-09-081-0/+4
|
* Fix a typo that broke LINT.scottl2005-09-081-1/+1
|
* Move hme_stop() after ether_ifdetach() and if_free() to prevent akensmith2005-09-081-2/+2
| | | | | | | | | | memory-referenced-after-free panic if the hme interface fails to attach. Patch obtained from: marius Suggested same thing: brooks MFC after: 3 days
* Import new version of the HPTMV driver from Highpoint. The major changescottl2005-09-0720-3313/+5271
| | | | | | | | here is the support for amd64, as well as possible support for PAE. Many thanks to Highpoint for continuing to support FreeBSD. Obtained from: Steve Chang @ Highpoint MFC After: 3 days.
* Sorting the belly button lint of history:imp2005-09-071-7/+15
| | | | | | | | o Note that the first 255 locations are reserved for JEDEC Ids from publication 106 (current revision Q, each one verified with JEDEC and the PMCICA). o Move ADAPTEC2 to the right section. o Sort TOSHIBA2 numerically.
* In set_mouse_pos(), try to avoid division by zero errors.rodrigc2005-09-071-1/+2
|
* Reorder code to not depend on an ISO-C illegal forward extern declaration.obrien2005-09-073-1796/+1793
|
* Consistancy is the hobgoblin of small minds:imp2005-09-072-39/+39
| | | | o DLINK -> DL100XX
* Minor reorg of pccard attach code to fix ax88x90 case broken after fixingimp2005-09-071-160/+158
| | | | | | | | | | | | | | | | | | | | dl100xx case. o We no longer acquire and release resources during attach many times. We now do it once at the beginning. o Move setting the resource offsets to just after acquiring the ports in attach. o Move ax88x90 code to the end of the file, just after the dl100xx specific code. o Rename ed_pccard_Linksys to ed_pccard_dl100xx to reflect the underlying chipset. o Pass the ed_product structure into ed_pccard_{dl100xx,ax88x90} and have those routines test the flags to see if this card should be probed in that way. o transition from ed_probe_Novell to ed_probe_Novell_generic since we already have the resources setup. o Move use of ed_probe_Novell_generic into ed_pccard_dl100xx to be more consistant with ax88x90 case. o simplify the code where we probe for the chipsets
* o Expose ed_probe_Novel_generic, it is useful for pccard case.imp2005-09-072-5/+3
| | | | | o Fix a now stale comment. There are likely many others like them, but this one definitely hasn't been true since DELAY was introduced into the tree.
* Fix DL100xx based cards. Don't drop resources. It was approrpiate inimp2005-09-071-2/+1
| | | | | | | the probe code that this used to be part of, but as part of the attach, we shouldn't be dropping the resources here. Also, allocate the proper rid in the ax88x90 setup.
* move away from K&R function definitionsimp2005-09-061-10/+3
|
* Work around a bug I've seen on Linksys EC2T cards. For some reason,imp2005-09-061-2/+25
| | | | | | | | | | | | | | | as yet unknown, those cards report their MAC address a byte at a time. However, other AX88x90 cards report the MAC address a word at a time. Add a heuristic which looks at the high order bytes of the first 6 words. If they are all '0', assume the card is behaving like the Linksys EC2T card. Since the default prefix for these cards appears to be 00:e0:98, this appears to be a safe heuristic. While some cards have been observed with different prefixes, they all work with this heuristic. I'm unsure if this is a bug in the EC2T card, or if it is a bug in the initialization of the card. No other OS has this heuristic (although w/o it, the MAC address that is used works).
* Go ahead and | in ED_CR_PAGE_0, even though this doesn't change thingsimp2005-09-061-5/+8
| | | | | | | at all. It makes the code clearer. fix a comment comments about why we need to write i/o address to certain registers.
* It turns out that many of the ambicom cards have their CIS resourcesimp2005-09-062-8/+27
| | | | | | | | listed in different orders. Since it is easy to identify the Modem resources vs the Ethernet resources by looking at the size, use that rather than hard coded rids. For such parts, go ahead and guess which rid we should use based on the size. This guess appears reliable for the two example cards that I have with different CIS info.
* In sc_set_text_mode(), reset fontwidth if it is <= 0.rodrigc2005-09-061-0/+2
| | | | | | | | Eliminates division by zero errors in syscons driver. Reported by: keramida, Slawa Olhovchenkov <slw at zxy dot spb dot ru>, Kyryll Mirnenko <mirya at matrix dot kiev dot ua> Tested by: keramida, rodrigc
* Fix problem with finding the still working disk in a broken mirror on VIA.sos2005-09-062-1/+4
|
* When bge_stop() is called from bge_detach(), mii is already NULL, so checkpjd2005-09-041-5/+10
| | | | | | | | before trying to use it. This fix allows to 'kldunload if_bge' without panicing. Reviewed by: bz MFC after: 3 days
* More consistantly return the correct BAR size. Before, we'd onlyimp2005-09-031-6/+8
| | | | | | return the correct bar size if we encountered a 64-bit BAR that had its resources already assigned. If the resources weren't yet assigned, we'd bogusly assume it was a 32-bit bar and return 1.
* MFp4: kill bogus commentimp2005-09-021-5/+0
|
* At some point in the past, we read the PROM by words. Now we readimp2005-09-011-6/+2
| | | | | | | | | | PROM by bytes. Adjust the extraction of the MAC address from this data to reflect this change. This gets the AX88x90 based PC Cards MAC address working again (my UMAX Ethernet and Linksys EC2T cards now work). MFC After: 3 days
* Typo in comment.jhb2005-09-011-1/+1
|
* Treat resources that are 0xfffff.... as being 'unassigned'.imp2005-09-011-1/+6
| | | | | | Reviewed by: jhb Tested by: Mark Kirkwood MFC After: 3 days
* - Add md_mtx lock to protect ID number and list of devices.pjd2005-08-311-25/+37
| | | | | | | | | | - Always check mdnew() return value, as even in !autounit case kthread_create() can fail. Those two changes fix serval panics provked by simple stress test. Tested by: Kris The BugMagnet MFC after: 3 days
* - Only call txp_release_resources() once if attach fails.jhb2005-08-311-38/+31
| | | | | | | - Set errno to ENXIO instead of 0 in several attach failure cases. - Setup the interrupt handler at the very end of txp_attach() after ether_ifattach(). - Various whitespace fixes in function prototypes.
* Update for a few recently discovered Olicom token ring cards:imp2005-08-311-1/+3
| | | | | OC3231 Token Ring + 28.8 modem OC3232 Token Ring + 33.6 modem
* FDOPT_NORETRY is an option, and must be compared with fd->options,rodrigc2005-08-301-1/+1
| | | | | | | | not fd->flags. PR: kern/85481 Submitted by: Lev Levinson <llevinson at inbox dot ru> MFC after: 1 day
* Prevent division by zero errors in sc_mouse_move()rodrigc2005-08-305-14/+17
| | | | | | | | | | by explicitly setting sc->font_width, in the same places where sc->font_size is set, instead of relying on the default initialized value of 0 for sc->font_width. PR: kern/84836 Reported by: Andrey V. Elsukov <bu7cher at yandex dot ru> MFC after: 2 days
* Add back dropped if_media.h includeimp2005-08-301-0/+1
|
* Correct previous commit.scottl2005-08-291-3/+0
|
* Better commentimp2005-08-291-1/+4
|
* In ata_mode2str() properly list -1 as UNSUPPORTED.sos2005-08-291-0/+1
|
* Fix another instance of old info re: miibusimp2005-08-291-1/+1
|
OpenPOWER on IntegriCloud