No Audio on my system

I just setup freebsdFreeBSD on a macbook pro. I've got everything working mostly correct except now there is no audio at all. I installed firefox, chrome, vlc, xorg, nvidia drivers and a few other things. Here's a list of the installed programs.

sorry for all the text attachment but my mouse/ copy pasting isn't working very well in xterm at the moment.
 

Attachments

  • installed.txt
    25.1 KB · Views: 351
  • boot_loader.conf.txt
    131 bytes · Views: 392
  • dev_dsp.txt
    583 bytes · Views: 371
  • dev_sndstat.txt
    324 bytes · Views: 338
  • dmesg.txt
    0 bytes · Views: 304
Last edited by a moderator:
I needed more space to upload additional files. I also attached my pciconf -lv

Any help on getting sound hopefully while avoiding pulseaudio.
 

Attachments

  • etc_sysctl_conf.txt
    445 bytes · Views: 369
  • kldstat.txt
    879 bytes · Views: 321
  • rc_conf.txt
    270 bytes · Views: 331
  • pciconf.txt
    3.8 KB · Views: 397
As of FreeBSD 10, and above, snd_hda is statically compiled in the kernel. The snd_hda entry in your /boot/loader.conf unnecessarily loads it a second time. The handbook needs to be updated to reflect this fact.

I did a quick web search (FreeBSD MacBook Pro) and also searched this forum (MacBook Pro), there were both web and forum hits. I'd link them except the hardware depended on the model of MacBook Pro. If none of the search hits are helpful, it would help to post the model of your MacBook Pro .

Another aspect is that your sndstat shows 2 sound devices
Code:
 Installed devices:
pcm0: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play) default
pcm1: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm2: <NVIDIA (0x0042) (HDMI/DP 8ch)> (play)
pcm3: <Cirrus Logic (0x4208) (Analog 4.0/2.0)> (play/rec)
pcm4: <Cirrus Logic (0x4208) (Analog Headphones)> (play)
pcm5: <Cirrus Logic (0x4208) (Digital)> (play)

Unless you specify otherwise, the default device is pcm0. Most laptops would wire the speakers to the Cirrus Logic sound chip. The Handbook, section 7.2.3 tells how to change the default sound device.
 
I removed the snd_had from my /boot/loader.conf but there is still two sets of audio devices being shown. If I remember correctly from debian I rarely used the HDMI ones, unless the mac was connected to a t.v.

There's the hdmi ports that control the internal sound chip and then the headphones but I am not sure how they are connected.

here's two more updated documents.

The macbook details are, not working atm... seems like dmidecode is just returning empty strings but I know it's worked before on linux. I will update this thread once I get that information.
 

Attachments

  • kldstat_2.txt
    879 bytes · Views: 291
  • pciconf_2.txt
    3.8 KB · Views: 318
I removed the snd_had from my /boot/loader.conf but there is still two sets of audio devices being shown. If I remember correctly from debian I rarely used the HDMI ones, unless the mac was connected to a t.v.

If you plug the MacBook into a TV, the default sound setting may work.

If instead you want to use built in speakers try the steps below.

Using the handbook section I linked above I would run the following command as root
# sysctl hw.snd.default_unit=3

If sound then works, you can assign pcm3 as the default sound device with the following entry in
/etc/sysctl.conf
Code:
hw.snd.default_unit=3
 
Here is the output from dmidecode on the same machine

Code:
# dmidecode 2.12
# SMBIOS entry point at 0x7ad15000
SMBIOS 2.4 present.
45 structures occupying 2597 bytes.
Table at 0x7AD14000.

Handle 0x0000, DMI type 4, 35 bytes
Processor Information
   Socket Designation: U3E1
   Type: Central Processor
   Family: Core i7
   Manufacturer: Intel(R) Corporation
   ID: 61 06 04 00 FF FB EB BF
   Signature: Type 0, Family 6, Model 70, Stepping 1
   Flags:
     FPU (Floating-point unit on-chip)
     VME (Virtual mode extension)
     DE (Debugging extension)
     PSE (Page size extension)
     TSC (Time stamp counter)
     MSR (Model specific registers)
     PAE (Physical address extension)
     MCE (Machine check exception)
     CX8 (CMPXCHG8 instruction supported)
     APIC (On-chip APIC hardware supported)
     SEP (Fast system call)
     MTRR (Memory type range registers)
     PGE (Page global enable)
     MCA (Machine check architecture)
     CMOV (Conditional move instruction supported)
     PAT (Page attribute table)
     PSE-36 (36-bit page size extension)
     CLFSH (CLFLUSH instruction supported)
     DS (Debug store)
     ACPI (ACPI supported)
     MMX (MMX technology supported)
     FXSR (FXSAVE and FXSTOR instructions supported)
     SSE (Streaming SIMD extensions)
     SSE2 (Streaming SIMD extensions 2)
     SS (Self-snoop)
     HTT (Multi-threading)
     TM (Thermal monitor supported)
     PBE (Pending break enabled)
   Version: Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
   Voltage: 1.0 V
   External Clock: 25 MHz
   Max Speed: 2300 MHz
   Current Speed: 2300 MHz
   Status: Populated, Enabled
   Upgrade: <OUT OF SPEC>
   L1 Cache Handle: 0x0002
   L2 Cache Handle: 0x0003
   L3 Cache Handle: 0x0004
   Serial Number: To Be Filled By O.E.M.
   Asset Tag: To Be Filled By O.E.M.
   Part Number: Not Specified

