summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
AgeCommit message (Collapse)Author
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.
2009-09-09azalia.h:Jacob Meuser
* remove irrelevant comment * this driver uses at most 2 converter groups per group set, don't allocate more than needed * remove unused members from codec_t azalia.c: * macros for register values
2009-09-08cleanup/fix RIRB processing:Jacob Meuser
* move the code for azalia_comresp() to be nearer the functions it uses (azalia_set_command() and azalia_get_response()) for easier comprehension. * don't turn off RIRB interrupts in azalia_set_command(), then reenable them in azalia_get_response(). it's ugly, problematic, and the code is already at SPL_AUDIO. * in azalia_get_response(), wait for a solicited response (the response from azalia_set_command()) instead of "waiting" for just any response as there may already be an unsolicited response in the RIRB. * no need to run the unsolicited response handler in azalia_get_response(). since RIRB interrupts aren't being disables, the unsolicited response handler will be run by the RIRB interrupt handler. * in azalia_rirb_intr(), when a solicited response is found in the RIRB, instead of stopping and losing the response, print a debug message and keep going. there should never be a solicited response in the RIRB at this point. * remove some now useless #if 0'd debug cruft. * minor KNF while here.
2009-08-13add a shutdown hook to stop unsolicited responses and the CORB andJacob Meuser
RIRB DMA engines
2009-08-12fix unused widgets to contain the actual ids; ok jakemsr@Martynas Venckus
2009-06-26if a codec has multiple line out jacks, and the codec says allJacob Meuser
the line out jack have different colors, use the colors in the line out mixer item names.
2009-06-18Remove support for cancelled NVIDIA MCP7B and add initial support forJonathan Gray
MCP89. From Brad based on information from Peer Chen @ NVIDIA via Linux.
2009-06-09AD1981HD output amps are weird. they report 63 volume steps but theJacob Meuser
first 30 do nothing. perhaps there are other codecs with such amps? (ab)use some reserved bits in the amplifier capabilities parameter to store the first volume step that actually changes the volume. problem reported and patch tested by LEVAI Daniel.
2009-06-09quirks for MacBookPro3,1 inspired by FreeBSD's snd_hda. problemJacob Meuser
reported and patch tested by Bryan Chapman. according to FreeBSD, this might be needed for other MacBookPro models but no one else has told me their MacBookPro doesn't work.
2009-05-31zap _generic from the names of several functions. there are noJacob Meuser
more non-generic versions, and there never will be again.
2009-05-31- all codecs now use the same functions, always. call the functionsJacob Meuser
directly instead of through pointers in the codec_t. - fold azalia_generic_{g,s}et_port into azalia_{g,s}et_port since both are small and partly duplicated eachother.
2009-05-29register all GPIO and widget "quirks" in a bitmask instead of usingJacob Meuser
macros and codec->init_widget. now there is only only place to look to see what special handling a specific codec will get.
2009-05-29- if a codec is capable of multichannel playback, try to connectJacob Meuser
the output jacks to different DACs. - multichannel codecs often have a front headphone jack that is intended to be used separately from the multichannel jacks. if a front headphone jack exists, try to connect it to a DAC not used by the multichannel jacks.
2009-05-29- try to not choose only input mixers for outputs.master.slavesJacob Meuser
- another case where a selector can be considered part of another widget factors out a mixer control and lets the volume buttons work on ajacoutot@'s x300
2009-05-29- when a widget will be considered part of a different widget, recordJacob Meuser
the node id of the "parent" widget - initialize widgets' mixer_class ealier
2009-05-12- try to identify a "main input mixer"Jacob Meuser
- don't unmute input from a built-in mic on the main input mixer intended to stop possible feedback loops between buit-in speakers and built-in mics. built-in mics also tend to capture machine noise, especially fans. actual recording should not be affected.
2009-05-01initialize the mic ADC index before possibly setting it.Jacob Meuser
2009-05-01make mic ADC selection a little more like speaker DAC selectionJacob Meuser
2009-05-01try to get built-in speakers connected to a DAC no other output pinJacob Meuser
connects to be default. if that's not possible, try to make it so that the speaker and the first output pin do not connect to the same DAC by default. allows more configuration freedom.
2009-05-01fix a couple bugs when finding sole connectionsJacob Meuser
- if any pin can select both the target and other nids, it is not a sole connection - if there is more than a single selection but the other selections are disabled, that's a sole connection as well
2009-04-27it's easier to have the speaker dac in the converter group thanJacob Meuser
to special case the speaker dac ...
2009-04-25explicitely enable the "audio function" widget. it can be a validJacob Meuser
source or endpoint.
2009-04-25beep generators are input endpoints. but ther are not supposedJacob Meuser
to be listed in other widgets' connection lists. if a beep generator is found in another widget's connection list, treat it as a dead end.
2009-04-24make sure the internal/fixed mic is connected to an adc by defaultJacob Meuser
2009-04-24the internal/fixed speaker is special. the dac it connects toJacob Meuser
by default might not be in a converter group. make sure such a dac is not disabled and gets a meaningful name.
2009-04-24create lists of analog and digital input and output pins. storeJacob Meuser
the pin nids, the default converter the pin connects to and the pin's priority. priority is based on the pin's default direction and the association and sequence numbers from the vendor. according to the hda spec, lower association/priority means higher priority. sort the list in order of highest to lowest priority.
2009-04-24- a function to check if a node is connected to a particular adc byJacob Meuser
default - a function to find the first adc in the adc list that a node is connected to - use these functions to find which adc the internal mic is connected to by default
2009-04-24after all widgets have been initialized, loop through all widgetsJacob Meuser
and do some further initialization and information gathering: - disable mixer and selector widgets that don't have any enabled connections - create lists of analog and digital input and output converters - find the internal/fixed connection microphone and speaker, and which converters they are connected to by default - create a list of jack sensing capable pins some of this was already being done in other places, but moved here for simplification/better organization
2009-04-24"selected" connections don't mean much for mixer widgets. allJacob Meuser
connections to a mixer widget are enabled and unmuted by default. when finding a default connection through a mixer, check all connections, not just the "selected" connection.
2009-04-04- make sure codec->nsense_pins is initilized to 0Jacob Meuser
- don't mix use of const and non-const pointers problem noted by Jordi Beltran Creix on tech@
2009-02-05Remove the BUS_DMA_NOCACHE flag from all azalia dma mappings.Owain Ainsworth
The fact that this has only just been implemented, and that this hardware is only found on x86 shows that this flag should not be needed for operation of this hardware. It's been here since the initial netbsd commit the code came from. "sounds good to me" jakemsr@, ok kettenis@.
2009-01-16support 20 and 24-bit sample formats. remove the unneeded "validbits"Jacob Meuser
handling. ok ratchov; tested by naddy, thanks
2009-01-11allow one more level of connections (3 instead of 2) away from DACsJacob Meuser
for mixers and selectors when choosing the defaults for outputs.master.slaves.
2009-01-1132-bit mode for s/pdif transmitters/receivers does not reallyJacob Meuser
allow transmission/reception of 32-bit audio, so don't allow it. pointed out by naddy@, thanks.
2009-01-05- a little simplificationJacob Meuser
- don't set vref bits on mic pins unless the pin says it supports it - fall back on 50% vref if 80% vref isn't supported
2009-01-05explicitly check if azalia_codec_find_defdac didn't find a dac instead ofJacob Meuser
possibly matching a nonexistent hp or spkr dac.