summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
AgeCommit message (Collapse)Author
2023-02-21Attach Apollo Lake HD Audio device, enabling audio on machines with it.Brian Callahan
ok jsg@ phessler@
2023-02-05match on Elkhart LakeJonathan Gray
ok patrick@ jan@
2022-11-05match on Intel 500 Series HD Audio (0x43c8)Jonathan Gray
on a Lenovo ThinkPad P1 Gen 4, the audio device is subclass audio not hd audio, so azalia does not match reported by John Browning ok kettenis@ thfr@
2022-10-26Make audio(9) get_props() optional, remove it from duplex driversKlemens Nanni
The property bits of audio(9) are obsolete and ought to be removed completely. sys/dev/audio.c:audio_open() currently uses get_props() to bail out if read *and* write was requested on a non-duplex driver. Drivers that currently support playing but not recording need adjustment before the API can be cleaned up. Drivers that advertise themselves as full duplex, i.e. those that always return AUDIO_PROP_FULLDUPLEX unconditionally in their get_props() currently always succeed this check. As this is the only property, losen audio_open()'s DIAGNOSTIC check and only do the duplex check if the driver provides get_props(). This allows for simple removal of get_props() from full-duplex drivers without adding any other code or without changing functionality. This includes all audio drivers under sys/dev/pci/ (maestro(4) being the only unfinished exception here). Other drivers as well as the API change can then follow in smaller diffs. This builds on amd64, arm64, i386, macppc and sparc64. amd64 with azalia(4) still plays, records as well as plays and records at the same time on my X230 as tested with $ aucat -i play.wav [-o rec.wav] alpha and hppa tests by miod OK ratchov miod
2022-10-24enable snooping on Intel 700 SeriesJonathan Gray
2022-10-19Use C99 struct init for struct audio_hw_ifKlemens Nanni
This audio(9) struct will lose a member, but drivers init their struct quite inconsistently, most pre-C99 style. Use C99 style everywhere, to get rid of all annoying differences and allow for easy member removals/additions: - don't change current order of members - no explicit NULL members - no comments or blank lines - trailing comma in last member line GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64. macppc and alpha build-tested by miod OK ratchov miod
2022-10-18Remove unused AUDIO_PROP_{MMAP,INDEPENDENT}Klemens Nanni
AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with commit 1cf2860827c8ca659d8097d8da94a5ae5b888c53 Author: ratchov <ratchov@openbsd.org> Date: Thu Jun 25 06:43:45 2015 +0000 Reimplement the audio driver in a simpler way, removing unused/unusable functionality. Same API and ABI except for the removed bits and no behaviour change for programs using libsndio. With help from armani@ and mpi@, thanks. but remained defined and set in drivers. and the following merely moved them when they were dead code already: commit 9215aa3dfad387bca877a805534df6dcfe8722eb Author: ratchov <ratchov@openbsd.org> Date: Wed Aug 31 07:22:43 2016 +0000 Delete unused ioctls and associated macros. Move macros that are still used internally by low-level drivers from sys/audioio.h to dev/audio_if.h instead of deleting them. None of this is used in base or ports; codesearch.debian.net only shows AUDIO_PROP_{CAPTURE,PLAYBACK} in firefox-esr, mozjs and cubeb. ratchov points out that audio_if.h and audioio.h are private interfaces and the codesearch shows SunOS and NetBSD bits (#ifdef'd out on OpenBSD). OK ratchov
2022-09-08match on Intel 600 Series LP HD Audio (0x51c8)Jonathan Gray
HP Spectre x360 16-f0013dx has subclass audio not hd audio so azalia does not match from Neel Chauhan
2022-08-24match on Intel 400 Series LP HD Audio (0x02c8)Jonathan Gray
on a Dell Latitude 3410 the audio device is subclass audio not hd audio so azalia does not match reported by Kirill Filatov
2022-06-21add Intel 600 Series LPJonathan Gray
2022-06-04match on Gemini Lake HD Audio (0x3198)Jonathan Gray
on a Star Labs StarLite Mk IV laptop the audio device is subclass audio not hd audio, so azalia does not match reported and tested by Chris Narkiewicz ok deraadt@
2022-04-01match on Intel 300 Series audio (0xa348)Jonathan Gray
on a Dell G3 3590 the audio device is subclass audio not hd audio so azalia does not match should fix azalia not attaching reported by Adriano Barbosa
2022-03-21Constify struct {audio,midi,radio,video}_hw_if. No functional change.Miod Vallat
ok mpi@ ratchov@ "More const is good" deraadt@
2022-03-11Constify struct cfattach.Martin Pieuchot
2022-02-16Make room for a cookie argument passed to audio_attach_mi(). CurrentlyAnton Lindqvist
unused but intended to be used to correlate audio and wskbd devices. ok ratchov@
2022-01-11match on Intel Jasper LakeJonathan Gray
cavs/hda is pci class multimedia subclass audio so not automatically matched by azalia but confirmed to work after matched tested by Sven Wolf on Acer Swift 1 SF114-34 with Pentium Silver N6000
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2021-10-30enable snooping on Intel 600 SeriesJonathan Gray
2021-10-26Improve unhibernate performance (30% on some machines, another upcoming diffTheo de Raadt
shows gains up to 50%) by skipping attach of irrelevant devices, which are tagged CD_SKIPHIBERNATE in the per-driver cfdriver. In particular, usb devices are not attached, so they don't need to detach during the suspend-unpack-resume. New bootblocks are required (which tell the kernel it's job is unhibernate before configure runs) tested by various
2021-08-09If an error during attach caused us to detach our resources,Kevin Lo
don't do anything on shutdown. This fixes a panic that was reported by me on X1 Extreme Gen 1. ok ratchov@
2021-06-11enable snooping on Z590 HDAJonathan Gray
from Ashton Fagg
2021-05-30match on Intel 500 Series LP HDAJonathan Gray
The ASUS ZenBook S UX393EA HDA device has a multimedia subclass of audio instead of the expected subclass of HD audio, so add 500 Series LP HDA to the list of devices. Fix suggested by and ok brynet@ Reported and tested by Peter N. M. Hansteen
2021-05-19match on Intel 500 Series PCH idsJonathan Gray
2021-04-20Allow INTEL 400SERIES cAVS to attach the azalia(4) driverAlexandre Ratchov
From Ivo Sbalzarini <ivo.sbalzarini at gmail.com>
2020-10-25enable snooping on more Intel devicesJonathan Gray
2020-10-25enable snooping on more AMD devicesJonathan Gray
2020-06-09match on Intel 200 Series HD Audio pci idJonathan Gray
Lenovo C930 has audio pci subclass instead of hda from bobby@plexuscomp.com
2020-05-31match on pci id for azalia device with wrong subclassJonathan Gray
The HP EliteBook 850 G6 has an Intel 300 Series HD Audio device with pci subclass of MULTIMEDIA_AUDIO instead of the expected MULTIMEDIA_HDAUDIO. Match on the pci id to handle this. Reported and tested by Bruno Flueckiger. ok kettenis@ deraadt@
2020-04-18Disable MSI for AMD Hudson2 HDA to fix random lock ups.Alexandre Ratchov
from Hemno Sapients <calomalus at airmail.cc>, thanks
2020-01-04remove AMD64 strings from pcidevsJonathan Gray
ok mortimer@ mpi@ deraadt@
2019-10-14Rename AZ_QRK_WID_SPKR2_DAC and AZ_QRK_WID_DOLBY_ATMOS to make itJoshua Stein
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
2019-09-10Prevents the block size from exceeding the requested one when a hugeAlexandre Ratchov
block size is requested. This avoids exceeding half the buffer size.
2019-09-05Use the new set_{blksz,nblks}() interface to set the block size.Alexandre Ratchov
This simplifies the code and allows any block size supported by the hardware to be used. ok mpi@
2019-08-13azalia: add quirk for speaker routing on ThinkPad X1C7Joshua Stein
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.
2019-05-09add free sizesBrent Cook
ok tedu
2019-05-05Harmonize AMD CPU/APU devices.Mark Kettenis
ok jsg@
2019-04-08Make azalia(4) initialize dolby atmos codecs in the resume path.Stefan Sperling
Keeps stereo sound intact across suspend/resume cycles on the matebook x. ok phessler@ deraadt@
2019-04-02disable MSI for AMD Summit Ridge/Raven Ridge HD Audio as workaround for ↵thfr
audio stopping after varying amounts of time. ok brynet@, deraadt@
2019-03-24Add a quirk for the Huawei Matebook X to activate the right-sideJoshua Stein
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
2018-04-22Use free(9) size argument in azalia_codec_select_dacs(). FromAlexandre Ratchov
Michael W. Bombardieri. Thanks.
2018-04-22Wrap debug-only variable definition in #ifdef AZALIA_DEBUG. FromAlexandre Ratchov
Michael W. Bombardieri. Thanks.
2018-04-11Add mixer save/restore capability to the audio(4) driver andAlexandre Ratchov
use it during suspend/resume. Remove driver-specific mixer save/restore bits that don't need to be duplicated in every low-lever driver. ok mpi
2018-04-02enable snooping on Intel Apollo Lake HD Audio, pt out & ok jsgHenning Brauer
2018-01-10Make azalia_free_dmamem() void, as its return value is not used. FromAlexandre Ratchov
Michael W. Bombardieri, thanks.
2017-12-23enable snooping on Intel 200 Series HDAJonathan Gray
2017-09-22Move the powering down of all codecs into azalia_halt_corb() after theTheo Buehler
check that the CORB is running. Fixes a regression introduced in -r1.236 that resulted in printing 'azalia0: CORB is not running' on each suspend resume cycle. Issue reported on icb by mlarkin; tested by Manuel Giraud, ratchov and myself. ok ratchov
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-08-10Power off all codecs on shutdown to eliminate static noise in speakersTheo Buehler
or headphones on reboot. From Manuel Giraud <manuel () ledu-giraud ! fr> Tweaks & ok ratchov
2017-04-11Partially revert previous mallocarray conversions that containDavid Hill
constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
2017-04-09Convert some malloc(9) to mallocarray(9)David Hill
ok deraadt@