Handle 0x0001, DMI type 7, 19 bytes
Cache Information
   Socket Designation: Not Specified
   Configuration: Enabled, Not Socketed, Level 1
   Operational Mode: Write Back
   Location: Internal
   Installed Size: 128 kB
   Maximum Size: 128 kB
   Supported SRAM Types:
     Asynchronous
   Installed SRAM Type: Asynchronous
   Speed: Unknown
   Error Correction Type: Single-bit ECC
   System Type: Data
   Associativity: 8-way Set-associative

Handle 0x0002, DMI type 7, 19 bytes
Cache Information
   Socket Designation: Not Specified
   Configuration: Enabled, Not Socketed, Level 1
   Operational Mode: Write Back
   Location: Internal
   Installed Size: 128 kB
   Maximum Size: 128 kB
   Supported SRAM Types:
     Asynchronous
   Installed SRAM Type: Asynchronous
   Speed: Unknown
   Error Correction Type: Single-bit ECC
   System Type: Instruction
   Associativity: 8-way Set-associative

Handle 0x0003, DMI type 7, 19 bytes
Cache Information
   Socket Designation: Not Specified
   Configuration: Enabled, Not Socketed, Level 2
   Operational Mode: Write Back
   Location: Internal
   Installed Size: 1024 kB
   Maximum Size: 1024 kB
   Supported SRAM Types:
     Asynchronous
   Installed SRAM Type: Asynchronous
   Speed: Unknown
   Error Correction Type: Single-bit ECC
   System Type: Unified
   Associativity: 8-way Set-associative

Handle 0x0004, DMI type 7, 19 bytes
Cache Information
   Socket Designation: Not Specified
   Configuration: Enabled, Not Socketed, Level 3
   Operational Mode: Write Back
   Location: Internal
   Installed Size: 6144 kB
   Maximum Size: 6144 kB
   Supported SRAM Types:
     Asynchronous
   Installed SRAM Type: Asynchronous
   Speed: Unknown
   Error Correction Type: Single-bit ECC
   System Type: Unified
   Associativity: 12-way Set-associative

Handle 0x0005, DMI type 7, 19 bytes
Cache Information
   Socket Designation: Not Specified
   Configuration: Enabled, Not Socketed, Level 4
   Operational Mode: Write Back
   Location: Internal
   Installed Size: 0 kB
   Maximum Size: 0 kB
   Supported SRAM Types:
     Asynchronous
   Installed SRAM Type: Asynchronous
   Speed: Unknown
   Error Correction Type: Single-bit ECC
   System Type: Unified
   Associativity: 16-way Set-associative

Handle 0x0006, DMI type 16, 15 bytes
Physical Memory Array
   Location: System Board Or Motherboard
   Use: System Memory
   Error Correction Type: None
   Maximum Capacity: 8 GB
   Error Information Handle: Not Provided
   Number Of Devices: 2

Handle 0x0007, DMI type 130, 186 bytes
OEM-specific Type
   Header and Data:
     82 BA 07 00 08 00 00 00 B0 00 92 12 0B 03 04 21
     02 09 03 52 01 08 0A 00 FE 00 69 78 69 30 69 11
     18 81 20 08 3C 3C 00 F0 83 01 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 0F 11 65 01 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80
     AD 01 00 00 00 00 00 00 41 EB 48 4D 54 34 31 47
     53 36 41 46 52 38 41 2D 50 42 20 20 4E 41 80 AD
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00

Handle 0x0008, DMI type 17, 27 bytes
Memory Device
   Array Handle: 0x0006
   Error Information Handle: No Error
   Total Width: Unknown
   Data Width: Unknown
   Size: 8192 MB
   Form Factor: SODIMM
   Set: None
   Locator: DIMM0
   Bank Locator: BANK 0
   Type: DDR3
   Type Detail: Synchronous
   Speed: 1600 MHz
   Manufacturer: 0x80AD
   Serial Number: 0x00000000
   Asset Tag: Unknown
   Part Number: 0x484D54343147533641465238412D50422020

