Commit Graph

26 Commits

Author SHA1 Message Date
dyoung
c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
tonnerre
9956b4e182 Signedness bug/crash in azalia and hdaudio. Fixes PR 42604.
By Pierre Pronchery.
2010-01-20 09:05:12 +00:00
dyoung
cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
njoly
743418620c Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.
2009-12-04 11:13:04 +00:00
sborrill
6c11da0940 Add ioctls required by hdaudioctl. This involves some refactoring of the
hdaudio_afg ioctl code.
2009-10-11 08:50:11 +00:00
sborrill
21e3c4b6e7 Add support for playback- or capture-only devices by adding
AUDIO_PROP_PLAYBACK and AUDIO_PROP_CAPTURE properties.

From jmcneill@.

Fixes PR#42050
2009-09-29 15:58:54 +00:00
jmcneill
cdd2b39863 ensure that hp sensing is stopped on suspend, and restarted on resume if required. 2009-09-27 02:36:38 +00:00
jmcneill
d62c10993d PR# kern/42110: No mute control on hdaudio(4)
PR# kern/42028: hdaudio: mplayer can't change volume

Since the driver is not limited to OSS mixer APIs, allow for duplicate
mixer nodes with the same role. Resolves a regression where certain
controls may no longer be available that were previously possible with
azalia(4). Part of a fix for 42028. While here, add .mute controls to
address 42110.
2009-09-26 17:05:01 +00:00
jmcneill
f41110c95f Implement and enable headphone sensing. Slightly different from the FreeBSD
implementation in that this code does not care if the headphones are seq=15.
Instead, for each association, find any HP pins with jack sense capabilities
and if at least one has the Presense Detect bit set, enable output on all
PWCs of type HP_OUT and disable output on all PWCs of type LINE_OUT, SPEAKER,
or AUX. Do the reverse if no HP pins have the Presense Detect bit set.
2009-09-26 11:51:29 +00:00
sborrill
4ecc81dbe8 If the codec does not specify any supported sample size or rates,
assume it supports 16-bit. This can be overridden completely by the widgets, so
some vendors don't specify a setting at the codec level. Fixes a panic in
this situation.
2009-09-25 19:49:31 +00:00
apb
bfe9cb2130 Change a few hda_error to hda_debug. Fixes "WARNING: 4 errors while
detecting hardware; check system log." when I boot.
OK jmcneill.
2009-09-17 18:48:47 +00:00
sborrill
68a2a617b2 Install hdaudio includes required by upcoming userland toolS 2009-09-16 20:58:07 +00:00
drochner
730cc75489 catch the case where a mixer's "step" value is 0 (read from the hardware),
while such a mixer is likely not very useful it should not cause
a division by 0
(should fix the crash reported by Tobias Nygren)
2009-09-09 11:47:24 +00:00
jmcneill
5a521ed705 Switch on input monitor support. 2009-09-09 01:39:51 +00:00
drochner
9edfc4c4ef fix scaling of mixer gain values: the register can be smaller than 7 bits,
this is told by some "step" parameter read from the hardware
(fixes problems with a 5-bit register observed by Nicolas Joly and me)
approved by Jared D. McNeill
2009-09-08 18:33:24 +00:00
jmcneill
79090dc96a PR# kern/42007: hdaudio panics on P5W DH Deluxe (amd64)
Make sure hdafg pulls in auconv mulaw support.
2009-09-08 09:50:56 +00:00
jmcneill
8d8064596d Properly initialize struct audio_format when applying the 0ch workaround. 2009-09-07 16:41:37 +00:00
jmcneill
a7b3489e33 Avoid setting up bus_dma w/ BUS_DMA_WAITOK while sc_stream_mtx is held. 2009-09-07 16:35:02 +00:00
jmcneill
5f93d9ca3f Add support for formats other than 16bit/48kHz. 2009-09-07 16:21:08 +00:00
jmcneill
93221b0506 Until MI audio can handle it better, rename outputs.select -> outputs.dacsel. 2009-09-07 11:59:53 +00:00
jmcneill
6bb9a5e19b Remove hdaudio.gpio.* mixer controls, they didn't work anyway. 2009-09-07 11:50:01 +00:00
jmcneill
d19e765937 Don't name the beeper inputs.speaker, or MI audio might get confused.
Name it inputs.beep instead so play.gain doesn't get mapped to it.
2009-09-07 11:49:27 +00:00
jmcneill
5ec034e0c9 Add missing colour White (Eh) to hdaudio_afg_color[] table. 2009-09-07 02:04:43 +00:00
rmind
aaea45533d Replace GCC attributes with __packed. 2009-09-06 21:38:17 +00:00
sborrill
7f280b4483 *blush*
Spell my own company name correctly.
2009-09-06 17:33:53 +00:00
sborrill
b88195cfa1 hdaudio(4) is a standards-compliant driver for Intel High Definition Audio.
It will replace azalia(4) after testing.

To use, comment out azalia in your kernel configuration and uncomment the
hdaudio and hdafg lines so it reads:

# Intel High Definition Audio
hdaudio*	at pci? dev ? function ?
hdafg*		at hdaudiobus?

You should also:
cd /dev
sh MAKEDEV audio
2009-09-06 17:25:55 +00:00