summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/azalia.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add another quirk for the ALC285 on the X1C7 to avoid a clickingjcs2019-10-141-2/+3
| | | | | | noise on the headphone output From Linux
* Rename AZ_QRK_WID_SPKR2_DAC and AZ_QRK_WID_DOLBY_ATMOS to make itjcs2019-10-141-3/+3
| | | | | | clear they are not widget quirks, and renumber AZ_QRK_WID_SPKR2_DAC to fall outside of AZ_QRK_WID_MASK since it's not handled by azalia_codec_widget_quirks
* azalia: add quirk for speaker routing on ThinkPad X1C7jcs2019-08-131-1/+2
| | | | | | | | The X1C7 has 4 speakers and the speaker2 set needs to be routed to a different DAC. Also add the Intel 300 Series HDA to the list of devices on which to enable snooping.
* Add a quirk for the Huawei Matebook X to activate the right-sidejcs2019-03-241-1/+4
| | | | | | | | | | | | | speaker on its Dolby Atmos system. Through some extensive tracing of the Realtek Windows driver, I found the many hundreds of CORB commands that the Windows driver sends to initialize Dolby Atmos and activate both speakers. The list of CORB commands was optimized by Tomas Espeleta to reduce file size and then implemented in azalia by Stefan Sperling. ok stsp, deraadt
* Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2016-09-141-3/+1
| | | | | methods from all audio drivers and from the audio_if structure as they are never called.
* Audio on the T400/T410/T510/T420/T520/X220/X220t docks needs a quirkjsg2015-08-241-1/+2
| | | | | | for the pin configuration as well. From Dmitry Alenichev. ok mlarkin@
* Enable audio on Thinkpad docks. Help from jsg@ for the *40 / *50 seriesmlarkin2015-08-201-1/+3
| | | | | | docks. ok jsg@
* if the speaker is muted because headphones are plugged in, don'tjakemsr2010-09-101-1/+2
| | | | unmute the speaker when the master volume control is unmuted
* restore unsolicited responses from volume knob widgetsjakemsr2010-08-071-2/+2
| | | | tested by deraadt
* don't probe "volume knobs" on resume. probably not needed andjakemsr2010-06-271-2/+2
| | | | | is currently breaking resume. ok pirofti
* deal with the possibility of two internal speaker pins, like onjakemsr2010-03-211-2/+3
| | | | | macbooks that have a "normal" pair of stereo speakers as well as subwoofer(s). problem reported and fix tested by Ted Roby.
* treat the front headphone jack more like a built-in speaker. make it'sjakemsr2009-12-221-1/+2
| | | | | | | | 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.
* implement suspend and resumejakemsr2009-11-241-1/+6
|
* * define a constant for the specification defined maximum number ofjakemsr2009-10-111-1/+2
| | | | | codecs a controller can support * dynamically allocate memory for the array of codec structures
* this driver doesn't yet support HDMI codecs enough for them to bejakemsr2009-10-111-1/+7
| | | | | | 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.
* move code to enable widget unsolicited event generation into it'sjakemsr2009-09-091-1/+3
| | | | own function
* azalia.h:jakemsr2009-09-091-8/+3
| | | | | | | | | * 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
* AD1981HD output amps are weird. they report 63 volume steps but thejakemsr2009-06-091-1/+3
| | | | | | | 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.
* quirks for MacBookPro3,1 inspired by FreeBSD's snd_hda. problemjakemsr2009-06-091-1/+2
| | | | | | 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.
* zap _generic from the names of several functions. there are nojakemsr2009-05-311-3/+3
| | | | more non-generic versions, and there never will be again.
* - all codecs now use the same functions, always. call the functionsjakemsr2009-05-311-7/+9
| | | | | | 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.
* register all GPIO and widget "quirks" in a bitmask instead of usingjakemsr2009-05-291-2/+19
| | | | | macros and codec->init_widget. now there is only only place to look to see what special handling a specific codec will get.
* - if a codec is capable of multichannel playback, try to connectjakemsr2009-05-291-1/+3
| | | | | | | | 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.
* - when a widget will be considered part of a different widget, recordjakemsr2009-05-291-1/+2
| | | | | the node id of the "parent" widget - initialize widgets' mixer_class ealier
* - try to identify a "main input mixer"jakemsr2009-05-121-1/+2
| | | | | | | - 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.
* allow jack sensing to mute the DAC the speaker is connected to byjakemsr2009-05-011-1/+6
| | | | | default, as long is the first output pin is not also connected to that DAC. cleanup a bit now that there are multiple muting methods.
* drop _generic from azalia_generic_codec_fnode(). there will notjakemsr2009-04-241-1/+2
| | | | | be a non-generic version. move the prototype to azalia.h so it can also be used in azalia.c in the future.
* create lists of analog and digital input and output pins. storejakemsr2009-04-241-1/+16
| | | | | | | | 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.
* after all widgets have been initialized, loop through all widgetsjakemsr2009-04-241-8/+13
| | | | | | | | | | | | | 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
* expand the _dir controls for output pins to also be able to selectjakemsr2009-01-051-1/+2
| | | | VRef level and be sure to turn VRef off when not set for input.
* remove now unused macrosjakemsr2009-01-051-7/+1
|
* use AUDIO_MIXER_SET instead of AUDIO_MIXER_ENUM to display mixersjakemsr2009-01-051-1/+2
| | | | | | that don't have selectable inputs. all connections are active, always. showing all connections in the set rather than just one makes a lot more sense.
* - configure volume knob widgets for indirect mode, which means they nojakemsr2009-01-031-1/+4
| | | | | | | longer direcly affect other widgets - if an unsolicited response is received from a volume knob widget, adjust outputs.master according to the measured change in level of the volume knob widget
* - get rid of the function that was mostly just a wrapper for the oldjakemsr2009-01-021-2/+2
| | | | | | | | | | function for creating "master" volume control. - apply gpio quirks separately from and prior to configuring the mixer. gpio manipulation can cause noise on output channels. configuring gpio before amps are unmuted in the mixer configuration is a good thing. from Alexey Suslikov, thanks
* add macros for setting/getting GPIO polarity instead of usingjakemsr2009-01-021-1/+3
| | | | | | magic numbers from Alexey Suslikov
* this is what I really wanted with r1.100 of azalia.c - fixed micsjakemsr2009-01-021-2/+3
| | | | | are not really useful as output devices and fixed speakers are not really useful as input devices
* now that some devices will get output from/to two different sources/jakemsr2009-01-021-1/+3
| | | | | | | | | | | | | outputs by default it's nice to have a way to control multiple sources/ outputs with a single control setting. so here's an implementation of "master" controls that uses selectable control lists, because the biggest problem is figuring out what should be "master". outputs.master.slaves is the current set of output mixer controls that settings for outputs.master and outputs.master will be applied to. record.volume.slaves works similarly for recording inputs.
* - store information about relevant volume controls along bothjakemsr2009-01-021-1/+16
| | | | | | recording and playback paths. - select a subset of controls that are relevant in a default configuration for each path.
* reimplement jack sense/speaker auto muting using unsolicited responses.jakemsr2008-12-311-1/+4
| | | | | | | | | | | | | jacks which can mute speaker output are chosen with the new mixer item 'outputs.spkr_muters'. e.g. $ mixerctl -v outputs.spkr_muters outputs.spkr_muters=hp,mic,line-in { hp mic line-in } if a jack is present in any listed "muter" plug, AND that plug is configured for output (e.g. outputs.hp_dir=output) the speaker will be muted. the list of muters is selectable, selecting none turns of muting altogether.
* builtin speakers and headphone jacks have an interesting relationship.jakemsr2008-12-311-1/+7
| | | | | keep track of some information about them, such as the DAC they are connected to by default. this will be used soon.
* a) a widget's nid is always it's index in the codec's widget list.jakemsr2008-12-231-1/+2
| | | | | | | | | | b) members of the widget connection list may be invalid. so, - change azalia_nid_to_index to azalia_widget_enabled, and have it only check that the given nid is valid, and that the corresponding widget is enabled. - use azalia_widget_enabled every time members of the connection list are used.
* - expand/add macros for pin configuration manipulationjakemsr2008-12-221-6/+14
| | | | - use "beep" as pin device 0xe
* add mixer_class member to struct widget_t, and define the mixerjakemsr2008-12-211-1/+6
| | | | | classes in azalia.h instead of azalia_codec.c. this will allow the mixer class to be determined outside of azalia_generic_mixer_init.
* - AZ_MAX_SENSE_PINS -> HDA_MAX_SENSE_PINSjakemsr2008-11-301-5/+5
| | | | | | - MI_TARGET_* are enumerated in hex from Alexey Suslikov
* AZ_TARGET_PINSENSE -> MI_TARGET_PINSENSEjakemsr2008-11-281-2/+2
| | | | reminder from Alexey Suslikov, thanks
* check the jack detect override bit before creating jack sense mixerjakemsr2008-11-281-1/+3
| | | | | | | items. BIOSes can set the jack detect override bit to tell us that the jack detection circuirty isn't actually attached. should remove the _sense controls that never change.
* - use switch() instead of multiple if elsejakemsr2008-11-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | - put selectors that feed ADCs into the record class like we do for mixers - use azalia_nid_to_index more - shrink mixer items list by condensing mutes for multiple input sources into a single _source control of type AUDIO_MIXER_SET. for example, record.mix6_mic_mute=off record.mix6_mic2_mute=off record.mix6_line_mute=off record.mix6_hp_mute=off record.mix6_spkr_mute=off record.mix6_mix_mute=off is now represented as record.mix6_source=mic,mic2,line,hp,spkr,mix to mute all sources but the mic just do record.mix6_source=mic reduces mixer items by about 25% on my machine. also shortens the longest names.
* widget initialization cleanup:jakemsr2008-11-271-10/+2
| | | | | | | | | | | | | | * configure widgets all in one place * add a flag on the widget_t to let us know if the widget is not connected; shaves a lot of connection checking code * be sure not to add power widgets as connectable sources/sinks * configure unconnected pins as output pins. should help some MacBooks and be benign to other devices. the last change has been tested by several as a separate diff. no real functional changes otherwise. from Alexey Suslikov. thanks!
* the jack sense automatic muting code has many problems, includingjakemsr2008-11-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | being the cause of PR5982. unfortunately, there's no easy and clean solution to automatic muting. we can't always rely on the codec giving us the right information. people have different preferences as to what should be muted and what shouldn't. etc, etc. so instead, just make the sense state of jacks that support sensing available through the mixer interface. this allows for any possible user configuration and supports all pins that have sense capabilities, not just headpones. codecs that use the generic mixer configuration (which is the plan for all codecs) and have sensing capable pins will now get a few more read-only mixer items, such as: outputs.hp_sense=plugged outputs.mic_sense=unplugged outputs.line_sense=unplugged hopefully what they mean is self-explanatory. based on much discussion with ratchov@ and Alexey Suslikov
* remove unused macros, partly from Alexey Suslikovjakemsr2008-11-051-2/+1
|