Handle 0x0009, DMI type 130, 186 bytes
OEM-specific Type
   Header and Data:
     82 BA 09 00 0A 00 00 00 B0 00 92 12 0B 03 04 21
     02 09 03 52 01 08 0A 00 FE 00 69 78 69 30 69 11
     18 81 20 08 3C 3C 00 F0 83 01 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 0F 11 65 01 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80
     AD 01 00 00 00 00 00 00 41 EB 48 4D 54 34 31 47
     53 36 41 46 52 38 41 2D 50 42 20 20 4E 41 80 AD
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00

Handle 0x000A, DMI type 17, 27 bytes
Memory Device
   Array Handle: 0x0006
   Error Information Handle: No Error
   Total Width: Unknown
   Data Width: Unknown
   Size: 8192 MB
   Form Factor: SODIMM
   Set: None
   Locator: DIMM0
   Bank Locator: BANK 1
   Type: DDR3
   Type Detail: Synchronous
   Speed: 1600 MHz
   Manufacturer: 0x80AD
   Serial Number: 0x00000000
   Asset Tag: Unknown
   Part Number: 0x484D54343147533641465238412D50422020

Handle 0x000B, DMI type 19, 15 bytes
Memory Array Mapped Address
   Starting Address: 0x00000000000
   Ending Address: 0x003FFFFFFFF
   Range Size: 16 GB
   Physical Array Handle: 0x0006
   Partition Width: 0

Handle 0x000C, DMI type 0, 24 bytes
BIOS Information
   Vendor: Apple Inc.
   Version: MBP112.88Z.0138.B16.1509081314
   Release Date: 09/08/2015
   ROM Size: 8192 kB
   Characteristics:
     PCI is supported
     BIOS is upgradeable
     BIOS shadowing is allowed
     Boot from CD is supported
     Selectable boot is supported
     ACPI is supported
     IEEE 1394 boot is supported
     Smart battery is supported
     Function key-initiated network boot is supported
   BIOS Revision: 0.1

Handle 0x000D, DMI type 1, 27 bytes
System Information
   Manufacturer: Apple Inc.
   Product Name: MacBookPro11,3
   Version: 1.0
   Serial Number: C02MP4NFFD57
   UUID: FC4D5ABE-CB96-2D51-9481-3C0E403F20B9
   Wake-up Type: Power Switch
   SKU Number: System SKU#
   Family: Mac

Handle 0x000E, DMI type 2, 16 bytes
Base Board Information
   Manufacturer: Apple Inc.
   Product Name: Mac-2BD1B31983FE1663
   Version: MacBookPro11,3
   Serial Number: C0241930070FP5214
   Asset Tag: Base Board Asset Tag#
   Features:
     Board is a hosting board
     Board is replaceable
   Location In Chassis: Part Component
   Chassis Handle: 0x000F
   Type: Motherboard
   Contained Object Handles: 0

Handle 0x000F, DMI type 3, 21 bytes
Chassis Information
   Manufacturer: Apple Inc.
   Type: Notebook
   Lock: Not Present
   Version: Mac-2BD1B31983FE1663
   Serial Number: C02MP4NFFD57
   Asset Tag: Not Specified
   Boot-up State: Safe
   Power Supply State: Safe
   Thermal State: Other
   Security Status: Other
   OEM Information: 0x00000000
   Height: Unspecified
   Number Of Power Cords: Unspecified
   Contained Elements: 0

Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: None
   External Reference Designator: USB0
   External Connector Type: Access Bus (USB)
   Port Type: USB

Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: None
   External Reference Designator: USB1
   External Connector Type: Access Bus (USB)
   Port Type: USB

Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: Other
   External Reference Designator: Mini DisplayPort
   External Connector Type: None
   Port Type: Other

Handle 0x0013, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: Other
   External Reference Designator: Mini DisplayPort
   External Connector Type: None
   Port Type: Other

Handle 0x0014, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: Other
   External Reference Designator: HDMI
   External Connector Type: None
   Port Type: Other

Handle 0x0015, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: Other
   External Reference Designator: Microphone
   External Connector Type: None
   Port Type: Other

Handle 0x0016, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: Other
   External Reference Designator: Speaker
   External Connector Type: None
   Port Type: Other

Handle 0x0017, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: None
   External Reference Designator: MagSafe DC Power
   External Connector Type: Other
   Port Type: Other

Handle 0x0018, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: None
   External Reference Designator: Audio Line Out
   External Connector Type: Mini Jack (headphones)
   Port Type: Audio Port

