summaryrefslogtreecommitdiff
path: root/sys/dev/hdaudio
AgeCommit message (Collapse)Author
2023-07-01regennia
2023-07-01Add Realtek ALC671 to hdaudiodevs, seen on Fujitsu Futro S720 thin clientnia
2023-01-05ignore NULL for hdaudio_audiodev in hdafg_freemkardel
also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510
2022-05-24fix various typos in comments, docs and log messages.andvar
2022-04-16regennia
2022-04-16hdaudiodevs: Add some ~new Intel devicesnia
2022-04-07fix various typos in comments.andvar
2022-03-28driver(9): devsw_detach never fails. Make it return void.riastradh
Prune a whole lotta dead branches as a result of this. (Some logic calling this is also wrong for other reasons; devsw_detach is final -- you should never have any reason to decide to roll it back. To be cleaned up in subsequent commits...) XXX kernel ABI change to devsw_detach signature requires bump
2022-03-21hdaudio: Obsolete HDAUDIO_ENABLE_DISPLAYPORT and HDAUDIO_ENABLE_HDMIjmcneill
Enable display port and HDMI devices by default rather than making this a compile time option.
2022-03-21hdaudio: pci: PCIe config space fixes and Intel PCH snoop supportjmcneill
The HD audio specification does not cover PCI config space, and this driver was unconditionally writing to a vendor specific register. Reduce scope of config space accesses based on PCI IDs. With this cleaned up, add support for Intel PCH devices which require some additional vendor specific configuration to bypass no snoop mode.
2022-01-07Safe vendor/product for reporting. Avoids repeated loading/unloadingmlelstv
of hdaudioverbose module.
2021-12-17One build break fixed, another appears...kre
Use the correct pointer, not the one used in the other piece of code that changed at the same time..
2021-12-17If the step is 0, use 1 instead of always incrementing step by one to avoidchristos
zerodivide (from RVP)
2021-08-07Merge thorpej-cfargs2.thorpej
2021-06-29Regen for new sys/dev/devlist2h.awkpgoyette
2021-06-29Rework the xxxVERBOSE option to share the common module-hook-basedpgoyette
verbose mechanism with MIIVERBOSE. This reduces some duplicated code and allows us to once again permit auto-unload of MIIVERBOSE. Change details: * Update dev/devlist2h.awk to accomodate miidevs, including generation of MII_STR_oui_model definitions and use of oui and model rather than vendor and product. This also changes the compressed data in the xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex digits long) * Update a couple of phy drivers to use new calls to get verbose data * Regen all of the xxxdevs{,_data}.h files (separate commit, coming very soon) * Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various DEV_VERBOSE_xxx macros * Update the pci, usb, and hdaudio code as needed, to #include the xxxdevs.h files (in order to get the proper printf format strings) * Since dev/dev_verbose.c now uses non-literal printf format strings, (to deal with the vendor/product vs oui/model issue), we need to make sure it gets compiled with -Wno-error=format-nonliteral, even in userland's libpci and librumpdev! * Bump kernel version for the change in module interfaces Welcome to 9.99.86! XXX It might be useful in the future to extend the MII_STR_oui_model XXX definitions to PCI as well (and perhaps USB and HDAUDIO). This XXX would allow for a single centralized location for the products' XXX descriptions, rather than being dispersed among individual XXX drivers' xxx_match tables.
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2020-12-28If the Subordinate Node Count returns 0 nodes, complain and return insteadjmcneill
of trying to kmem_zalloc 0 bytes later on.
2020-12-28Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudiojmcneill
"RIRB timeout" on boot).
2020-06-11Update for proplib(3) API changes.thorpej
2020-04-29hdaudiodevs: regennia
2020-04-29hdaudiodevs: Add Realtek ALC292nia
2020-04-28regenjmcneill
2020-04-28Add Realtek ALC293jmcneill
2020-04-19Make round_blocksize satisfy all ofisaki
- restrictions that existed before merging isaki-audio2 branch. - better support for 6 channels hardware. - audio layer's requirement. This may help PR kern/54474.
2020-02-15Enumerating probably always starts from sc->sc_startnode.isaki
2020-02-08Read GCAP and version regs after taking the controller out of reset. Fixesjmcneill
stream counts on my Radeon HD 7850.
2020-01-30Only dump ELD info if HDAFG_HDMI_DEBUG is definedjmcneill
2020-01-27regenjmcneill
2020-01-27Make sure that all vendor strings are shorter than 16 (MAX_AUDIO_DEV_LEN)jmcneill
characters as the values are used in the AUDIO_GETDEV ioctl.
2020-01-18Make sure we have at least one of playback or capture streams setup beforejmcneill
attaching the audio layer.
2019-07-26Even though the spec says SRST should read back as 1 after being set, thisjmcneill
does not appear to be the case with QEMU when using single byte accesses. Instead of printing an error and giving up, continue and try to leave stream reset state even if setting SRST times out.
2019-07-25Replace the HDAUDIO_32BIT_ACCESS option with a runtime option. Set it forjmcneill
tegra_hdaudio, but not for the pci attachment. Add hdaudio@pci to GENERIC64
2019-06-08Clean get_props().isaki
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly. This eliminates need for audio.c to take care of such (old) drivers which don't return both of PLAYBACK and CAPTURE. - All get_props() doesn't need to return AUDIO_PROP_MMAP. It is handled in the audio layer now.
2019-05-08Merge isaki-audio2 branch, the overhaul of audio subsystem.isaki
- Interrupt-oriented system rather than thread-oriented. - Improve stability, quality and performance. - Split playback and record cleanly. Improve halfduplex support. - Many bugs are fixed including deadlocks, resource leaks, abuses, etc. - Simplify audio filter mechanism. The encoding/channels/frequency conversions are completely handled in the upper layer. So the hard- ware driver only converts its hardware encoding (if necessary). - audio_hw_if changes: - Obsoletes query_encoding and add query_format instead. - Obsoletes set_params and add set_format instead. - Remove drain, setfd, mappage. - The call sequences are changed. - ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted. - ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced. - cleanup config attributes: au*conv and mulaw. - All hardware drivers should follow it (I've done as much as possible). Some file paths are changed: - dev/audio.c -> dev/audio/audio.c (rewritten) - dev/audiovar.h -> dev/audio/audiovar.h - dev/audio_dai.h -> dev/audio/audio_dai.h - dev/audio_if.h -> dev/audio/audio_if.h - dev/audiobell.c -> dev/audio/audiobell.c - dev/audiobellvar.h -> dev/audio/audiobellvar.h - dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
2019-01-07s/1 << 31/1u << 31/.mrg
XXX someone could __BIT() etc this file.
2018-09-27Fix hdaudio device configurationmanu
When disabling unassociated devices, we have a special handling for pins of type COP_AWCAP_TYPE_PIN_COMPLEX, but it came after code that may disable any pins, including the ones that should be handled as COP_AWCAP_TYPE_PIN_COMPLEX. The result was that hdaudio could fail to detect some devices. We fix the situation by making sure that COP_AWCAP_TYPE_PIN_COMPLEX pins always get their specific handling. The change makes the built-in speaker work on Dell OptiPlex 5060
2018-04-19s/static inline/static __inline/g for consistency.christos
2018-02-14Remove dead code.maya
From David Binderman in PR kern/53029
2018-01-04Fix off-by-one when calling snprintf(9) in hdafg_getdev()khorben
This is actually harmless, since: - the offset is too short rather than too long (no overflow) - the struct audio_device comes from userland (no information leak) "looks good to me" nat@
2017-11-24Always go through RIRB startup process, initialize RIRB interrupt countjmcneill
register, and ack RIRBs as we process them in polling mode. XXX pullup
2017-11-24Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).jmcneill
Reported by Michal Necasek.
2017-11-24Enter link reset even if GCTL says we are already in reset state. Fixesjmcneill
hdaudio codec detection under VirtualBox on a "cold" boot. XXX pullup
2017-10-28Add #includes to make this compile.riastradh
<sys/cdefs.h> for __packed <sys/types.h> for uint32_t
2017-09-26In rev 1.0a of the Intel High Definition Audio Spec:kre
https://www.intel.com/content/www/us/en/standards/ high-definition-audio-specification.html page 186 shows the layout of the baseline block of the ELD (EDID Like Data) struct - and allows a reserved (effectively padding) area at the end of the struct. This is required to keep the struct an even number of words long (size measured in units of 32 bits) while allowing for a variable length monitor name, followed by a variable number of 3 byte structs - the combination of which is not likely to be a multiple of 4. Code here assumed that there was no padding, and objected to the ELD format if any padding bytes existed (hdafg_dd_parse_info() would return EINVAL) causing a "failed to parse ELD data" message (if HDAFG_HDMI_DEBUG is defined) from hdafg_assoc_dump_dd() making it difficult (or at least confusing) to debug HDMI related audio issues (hdafg_assoc_dump_dd would not print most of the data it is expected to print) although this would most likely have no effect on actual operations. Change a test from a != to < (there must be enough data, not exactly the amount needed) for the EINVAL. As a consequence, the length after the SAD data is parsed (the 3 byte structs) is no longer required to be 0, so remove the KASSERT() (previously it was just useless, the code guaranteed a 0 value, now it is incorrect.) While here also change a related diagnostic message to be slightly more informative as to what is being shown. OK jmcneill@
2017-08-04put all the ELD debugging messages under #ifdef HDAFG_HDMI_DEBUG.mrg
this silences a frequent and largely useless series of messages in my dmesg. ok jmcneill.
2017-06-04Move the hdaudio_cd out of the hdaudio_pci module and into the mainpgoyette
hdaudio module. Rearrange the inter-module dependencies accordingly. Should resolve (my) PR kern/49836 XXX Pull-ups needed for netbsd-8 branch
2017-06-01remove checks for failure after memory allocation calls that cannot fail:chs
kmem_alloc() with KM_SLEEP kmem_zalloc() with KM_SLEEP percpu_alloc() pserialize_create() psref_class_create() all of these paths include an assertion that the allocation has not failed, so callers should not assert that again.
2017-04-18remove redundant assignmentsmaya
nchan is overwritten before it is used in all cases. so is i. from clang static analyzer ok riastradh
2016-10-26Update the devlist2h.awk script to track the maximum lengths of vendorpgoyette
and product strings, and report the max values at end of the run. Update the Makefiles.{pci,usb,hdaudio}devs to point users at the places which might need to be updated if the maximum lengths get larger. Since this commit makes no changes to the generated files, we don't need to regenerate them now.