Bug 262068

Summary: Handbook tells to load snd_hda to get sound working, which is not necessary in most cases
Product: Documentation Reporter: bsduck <bsduck>
Component: Books & ArticlesAssignee: Sergio Carlavilla Delgado <carlavilla>
Status: Closed FIXED    
Severity: Affects Many People CC: carlavilla, ceri, doc, emaste, pauamma, suonerietelefono.net
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Bug Depends on:    
Bug Blocks: 263315    

Description bsduck 2022-02-20 18:19:49 UTC
Hello,

https://docs.freebsd.org/en/books/handbook/multimedia/#sound-setup let people think they have to manually load snd_hda, or enable it in /boot/loader.conf, or build a custom kernel, in order to get sound working.

I don't know about other platforms, but at least on amd64 (the most common platform), this driver (the most commonly needed) is already part of the GENERIC kernel, which makes the example pointless and confusing.

This section needs a refresh, mentioning that loading a sound driver or building a custom kernel is only needed when using less common hardware. Taking another driver than snd_hda as an example would be a good move too.
Comment 1 Pau Amma 2022-02-20 23:47:39 UTC
(In reply to bsduck from comment #0)
https://cgit.freebsd.org/src/tree/sys/modules/sound/driver (or /usr/src/sys/modules/sound/driver) has a list, some of which may be candidates for a better example. Perhaps snd_hdspe?
Comment 2 Ed Maste freebsd_committer freebsd_triage 2022-03-18 17:24:46 UTC
I suspect a vanishingly small number of FreeBSD users are using anything but hda or uaudio, and there is no value in having an example of explicit loading in the handbook. Instead of changing this to a different example driver we should just make sure that PCI autodetection is functional for remaining drivers.

ISA drivers (where this would have been more important) are on their way out: https://reviews.freebsd.org/D34604
Comment 3 Pau Amma 2022-03-26 20:59:45 UTC
(In reply to Ed Maste from comment #2)
"make sure that PCI autodetection is functional for remaining drivers"

Would this be MFC'd to 12.4 and 13.2? Otherwise, with 13 not EOLing for about 4 years, I think a doc change consistent with POLA for 12 and 13 is still worth it.
Comment 4 bsduck 2022-06-12 18:08:23 UTC
Even the FreeBSD Foundation spreads confusing information... ouch.

https://freebsdfoundation.org/freebsd-project/resources/audio-on-freebsd/

"The device driver will need to be loaded to use the sound card, this can be easily done with kldload(8). To load the intel-specific driver, for example:
# kldload snd_hda"

... no, just no!
Comment 5 Jason Hawker 2022-07-13 09:59:13 UTC
MARKED AS SPAM
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2023-04-08 20:03:40 UTC
Triage: regain doc@ (as a cc recipient).
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-04-09 15:12:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/doc/commit/?id=fcbb060fe7fd8a200fe71639d348e11dd08434f3

commit fcbb060fe7fd8a200fe71639d348e11dd08434f3
Author:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
AuthorDate: 2023-04-09 14:49:53 +0000
Commit:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
CommitDate: 2023-04-09 14:49:53 +0000

    Upgrade multimedia chapter

    * Rework the chapter:

    * Upgrade sound section, tell the user that FreeBSD recognizes
      the sound card and there is no need to load any modules.
      Only in the very rare case that the sound card is not recognized.

    * Add table with sound mixers
    * Add info about how to automatically switching to headphones
    * Add table with audio players
    * Add table with video players
    * Add a new section about conferencing and meetings, inspired by [1]
    * Rework the image scanners section

    The webcam and scanner has been tested in a clean installation in
    FreeBSD 13.1 with the laptop "HP Notebook - 15-bw048ns" and
    the scanner "HP Deskjet 1050 J410"

    [1] https://vermaden.wordpress.com/2021/05/26/freebsd-desktop-part-26-configuration-conferencing-and-meetings/

    Reviewed by:            arrowd, fernape, emaste
    PR:                     262068, 266022
    Differential Revision:  https://reviews.freebsd.org/D38798

 .../en/books/handbook/multimedia/_index.adoc       | 1225 ++++++--------------
 .../books/handbook/multimedia/pwcview.png (new)    |  Bin 0 -> 406407 bytes
 2 files changed, 373 insertions(+), 852 deletions(-)
Comment 8 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2023-04-09 15:14:08 UTC
Fixed. Fixed, sorry for the inconvenience
Comment 9 bsduck 2023-04-15 00:02:29 UTC
Thank you very much for the rewrite.

By the way, you wrote "Where it is not known knowing which sound card the system has [...]" but I think there's unwanted redundancy in this sentence ;)

Have a nice weekend!
Comment 10 Ceri Davies freebsd_committer freebsd_triage 2023-04-15 06:52:49 UTC
This last is my fault, will fix.