Handle 0x0019, DMI type 8, 9 bytes
Port Connector Information
   Internal Reference Designator: None
   Internal Connector Type: None
   External Reference Designator: SD Card Reader
   External Connector Type: Access Bus (USB)
   Port Type: USB

Handle 0x001A, DMI type 9, 13 bytes
System Slot Information
   Designation: AirPort
   Type: x1 PCI Express
   Current Usage: Available
   Length: Short
   ID: 0
   Characteristics:
     3.3 V is provided
     Hot-plug devices are supported
     SMBus signal is supported

Handle 0x001B, DMI type 9, 13 bytes
System Slot Information
   Designation: Thunderbolt Slot 1
   Type: 32-bit PCI
   Current Usage: Available
   Length: Long
   ID: 2
   Characteristics:
     3.3 V is provided
     PME signal is supported
     Hot-plug devices are supported
     SMBus signal is supported

Handle 0x001C, DMI type 9, 13 bytes
System Slot Information
   Designation: Thunderbolt Slot 2
   Type: 32-bit PCI
   Current Usage: Available
   Length: Long
   ID: 3
   Characteristics:
     3.3 V is provided
     PME signal is supported
     Hot-plug devices are supported
     SMBus signal is supported

Handle 0x001D, DMI type 9, 13 bytes
System Slot Information
   Designation: Thunderbolt Slot 3
   Type: 32-bit PCI
   Current Usage: Available
   Length: Long
   ID: 4
   Characteristics:
     3.3 V is provided
     PME signal is supported
     Hot-plug devices are supported
     SMBus signal is supported

Handle 0x001E, DMI type 9, 13 bytes
System Slot Information
   Designation: Thunderbolt Slot 4
   Type: 32-bit PCI
   Current Usage: Available
   Length: Long
   ID: 5
   Characteristics:
     3.3 V is provided
     PME signal is supported
     Hot-plug devices are supported
     SMBus signal is supported

Handle 0x001F, DMI type 10, 6 bytes
On Board Device Information
   Type: Video
   Status: Enabled
   Description: nVidia Video Adapter

Handle 0x0020, DMI type 10, 6 bytes
On Board Device Information
   Type: Sound
   Status: Enabled
   Description: Azalia Audio Codec

Handle 0x0021, DMI type 10, 6 bytes
On Board Device Information
   Type: Other
   Status: Enabled
   Description: SATA

Handle 0x0022, DMI type 11, 5 bytes
OEM Strings
   String 1: Apple ROM Version.  BIOS ID:  MBP112.  Built by:  root@s
   String 2: aumon.  Date:  Tue Sep  8 13:12:19 PDT 2015.  Revision:
   String 3:  138.16.0~1 (B&I).  Buildcave ID: 1540.  ROM Version:  0138_
   String 4: B16.

Handle 0x0023, DMI type 12, 5 bytes
System Configuration Options

Handle 0x0024, DMI type 13, 22 bytes
BIOS Language Information
   Language Description Format: Long
   Installable Languages: 1
     <BAD INDEX>
   Currently Installed Language: Not Specified

Handle 0x0025, DMI type 32, 20 bytes
System Boot Information
   Status: No errors detected

Handle 0x0026, DMI type 131, 6 bytes
OEM-specific Type
   Header and Data:
     83 06 26 00 05 07

Handle 0x0027, DMI type 128, 88 bytes
OEM-specific Type
   Header and Data:
     80 58 27 00 04 00 00 00 37 F5 03 E8 37 FF 03 E8
     02 00 00 03 00 00 00 00 00 00 99 FF FF FF B2 FF
     00 00 B3 FF FF FF B5 FF 00 00 B6 FF FF FF DD FF
     00 00 E1 FF FF FF E3 FF 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00

Handle 0x0028, DMI type 133, 12 bytes
OEM-specific Type
   Header and Data:
     85 0C 28 00 02 00 00 00 00 00 00 00

Handle 0x0029, DMI type 221, 26 bytes
OEM-specific Type
   Header and Data:
     DD 1A 29 00 03 01 00 01 06 01 00 00 02 00 00 00
     00 0F 00 03 00 01 03 00 01 00
   Strings:
     Reference Code - CPU
     uCode Version
     TXT ACM version

Invalid entry length (0). DMI table is broken! Stop.



