summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
AgeCommit message (Collapse)Author
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@
2009-12-22treat the front headphone jack more like a built-in speaker. make it'sJacob Meuser
default DAC receive the first playback stereo channel pair if the DAC wouldn't otherwise be used and allow the jack's output volume to be controlled by outputs.master by default. this was already mostly implemented for codecs with 3 or more dacs, but front headphone jacks are also common on 2 dac codecs as well.
2009-12-15don't make mixer items for vendor widgets. we don't know what they do.Jacob Meuser
2009-12-15mono ouputs shouldn't be candidates for exclusive inclusion in theJacob Meuser
outputs.master.slaves group. lets outputs.master by default control more than just the internal speaker on some Dell desktops.
2009-11-24implement suspend and resumeJacob Meuser
2009-11-23Add azalia(4) suspend/resume stabs, now some laptops can go all the way.Paul Irofti
Okay deraadt@.
2009-11-11fix memory leak found by parfaitJacob Meuser
2009-10-27encode the channels a converter will convert into the converter'sJacob Meuser
mixer name.
2009-10-13Get rid of devact enum, substitute it with an int and coresponding defines.Paul Irofti
This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
2009-10-11* define a constant for the specification defined maximum number ofJacob Meuser
codecs a controller can support * dynamically allocate memory for the array of codec structures
2009-10-11* start all "initialization failure" messages with lowercase letter.Jacob Meuser
* instead of printing "initialization failure", print "initialization failure, detaching". perhaps instills more confidence that the failure was handled in an orderly manner.
2009-10-11this driver doesn't yet support HDMI codecs enough for them to beJacob Meuser
usable. detach the driver if the device is only capable of HDMI. this keeps an unusable device from being /dev/audio0 (thus /dev/audio by default), while /dev/audio1 is fully functional.
2009-10-08set a couple bits in the pci configuration space for nvidia hdaJacob Meuser
controllers. according to ALSA and OSS, these enable input and output stream DMA coherency. fixes broken playback problem reported by Laurence Tratt (laurie at tratt dot net), who graciously tested a number of previous attempts to solve this problem.
2009-09-14don't try to manipulate an invalid node. fixes codec detectionJacob Meuser
problem reported by martynas@. this bug has been there a long time (r1.61), but sloppy RIRB handling was hiding it ...
2009-09-12there are machines that have more than one fixed speaker. useJacob Meuser
the one with the lowest association.
2009-09-12move code for getting controller capabilities out of azalia_init()Jacob Meuser
and into it's own function, azalia_get_ctrlr_caps()
2009-09-10better to wait for codecs to finish resetting in azalia_reset()Jacob Meuser
rather than in it's user(s)
2009-09-09reorganize attach/initialization into more task specific functions.Jacob Meuser
2009-09-09move code to reset the controller from the attach function to it'sJacob Meuser
own function
2009-09-09add a few more members to stream_t and use it as a coherent sourceJacob Meuser
of information about a stream
2009-09-09handle mixer get/set requests for class type mixer items in the underlyingJacob Meuser
mixer get/set routines instead of in the MI audio routines.