By using sndbuf_getallocsize() instead of sndbuf_getsize() in dsp_mmap_single().
PR: 267555
Sponsored by: NVIDIA Networking
(cherry picked from commit ad370f7658)
Fix headphone (12th gen Intel laptops) and mic jack (both 11th and
12th gen) switching.
PR: 262579
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36354
(cherry picked from commit d88dc1b0b9)
This is based off the Linux file sound/hda/intel-dsp-config.c.
Reviewed by: imp (src)
Tested on: HP Spectre x360 16-f0023dx
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36476
(cherry picked from commit 22ecfc580b)
ISA sound cards (and ISA itself) are long obsolete. NYCBUG dmesgd has
no entries for any of these devices after 2005.
Mail to -current and -stable revealed some nostalgic interest, but
no offers to test or requests to pospone the deprecation.
Add deprecation notices to device attach routines and man pages for:
snd_ad1816 Analog Devices AD1816 SoundPort
snd_ess Ensoniq ESS
snd_gusc Gravis UltraSound (MAX and newer AFAIK)
snd_mss Microsoft Sound System
snd_sbc Creative Sound Blaster
Reviewed by: cy, mav
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34604
(cherry picked from commit e39ec8933b)
PCM_REGISTERED(d) tests that d is not NULL, so perform that check first
as we may have cases where devclass_get_softc has a null entry.
PR: 262671
Reviewed by: hselasky
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34648
(cherry picked from commit da03ac41c9)
This driver was not finished when it was committed in 1999 and was never
connected to the build.
A version of the driver used to be available in ports as
audio/aureal-kmod, but it has been removed. It did not build on FreeBSD
10.x or later and the binary objects it required were not available
after Google Code disappeared.
PR: 124343
Reported by: joel
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
(cherry picked from commit ef5dec7cc7)
- Avoid looping forever if a concurrent reset causes a read of the
interrupt status register to return all ones.
- Lock the softc before reading the interrupt status, so as to avoid a
similar infinite loop in hdac_one_intr().
This fixes suspend-to-S3 on some laptops.
PR: 261207
Reviewed by: mav, imp
Tested by: uqs
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 077564cfdb)
For Framework laptops built after Oct 2021 (like mine) that have a Tempo
Semiconductor 92HD95B codec rather than Realtek ALC295 (see
https://frame.work/ca/en/blog/solving-for-silicon-shortages).
As we do for many other laptops, put the headphone jack and speakers in
the same association by default so that the generic sound device
automatically switches between them. Also specify the jack colour and
location.
Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34596
(cherry picked from commit 06731139ca)
sys/dev/sound/pci/hda/hdaa_patches.c:
match_pin_patches: Use HDA_DEV_MATCH instead of regular ==
sys/dev/sound/pci/hda/pin_patch_realtek.h:
Add quirk for Lenovo laptops when ALC298 is used.
(cherry picked from commit c43bf3f591)
This codec is found in recent versions of the Framework laptop. Tempo
Semiconductor acquired these products from IDT's Audio Business Unit.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e997f33700)
This allows the iFeature strings to be properly read by the snd_uaudio(4) driver,
when parsing the audio feature unit descriptors.
Submitted by: Zhichao1.Li@dell.com
Sponsored by: NVIDIA Networking
(cherry picked from commit 11f09b17fe)
These two ioctls are not part of the current version of OSS and were
considered obsolete. However, their behaviour is not the same as their
old one, so this implementation is specific to FreeBSD.
Older OSS versions had the MUTE ioctls take and return an integer with
a value of 0 or 1, which meant that the _whole_ mixer is unmuted or
muted respectively. In my implementation, the ioctl takes and returns
a bitmask that tells us which devices are muted.
This allows us to mute and unmute only the devices we want, instead of the
whole mixer. The bitmask works the same way as in DEVMASK, RECMASK and
RECSRC.
Integrated the hardware volume feature with the new mute system.
Submitted by: Christos Margiolis <christos@freebsd.org>
Differential Revision: https://reviews.freebsd.org/D31130
MFC after: 1 week
Sponsored by: NVIDIA Networking
(cherry picked from commit 0f8dafb458)
Set default alternate setting when USB audio devices are not in use,
to activate power save features.
Differential Revision: https://reviews.freebsd.org/D28032
Suggested by: Shichun_Ma@Dell.com
Sponsored by: Mellanox Technologies // NVIDIA Networking
(cherry picked from commit 31070b5bc7)
Use strncmp() instead of bcmp(), so that we don't have to find the
minimum of the string lengths before comparing.
Reviewed by: kib
Reported by: KASAN
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29463
(cherry picked from commit 3428b6c050)