some audio device information:
=========
/sbin/lsmod | grep snd
snd_seq_dummy  12467  2
snd_hrtimer  12604  1
snd_seq_midi  12848  0
snd_seq_midi_event  13316  1 snd_seq_midi
snd_rawmidi  26909  1 snd_seq_midi
snd_seq  57068  8 snd_seq_midi_event,snd_seq_dummy,snd_seq_midi
snd_seq_device  13132  4 snd_seq,snd_rawmidi,snd_seq_dummy,snd_seq_midi
snd_hda_codec_hdmi  45118  1
snd_hda_codec_cirrus  17682  1
snd_hda_codec_generic  63181  1 snd_hda_codec_cirrus
snd_hda_intel  26407  3
snd_hda_controller  26646  1 snd_hda_intel
snd_hda_codec  104500  5 snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller,snd_hda_codec_cirrus
snd_hwdep  13148  1 snd_hda_codec
snd_pcm_oss  44798  0
snd_mixer_oss  22042  1 snd_pcm_oss
snd_pcm  88662  7 snd_pcm_oss,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer  26614  3 snd_hrtimer,snd_pcm,snd_seq
snd  65244  18 snd_pcm_oss,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_mixer_oss,snd_hda_codec_cirrus
soundcore  13026  2 snd,snd_hda_codec

Reached the 2000 char limit.
 
Second half of the output:

Code:
=====
aplay -L
default
  Playback/recording through the PulseAudio sound server
null
  Discard all samples (playback) or generate zero samples (capture)
pulse
  PulseAudio Sound Server
sysdefault:CARD=PCH
  HDA Intel PCH, CS4208 Analog
  Default Audio Device
front:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  Front speakers
surround21:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Digital
  IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  Direct sample mixing device
dmix:CARD=PCH,DEV=1
  HDA Intel PCH, CS4208 Digital
  Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
  HDA Intel PCH, CS4208 Digital
  Direct sample snooping device
hw:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
  HDA Intel PCH, CS4208 Digital
  Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
  HDA Intel PCH, CS4208 Analog
  Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
  HDA Intel PCH, CS4208 Digital
  Hardware device with all software conversions
hdmi:CARD=NVidia,DEV=0
  HDA NVidia, HDMI 0
  HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
  HDA NVidia, HDMI 1
  HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
  HDA NVidia, HDMI 2
  HDMI Audio Output
dmix:CARD=NVidia,DEV=3
  HDA NVidia, HDMI 0
  Direct sample mixing device
dmix:CARD=NVidia,DEV=7
  HDA NVidia, HDMI 1
  Direct sample mixing device
dmix:CARD=NVidia,DEV=8
  HDA NVidia, HDMI 2
  Direct sample mixing device
dsnoop:CARD=NVidia,DEV=3
  HDA NVidia, HDMI 0
  Direct sample snooping device
dsnoop:CARD=NVidia,DEV=7
  HDA NVidia, HDMI 1
  Direct sample snooping device
dsnoop:CARD=NVidia,DEV=8
  HDA NVidia, HDMI 2
  Direct sample snooping device
hw:CARD=NVidia,DEV=3
  HDA NVidia, HDMI 0
  Direct hardware device without any conversions
hw:CARD=NVidia,DEV=7
  HDA NVidia, HDMI 1
  Direct hardware device without any conversions
hw:CARD=NVidia,DEV=8
  HDA NVidia, HDMI 2
  Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
  HDA NVidia, HDMI 0
  Hardware device with all software conversions
plughw:CARD=NVidia,DEV=7
  HDA NVidia, HDMI 1
  Hardware device with all software conversions
plughw:CARD=NVidia,DEV=8
  HDA NVidia, HDMI 2
  Hardware device with all software conversions

====
lspci -v
00:00.0 Host bridge: Intel Corporation Crystal Well DRAM Controller (rev 08)
   Subsystem: Apple Inc. Device 012f
   Flags: bus master, fast devsel, latency 0
   Capabilities: <access denied>

00:01.0 PCI bridge: Intel Corporation Crystal Well PCI Express x16 Controller (rev 08) (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
   I/O behind bridge: 00001000-00001fff
   Memory behind bridge: c0000000-c10fffff
   Prefetchable memory behind bridge: 0000000080000000-0000000091ffffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:01.1 PCI bridge: Intel Corporation Crystal Well PCI Express x8 Controller (rev 08) (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=06, subordinate=9c, sec-latency=0
   I/O behind bridge: 00003000-00005fff
   Memory behind bridge: c1f00000-cdffffff
   Prefetchable memory behind bridge: 00000000ce000000-00000000d9ffffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) (prog-if 30 [XHCI])
   Subsystem: Intel Corporation Device 7270
   Flags: bus master, medium devsel, latency 0, IRQ 48
   Memory at c1e00000 (64-bit, non-prefetchable) [size=64K]
   Capabilities: <access denied>
   Kernel driver in use: xhci_hcd

00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
   Subsystem: Intel Corporation Device 7270
   Flags: bus master, fast devsel, latency 0, IRQ 49
   Memory at c1e19100 (64-bit, non-prefetchable)
   Capabilities: <access denied>
   Kernel driver in use: mei_me

00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
   Subsystem: Intel Corporation Device 7270
   Flags: bus master, fast devsel, latency 0, IRQ 50
   Memory at c1e14000 (64-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>
   Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5) (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
   I/O behind bridge: 00002000-00002fff
   Memory behind bridge: 7fa00000-7fbfffff
   Prefetchable memory behind bridge: 000000007fc00000-000000007fdfffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5) (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
   Memory behind bridge: c1800000-c1afffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5) (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
   Memory behind bridge: c1c00000-c1dfffff
   Prefetchable memory behind bridge: 00000000a0000000-00000000afffffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5) (prog-if 00 [Normal decode])
   Flags: bus master, fast devsel, latency 0
   Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
   Memory behind bridge: c1b00000-c1bfffff
   Capabilities: <access denied>
   Kernel driver in use: pcieport

00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)
   Subsystem: Intel Corporation Device 7270
   Flags: bus master, medium devsel, latency 0
   Capabilities: <access denied>
   Kernel driver in use: lpc_ich

