summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
AgeCommit message (Collapse)Author
2014-07-13Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianTheo de Raadt
ok tedu
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-10remove most of the boolean_t infection outside uvm/ddb/pmap; ok jsgTheo de Raadt
2014-05-17fix format mistakes visible if AZALIA_DEBUG is definedAlexandre Ratchov
2014-03-08better loop conditions. ok kettenis ratchov sasanoTed Unangst
2014-02-25Wait for the RIRB DMA engine to come ready. Needed on the audio deviceMark Kettenis
integrated in the Vortex86EX SoC. Based on a diff by sasano@. ok tedu@
2013-12-30Enable snooping on Lynx Point-LP HD Audio.Jonathan Gray
Fixes audio problems on an Acer Aspire E1 572G reported by Mark Rowland.
2013-12-06Add a DVACT_WAKEUP op to the *_activate() API. This is called after theTheo de Raadt
kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
2013-11-09enable snooping on Intel 8 Series HD AudioJonathan Gray
2013-05-30Enforce ca_activate tree-walks over the entire heirarchy for all events,Theo de Raadt
cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
2013-05-24Since audio code is mp safe, establish isa and pci audio interruptsAlexandre Ratchov
with the IPL_MPSAFE flag. In certain circumstances, this prevents interrupt handlers from waiting the global kernel_lock possibly (hold by slower code) to be released. ok kettenis
2013-05-15Introduce a global interrupt-aware mutex protecting dataAlexandre Ratchov
structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping). ok and help from kettenis, a lot of work from armani
2013-02-09Replace a bunch of if () else if () else if () else if () ... with thatMiod Vallat
modern brand new construct known as `switch'.
2012-10-19andre.s@list.ru has a laptop which does not bring the azalia out ofTheo de Raadt
D3 state, so the attach funciton must do this. ok kettenis
2012-08-12Make sure snooping is enabled on Intel 7 Series HD Audio.Mark Kettenis
Tested by naddy@.
2012-05-10Enable PCI snoop on the AMD Hudson 2. With help from Juan FranciscoAlexandre Ratchov
Cantero Hurtado <iam at juanfra.info>, thanks!
2011-09-19Make sure snooping is enabled on Intel HDA variants. Fixes audio on myMark Kettenis
x220. Suggested before by jakemsr. ok deraadt@, ratchov@
2011-07-03Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingMatthew Dempsky
that's ever used it, and it's long since been changed to use DVACT_{QUIESCE,SUSPEND,RESUME} instead. ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it up a few weeks ago
2011-06-02Enable MSI.Mark Kettenis
"i think more pci_intr_map_msi should go in"
2011-06-02Move the code that disables MSI out of azalia_configure_pci(), such that weMark Kettenis
don't run it upon resume. We now save and restore the MSI registers in the generic PCI code, so it is no longer necessary and will hurt us when we actually start using MSI. ok jakemsr@
2011-04-24in azalia_intr():Jacob Meuser
* deal with the possibility of the hardware being detached, as could happen with expresscard. from deraadt@ * only return 1 if an interrupt was actually serviced. fixes "constant interrupts when the device isn't being used" issue reported by oga@.
2011-04-10bring back changes in r 1.192:Jacob Meuser
detach happens after the hardware is gone, so don't try to touch the hardware in the detach path but azalia_pci_detach is called if the device coiuld not be initialized. in that case, shut the hardware down.
2011-04-08backout previous (which has some interrupt spin problem, sort of diagnosedTheo de Raadt
by claudio to be related to this commit) until jakemsr has time to fix it
2011-04-04detach happens after the hardware is gone, so don't try to touchJacob Meuser
the hardware in the detach path
2011-03-04gather most pci conf register manipulation into a new function,Jacob Meuser
azalia_configure_pci(). use that function in azalia_attach() and azalia_resume(). fixes post-resume "static" during playback for some machines with ATI chipsets.
2011-02-17if changing the default speaker connection, be sure it's both aJacob Meuser
valid connection and a valid converter. fixes speaker auto-mute for some IDT codecs. ok miod@
2011-02-17the number of widget connections isn't necessarily the same as theJacob Meuser
number of widget connection list entries. if the high bit is set in a connection list entry, all widgets between the previous and current entry are connected. go through the connection list entry once to figure out how many connections there are, then go through it again to build the connection list. ok miod@
2010-09-12silly me. use the switch() variable, not the case value.Jacob Meuser
2010-09-12use audio(4) DVACT_{QUIESCE,RESUME}Jacob Meuser
2010-08-31remove a comment suggesting that azalia needs a powerhookTheo de Raadt
2010-08-31Add DVACT_QUIECE support. This is called before splhigh() and beforeTheo de Raadt
DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
2010-08-31do not return EOPNOTSUPP for unknown activate actionsTheo de Raadt
2010-08-08convert printf()s that can happen in the resume path to DPRINTF()s.Jacob Meuser
silencing requested by deraadt
2010-08-08highly recommend that DVACT_{SUSPEND,RESUME} return 0 unless you want to ↵Theo de Raadt
trigger a broken code path
2010-08-07quiet "missed interrupt" messages. requested by deraadt.Jacob Meuser
2010-08-07restore unsolicited responses from volume knob widgetsJacob Meuser
tested by deraadt
2010-08-06reenabling unsolicited responses in the resume path was lost inJacob Meuser
rev 1.172. restore it so headphone/speaker switching can work after resume. ok deraadt
2010-08-06no need to save/restore the state of the master volumeJacob Meuser
ok deraadt
2010-08-06since r1.171 pin widgets get fully reinitialized on resume, whichJacob Meuser
means they lose their quirk fixups. check for widget quirks and apply as necessary. ok deraadt
2010-08-06attempt to deal with situations where the hardware has processed moreJacob Meuser
than one block of data since the interrupt handler was last run. when azalia detects these situations, it will print a line to the dmesg buffer like: stream 1: swpos XXXX hwpos XXXX, adding intr getting these messages in itself is not bad, but if audio breaks, I need to see these messages. this will be changed to a DPRINTF once I get more feedback. ok deraadt
2010-07-29flag if an error during attach caused us to detach our resources, andJacob Meuser
if so, don't do anything on suspend/resume. should fix crash reported by mlarkin.
2010-07-15add two new members to structs audio_encoding and audio_prinfo.Jacob Meuser
for both structs, the new members are 'bps' and 'msb', which describe the number of bytes per sample and data alignment in the sample, respectively. drivers must properly set these fields in the 'query_encoding', 'set_parameters' and 'get_default_params' hardware interface methods. discussed with ratchov, deraadt
2010-06-27don't probe "volume knobs" on resume. probably not needed andJacob Meuser
is currently breaking resume. ok pirofti
2010-04-20- an unsolicited response contains the codec address, not the codecJacob Meuser
index - we only care about unsolicited responses from the codec we're using - no need to enable unsolicited responses until we know which codec we're using fixes crash reported by jacekm@
2010-04-04Reinitialize pins upon resume. Makes audio work after resume on machinesMark Kettenis
with codecs like the ALC269 that have pins that need to be configured but don't have an associated mixer item. ok jakemsr@
2010-04-03You cannot save a pointer to your attach arguments and expect it to pointMark Kettenis
somewhere meaningful later on. Save the PCI device tag instead and use it instead. ok miod@, jakemsr@
2010-03-25disable MSI on Intel devicesJacob Meuser
2010-03-21deal with the possibility of two internal speaker pins, like onJacob Meuser
macbooks that have a "normal" pair of stereo speakers as well as subwoofer(s). problem reported and fix tested by Ted Roby.
2010-03-16eek! negative array offsets are bad. don't allow them.Jacob Meuser
ok kettenis@
2009-12-24do not run the unsolicited event queue from the interrupt handler.Jacob Meuser
instead, install a timeout(9) to run the queue. fixes a panic reported by wilfried@