summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia_codec.c
AgeCommit message (Collapse)Author
2009-01-24fix a couple mistakes from rev 1.109Jacob Meuser
dmesg spam produced by the mistakes noticed by stsp@, thanks
2009-01-07Add Dell Latitude E6500 to mute quirk. This makes my shiny E6500 play someMarco Peereboom
nice mp3s. From brad, ok jakemsr
2009-01-05allow sense capable pins to mute the speaker by disabling the outputJacob Meuser
channel of the speaker.
2009-01-05expand the _dir controls for output pins to also be able to selectJacob Meuser
VRef level and be sure to turn VRef off when not set for input.
2009-01-05no longer needed codec specific codeJacob Meuser
tested by danh@, thanks!
2009-01-05use AUDIO_MIXER_SET instead of AUDIO_MIXER_ENUM to display mixersJacob Meuser
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.
2009-01-04some mixers don't use input amp muting to "select" their sources.Jacob Meuser
instead they use the connection list setting like selectors do. this is somewhat common in Analog Devices codecs. it's extremely rare in all other codecs.
2009-01-03- configure volume knob widgets for indirect mode, which means they noJacob Meuser
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
2009-01-02- get rid of the function that was mostly just a wrapper for the oldJacob Meuser
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
2009-01-02add macros for setting/getting GPIO polarity instead of usingJacob Meuser
magic numbers from Alexey Suslikov
2009-01-02* add GPIO quirk for Dell Vostro 1400 (from FreeBSD)Jacob Meuser
* move quirk for Dell E6400 into the group of quirks that set GPIO 0 from Alexey Suslikov, thanks
2009-01-02this is what I really wanted with r1.100 of azalia.c - fixed micsJacob Meuser
are not really useful as output devices and fixed speakers are not really useful as input devices
2009-01-02now that some devices will get output from/to two different sources/Jacob Meuser
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.
2009-01-02remove azalia_generic_mixer_create_virtual and all it's uses. nicerJacob Meuser
"master" volume controls coming shortly.
2008-12-31- avoid using an argument twice, once as a pointer. I just don'tJacob Meuser
like the way it looks. - run the speaker mute handler when a muter jack changes I/O direction
2008-12-31reimplement jack sense/speaker auto muting using unsolicited responses.Jacob Meuser
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.
2008-12-28get output from the first DAC to the line-out on the MacMini1,1Jacob Meuser
2008-12-26don't try to create mutesets for selectors, they are only forJacob Meuser
mixers. problem noticed by Tas. thanks!
2008-12-26add a function for initializing mixer_devinfo_t off/on enumsJacob Meuser
and use it in 6 places.
2008-12-26nuke unused macros. from Alexey Suslikov.Jacob Meuser
2008-12-26- recognize a few more realtek codecsJacob Meuser
- beep and CD support for a few more realtek codecs (ALC268 verified by Alexey Suslikov, the others are quite similar based on datasheets) - "ALC662-GR" is a part number. "ALC662" is a codec identifier.
2008-12-25add "virtual" mutes if the "virtual" volume amps have mute capabilityJacob Meuser
2008-12-24typo spotted by Alexey SuslikovJacob Meuser
2008-12-23azalia_generic_mixer_pin_sense has nothing to do with pin sense anymore.Jacob Meuser
it is about codec gpio quirks. so rename it as azalia_codec_gpio_quirks, and move it to where the rest of the codec specific code is.
2008-12-23add gpio quirk for Dell e6400Jacob Meuser
2008-12-23enable beep and CD mixer controls on alc88x codecs if appropriateJacob Meuser
2008-12-23add small quirks for certain codecsJacob Meuser
2008-12-23remove static mixer configurations wholesale, to make next commitJacob Meuser
more clear.
2008-12-23- recognize some more codecsJacob Meuser
- remove the codec datasheet URLs. URLs change and these particular datasheets are all easy to find.
2008-12-23a) a widget's nid is always it's index in the codec's widget list.Jacob Meuser
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.
2008-12-22create "_source" mixer items for single connections, but be carefulJacob Meuser
to not be redundant. important for understanding how widgets are connected.
2008-12-22disable unusable convertersJacob Meuser
2008-12-22new function azalia_pin_config_ov, used to override configurationJacob Meuser
values read from pin complex widgets.
2008-12-21label converter widgets for their place in the converter group.Jacob Meuser
e.g. the first DAC in the converter group is now dac, the second is dac2, etc. unused converters (not in a converter group) will have a "u-" prefix. these will disappear completely in the near future, as they are useless. if there is more than one converter group, converters in the second group will have a "dig-" prefix, since they are digital converters.
2008-12-21add mixer_class member to struct widget_t, and define the mixerJacob Meuser
classes in azalia.h instead of azalia_codec.c. this will allow the mixer class to be determined outside of azalia_generic_mixer_init.
2008-11-30oops. don't continue on to the next widget here. there may be otherJacob Meuser
controls on the widget that need to be configured.
2008-11-30only put a control in the record class if it is the sole input toJacob Meuser
an ADC.
2008-11-30don't rebuild the list of supported formats if it isn't goingJacob Meuser
to change.
2008-11-30- don't access nonexistent converter goupsJacob Meuser
- don't try to create formats for converter groups that don't exist - don't allow playback or recording if there is no corresponding converter group - don't try to set audio processing parameters on converter groups that don't exist allows playback (or record) only devices to work, such as the azalias found on ATI graphics devices. note, the ATI devices generally attach before the onboard devices do. that means they will be audio0 and onboard devices will be audio1. don't forget to make sure the /dev/{audio[ctl],mixer,sound} links point to the nodes of the device you want to be the default. tested by naddy@, thanks
2008-11-28don't create a _source control on mixers if none of the sources areJacob Meuser
usable. better (generalized) solution forthcoming, but this is a reasonable check anyway. problem noted and fix tested by Alexey Suslikov, thanks.
2008-11-28AZ_TARGET_PINSENSE -> MI_TARGET_PINSENSEJacob Meuser
reminder from Alexey Suslikov, thanks
2008-11-28- remove a couple unneeded checksJacob Meuser
- another place to use azalia_nid_to_index
2008-11-28- use switch() instead of multiple if elseJacob Meuser
- 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.
2008-11-28- DACs don't have connection lists like ADCs doJacob Meuser
- we're only interested in ADCs in the ADC converter group
2008-11-28add paranoia helper function, azalia_nid_to_index. the nid isJacob Meuser
assumed in places to be the index of the widget in the widget_t array of the codec_t, but I'm paranoid. use it to shrink/simplify/fortify some parts. will be used more soon.
2008-11-27widget initialization cleanup:Jacob Meuser
* 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!
2008-11-27finally, generic converter grouping that fits our needs and worksJacob Meuser
on all (at least all tested) devices. briefly, it works like so: group together all converters that can be reached from or can reach a connected input or output pin. ordering in the converter groups correlates to the association and sequence of the input/output pin. remove lots of static converter groupings in favor of the generic grouping method. the only static groups left are for codecs that still have static mixer configurations. tested by many. thanks to all who tested; this wouldn't have happened without your support.
2008-11-19Many ALC88x codecs have a fifth DAC at NID 0x25 for 7.1+2 multistreaming.Christian Weisgerber
Add this and other missing entries to the pre-defined DAC groups. Tested with ALC885; other models according to their data sheets. ok jakemsr@
2008-11-19the jack sense automatic muting code has many problems, includingJacob Meuser
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
2008-11-17- recognize some Conexant codecs.Jacob Meuser
- recognize several STAC (Sigmatel/IDT) codecs and create converter groups for the multi-channel capable codecs. - use the correct name for Sigmatel 7661/7662.