00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
   Subsystem: Intel Corporation Device 7270
   Flags: medium devsel, IRQ 18
   Memory at c1e19000 (64-bit, non-prefetchable)
   I/O ports at efa0

01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 750M Mac Edition] (rev a1) (prog-if 00 [VGA controller])
   Subsystem: Apple Inc. Device 0130
   Flags: bus master, fast devsel, latency 0, IRQ 51
   Memory at c0000000 (32-bit, non-prefetchable) [size=16M]
   Memory at 80000000 (64-bit, prefetchable) [size=256M]
   Memory at 90000000 (64-bit, prefetchable) [size=32M]
   I/O ports at 1000
   [virtual] Expansion ROM at c1000000 [disabled] [size=512K]
   Capabilities: <access denied>
   Kernel driver in use: nvidia

01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
   Subsystem: Apple Inc. Device 0130
   Flags: bus master, fast devsel, latency 0, IRQ 17
   Memory at c1080000 (32-bit, non-prefetchable) [size=16K]
   Capabilities: <access denied>
   Kernel driver in use: snd_hda_intel

03:00.0 Network controller: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter (rev 03)
   Subsystem: Apple Inc. Device 0134
   Flags: bus master, fast devsel, latency 0, IRQ 18
   Memory at c1a00000 (64-bit, non-prefetchable) [size=32K]
   Memory at c1800000 (64-bit, non-prefetchable) [size=2M]
   Capabilities: <access denied>
   Kernel driver in use: wl

04:00.0 Multimedia controller: Broadcom Corporation Device 1570
   Subsystem: Broadcom Corporation Device 1570
   Flags: bus master, fast devsel, latency 0
   Memory at c1d00000 (64-bit, non-prefetchable) [size=64K]
   Memory at a0000000 (64-bit, prefetchable) [size=256M]
   Memory at c1c00000 (64-bit, non-prefetchable) [size=1M]
   Capabilities: <access denied>

05:00.0 SATA controller: Samsung Electronics Co Ltd Apple PCIe SSD (rev 01) (prog-if 01 [AHCI 1.0])
   Flags: bus master, fast devsel, latency 0, IRQ 16
   Memory at c1b00000 (32-bit, non-prefetchable) [size=8K]
   Expansion ROM at c1b10000 [disabled] [size=64K]
   Capabilities: <access denied>
   Kernel driver in use: ahci


I hope that this is enough information to get this audio issue sorted out on FreeBSD.
 
If you plug the MacBook into a TV, the default sound setting may work.

If instead you want to use built in speakers try the steps below.

Using the handbook section I linked above I would run the following command as root
# sysctl hw.snd.default_unit=3

If sound then works, you can assign pcm3 as the default sound device with the following entry in
/etc/sysctl.conf
Code:
hw.snd.default_unit=3

The audio has never worked on freeBSD it works on linux. Setting the device also doesn't work.

I've tried setting the new sound device, quitting firefox, relaunching firefox and trying to play a youtube video.

I've tried it on all snd hardware but so far none of them works.

Can you provide any other tips or link to those articles you were referring to earlier?
 
I found this article that talks about settings home boot hints: http://blog.hplogsdon.com/tuning-freebsd-for-apple-hardware/
I also saw a forum thread talking about the same things.

How do you find these device ids to use to set the hints? Are those documented somewhere?

Here's the relevant parts sans the adding snd_hda(4) to /boot/loader.conf

Sound and Audio
Both my iMac and my MacBook Pro use snd_hda(4) as the driver. I've now compiled it directly into the kernel, but it can be easily loaded with
kldload snd_hda

or by adding this line to /boot/loader.conf:
Code:
snd_hda_load="YES"
But, with both computers, sound still didn't work. Right now, a month or more after running BSD almost full time, at least on my MacBook Pro, it still isn't working completely correctly. On my MacBook Pro, the lines I stick into /boot/device.hints to get my sound working through the speakers is:
Code:
hint.hdac.0.cad0.nid10.config="as=2 seq=2"
hint.hdac.0.cad0.nid12.config="as=4 seq=1"
hint.hdac.0.config="gpio0"
and in order to route it through the headphone jack, I have to stick these lines into /boot/device.hints:
Code:
hint.hdac.0.cad0.nid10.config="as=2 seq=2"
hint.hdac.0.cad0.nid11.config="as=0 seq=2"
hint.hdac.0.cad0.nid12.config="as=4 seq=1"
hint.hdac.0.cad0.nid15.config="as=0 seq=2"
hint.hdac.0.config="gpio0 ovref"
As you can see, there is a bit of duplication. I'm not completely sure how to combine these two groups to get speakers to work by default. Whenever I have the headphone jack lines in the device.hints file, the speakers quite working. Whenever I remove them, the speakers work again.

And the fact that I have to reboot my fucking computer every time I make one change in order for the device to reconfigured makes the fine tuning of my speakers a bitch to do, so it might be a while until I figure it out.

On my iMac, the sound in tinny. There is no bass sound, and that sucks. Also if I bring both PCM and VOL volumes up very high, and REC is up even a tiny bit, the speakers go haywire and the girlfriend starts throwing shit at me to turn it off. I haven't given up on adjusting the sound, but it takes a lit of effort.

I'll continue to edit this post as more information comes up... I can't remember thing that I have done.

=====
How can I find those hint.hdac.0.cad0.nid10 strings? I saw another one that was something like hint.hdaa.xxxxxx
 
Last edited by a moderator:
Actually, I think I found it with sysctl -a | grep hda, here's some output. Anything looks out of the ordinary? Any documentation on working with these things, this is totally uncharted waters for me.
 

Attachments

  • hda.txt
    9.3 KB · Views: 398
Last edited by a moderator:
Sound chips that use the intel hda specification have many, many pins. Most laptop manufacturers do not use all the pins, Different manufacturers assign the pins differently, ie Asus may assign pin 14 to the on-board speakers while Apple may assign pin 15 to the speakers.

In linux there is a large database (codecs) that specifies the pin assignments. There is variation within a codec and Linux users specify a particular variation in /etc/modprobe.d. FreeBSD does not utilize a database, it interrogates the pins during boot (nids in your hda.txt output) and groups them based on location of the jacks. FreeBSD sound configuration does not always configure the pin assignments correctly or as you would like them. FreeBSD users can re-assign the pins using the /boot/device.hints file. device.hints(5)

If you just want to get the laptop working, I believe the fastest way is to search for your particular laptop model and FreeBSD. Someone likely has already worked this out.

If, instead, you want to understand what you are doing, I would read snd_hda(4) and search this forum. There are at least 8 or 9 posts where non-working sound has been sorted out and fixed.

One key thing in the snd_hda man page is putting the speaker nid and headphone nid in the same association. If you then assign the headphone nid a sequence = 15, it should sense the headphone jack and mute any lower numbered nids, in that particular association, which are typically the onboard speakers.
 
Last edited:
I've tried setting the new sound device, quitting firefox, relaunching firefox and trying to play a youtube video.

I recall some issues with sound in FreeBSD/Firefox. Playing an mp3 with simple player audio/mpg123 is a more reliable test. The handbook section I referenced above also tells you how to generate some white noise.

cat [I]filename[/I] > /dev/dsp
 
I recall some issues with sound in FreeBSD/Firefox. Playing an mp3 with simple player audio/mpg123 is a more reliable test. The handbook section I referenced above also tells you how to generate some white noise.

cat [I]filename[/I] > /dev/dsp

I don't have just a /dev/dsp, there's a /dev/dsp0.0% and /dev/dsp3.0% I am not sure what that's about to be honest.

I've also tried the sound on Firefox, Chromium, and VLC with an .wav file and nothing. The sound on the system is not functional. I saw this thread and asked over there as well : Thread 51788/
 
I don't have just a /dev/dsp, theres a /dev/dsp0.0% and /dev/dsp3.0% I am not sure what that's about to be honest.

My understanding is that dsp0 corresponds to pcm0 while dsp3 corresponds to pcm3. /dev/dsp is suppose to be linked at boot to point to your default sound device. In your case, it is likely that pcm3 would be your default device. If you did not specify
/etc/sysctl.conf
Code:
hw.snd_default_unit=3
you will loose the link on reboot.
See this Thread 9413.
 
grahamperrin There are many other discussions on pulseaudio, alsa and oss. Even on linux I only used pulseaudio as a jack module because I rand a lot of music programs, mostly seq24, ardour, cadence tools which was tool to configure jack although I did it with scripts before. If FreeBSD cannot run audio, I would be pretty bummed because music is one of the main things that I do on the side.

shepper that still didn't work, not with firefox, chromium or vlc with local mp3. Earlier you said that linux had some database files that laid out how the pins were supposed to be arranged. Couldn't those be added to the FreeBSD project, even as a port or something? Also how could I find that database of sound card configuration data?

Right now I am not sure which path to take but I can't really use FreeBSD w/o sound as I do a lot of sound work second only to graphics programming.
 
How can I find those hint.hdac.0.cad0.nid10 strings? I saw another one that was something like hint.hdaa.xxxxxx
Have a look at the snd_hda(4) man page, specifically the examples section at the end. You basically have to do a verbose boot, which will give you a lot of information, then adjust the pin layout accordingly.
 
This NID mapping is a highly Interesting topic...
If I understand this correctly this might be the reason why some sound cards with the same chip work and others not (i.e. no input and/or output).

Is it is possible to write a tool which enables one to check through all NIDS semiautomatically and quickly find those that actually "do the connection"?
Maybe such would allow to adapt generic chip drivers to all possible sound boards with varying NID mapping?

Maybe it could also be possible to use the ACPI information to get this information from the BIOS? Here a Linux-related article about this.
 
A generic verb pump sounds like a great idea.

Needing to turn mic bias on/off, to key a ham radio, I hardcoded the NID 11 of the mic in this particular PC.
Should have thought further. dev.hdaa.0.verb=0x123

Note the CTLFLAG_ANYBODY.

Juha

Code:
 $ diff -c /sys/dev/sound/pci/hda/hdaa.c*
*** /sys/dev/sound/pci/hda/hdaa.c  Thu Aug 25 14:17:22 2016
--- /sys/dev/sound/pci/hda/hdaa.c.orig  Fri Aug 19 03:33:00 2016
***************
*** 6386,6419 ****
  return (0);
  }
 
- /* junki */
- static int
- hdaa_sysctl_mic_control(SYSCTL_HANDLER_ARGS)
- {
-  struct hdaa_devinfo *devinfo = oidp->oid_arg1;
-  struct hdaa_widget *w = hdaa_widget_get(devinfo, 11);
-  int error, val;
-
-  if (w == NULL)
-  return (ENODEV);
-
-  val = w->wclass.pin.ctrl;
-
-  error = sysctl_handle_int(oidp, &val, 0, req);
-  if (error || req->newptr == NULL)
-  return (error);
-
-  hdaa_lock(devinfo);
-
-  w->wclass.pin.ctrl = val;
-
-  hda_command(devinfo->dev,
-  HDA_CMD_SET_PIN_WIDGET_CTRL(0, w->nid, w->wclass.pin.ctrl));
-  hdaa_unlock(devinfo);
-
-  return (0);
- }
-
  static int
  hdaa_sysctl_gpo_state(SYSCTL_HANDLER_ARGS)
  {
--- 6386,6391 ----
***************
*** 6701,6714 ****
  "reconfig", CTLTYPE_INT | CTLFLAG_RW,
  dev, sizeof(dev),
  hdaa_sysctl_reconfig, "I", "Reprocess configuration");
-
- /* junki */
-  SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
-  SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
-  "mic_control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY,
-  devinfo, sizeof(devinfo),
-  hdaa_sysctl_mic_control, "I", "mic bias control etc");
-
  bus_generic_attach(dev);
  return (0);
  }
--- 6673,6678 ----
Sorry about the reversed diff
 
Right now I am not sure which path to take but I can't really use FreeBSD w/o sound as I do a lot of sound work second only to graphics programming.

It is going to take more effort but as the MacBook Pro 11.3 is common, it would be worthwhile to work this out.

Start by posting the audio portion of your verbose dmesg as suggested by SirDice above.
 
bcomputerguy, please use pastebin or a similar service to post large batches of logging.

My apologizes, I really didn't know there was a 20k limit on a forum post and once I started I didn't know what to do.

Does FreeBSD have it's own pastebin type service? Some communities are particular to that type of thing.
 
Here is the patebin : http://pastebin.com/KvBEwNY9
And I'll upload the file just because.

Also I removed all the previous posts with the code pasted all over the place. This is my complete boot log, how can we sort out this audio issue?
 

Attachments

  • all_logs.txt
    99.1 KB · Views: 347
Back
Top