Re: Anyone know how to get sound on a 12th Gen Alder Lake based laptop?

From: Chris <bsd-lists_at_bsdforge.com>
Date: Sat, 13 Apr 2024 08:31:08 UTC
On 2024-04-13 01:14, Chris wrote:
> On 2024-04-12 23:04, Milan Obuch wrote:
>> On Fri, 12 Apr 2024 20:59:27 -0700
>> Chris <bsd-lists@bsdforge.com> wrote:
>> 
>>> I've read everything I can find on the subject. But have not been
>>> unable to produce sound on my Lenovo Ideapad 2. It's a 12th Gen
>>> Alder platform. Following are all the details. If anyone has had
>>> success, or knows how to get sound. Please share your info.
>>> 
>>> vendor     = 'Intel Corporation'
>>> device     = 'Alder Lake Innovation Platform Framework Processor
>>> Participant'
>>> 
>>> hdac0@pci0:0:31:3:	class=0x040380 rev=0x01 hdr=0x00
>>> vendor=0x8086 device=0x51c8 subvendor=0x17aa subdevice=0x3881
>>>      vendor     = 'Intel Corporation'
>>>      device     = 'Alder Lake PCH-P High Definition Audio Controller'
>>>      class      = multimedia
>>>      subclass   = HDA
>>>      bar   [10] = type Memory, range 64, base 0x6001138000, size
>>> 16384, enabled
>>>      bar   [20] = type Memory, range 64, base 0x6001000000, size
>>> 1048576, enabled
>>> 
>>> pcm0: <Realtek ALC257 (Analog)> at nid 33 and 18 on hdaa0
>>> pcm0: Playback:
>>> pcm0:      Stream cap: 0x00000001 PCM
>>> pcm0:         PCM cap: 0x000e0060 16 20 24 bits, 44 48 KHz
>>> pcm0:             DAC: 2
>>> pcm0:
>>> pcm0:     nid=33 [pin: Headphones (Black Jack)]
>>> pcm0:       + <- nid=2 [audio output] [src: pcm]
>>> pcm0:
>>> pcm0: Record:
>>> pcm0:      Stream cap: 0x00000001 PCM
>>> pcm0:         PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
>>> pcm0:             ADC: 7
>>> pcm0:
>>> pcm0:     nid=7 [audio input]
>>> pcm0:       + <- nid=36 [audio selector] [src: monitor]
>>> pcm0:              + <- nid=18 [pin: Mic (Fixed)] [src: monitor]
>>> pcm0:
>>> pcm0: Master Volume (OSS: vol): -65/0dB
>>> pcm0:    +- ctl  1 (nid   2 out):    -65/0dB (88 steps)
>>> pcm0:    +- ctl 14 (nid  33 in ):    mute
>>> pcm0:
>>> pcm0: PCM Volume (OSS: pcm): -65/0dB
>>> pcm0:    +- ctl  1 (nid   2 out):    -65/0dB (88 steps)
>>> pcm0:    +- ctl 14 (nid  33 in ):    mute
>>> pcm0:
>>> pcm0: Microphone2 Volume (OSS: monitor): 0/30dB
>>> pcm0:    +- ctl  3 (nid   7 in   0): -17/30dB (64 steps) + mute
>>> pcm0:    +- ctl  6 (nid  18 out):    0/30dB (4 steps)
>>> pcm0:
>>> pcm0: Recording Level (OSS: rec): -17/30dB
>>> pcm0:    +- ctl  3 (nid   7 in   0): -17/30dB (64 steps) + mute
>>> pcm0:    +- ctl  6 (nid  18 out):    0/30dB (4 steps)
>>> pcm0:
>>> pcm0: Mixer "vol":
>>> pcm0: Mixer "pcm":
>>> pcm0: Mixer "speaker":
>>> pcm0: Mixer "rec":
>>> pcm0: Mixer "ogain":
>>> pcm0: Mixer "monitor":
>>> pcm0: Playback channel set is: Front Left, Front Right,
>>> pcm0: Playback channel matrix is: 2.0 (disconnected)
>>> pcm0: Automatically set rec source to: monitor
>>> pcm0: Recording channel set is: Front Left, Front Right,
>>> pcm0: Recording channel matrix is: 2.0 (unknown)
>>> pcm1: <Realtek ALC257 (Right Analog Mic)> at nid 25 on hdaa0
>>> pcm1: Record:
>>> pcm1:      Stream cap: 0x00000001 PCM
>>> pcm1:         PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
>>> pcm1:             ADC: 8
>>> pcm1:
>>> pcm1:     nid=8 [audio input]
>>> pcm1:       + <- nid=35 [audio mixer] [src: speaker, mic]
>>> pcm1:              + <- nid=25 [pin: Mic (Black Jack)] [src: mic]
>>> pcm1:              + <- nid=29 [beep widget] [src: speaker]
>>> pcm1:
>>> pcm1: Microphone Volume (OSS: mic): 0/30dB
>>> pcm1:    +- ctl 10 (nid  25 out):    0/30dB (4 steps)
>>> pcm1:    +- ctl 22 (nid  35 in   1): mute
>>> pcm1:
>>> pcm1: Speaker/Beep Volume (OSS: speaker)
>>> pcm1:    +- ctl 25 (nid  35 in   4): mute
>>> pcm1:
>>> pcm1: Recording Level (OSS: rec): -17/30dB
>>> pcm1:    +- ctl  4 (nid   8 in   0): -17/30dB (64 steps) + mute
>>> pcm1:    +- ctl 10 (nid  25 out):    0/30dB (4 steps)
>>> pcm1:    +- ctl 22 (nid  35 in   1): mute
>>> pcm1:    +- ctl 25 (nid  35 in   4): mute
>>> pcm1:
>>> pcm1: Mixer "mic":
>>> pcm1: Mixer "rec":
>>> pcm1: Recording channel set is: Front Left, Front Right,
>>> pcm1: Recording channel matrix is: 2.0 (disconnected)
>>> 
>>> # sysctl hw.snd.default_unit
>>> hw.snd.default_unit: 0
>> 
>> Hi,
>> 
>> what does 'cat /dev/sndstat' show?
> I *knew* I was forgetting something.
> # cat /dev/sndstat
> Installed devices:
> pcm0: <Realtek ALC257 (Analog)> (play/rec) default
> pcm1: <Realtek ALC257 (Right Analog Mic)> (rec)
> No devices installed from userspace.
> 
>> It should be just small excerpt from
>> the above, but still...
>> 
>> HDA setup is a bit of mystery for me, I have GPD MicroPC where I am not
>> able to produce any sound using internal speaker, recently found Yoga
>> Book working with both internal speaker and output line out of the box.
>> 
>> For the former, I have a workaround, kind of - when I connect
>> additional monitor via HDMI port, I am able to route sound to that
>> monitor just by setting hw.snd.default_unit=2. It is not the best
>> solution, it just work well enough for me.
> Thanks for the hint. I'll see if I can get anything through HDMI.
> 
> Really appreciate the feedback, Milan. Thanks!

Something else I neglected to add:

# sysctl -a | grep dev.hda
dev.hdaa.0.init_clear: 0
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config: 0=keep 1=keep 2=keep
dev.hdaa.0.gpio_state: 0=disabled 1=disabled 2=disabled
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid36: audio selector
dev.hdaa.0.nid35: audio mixer
dev.hdaa.0.nid34: audio mixer [DISABLED]
dev.hdaa.0.nid33_original: 0x04211010 as=1 seq=0 device=Headphones conn=Jack 
ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid33_config: 0x04211010 as=1 seq=0 device=Headphones conn=Jack 
ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid33: pin: Headphones (Black Jack)
dev.hdaa.0.nid32: vendor widget [DISABLED]
dev.hdaa.0.nid31: vendor widget [DISABLED]
dev.hdaa.0.nid30_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid30_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid30: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid29_original: 0x4066b905 as=0 seq=5 device=Modem-line conn=None 
ctype=Digital loc=0x00 color=Res.B misc=9
dev.hdaa.0.nid29_config: 0x4066b905 as=0 seq=5 device=Modem-line conn=None 
ctype=Digital loc=0x00 color=Res.B misc=9
dev.hdaa.0.nid29: beep widget
dev.hdaa.0.nid28: vendor widget [DISABLED]
dev.hdaa.0.nid27_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid27_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid27: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid26_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid26_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid26: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid25_original: 0x04a11040 as=4 seq=0 device=Mic conn=Jack 
ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid25_config: 0x04a11040 as=4 seq=0 device=Mic conn=Jack ctype=1/8 
loc=Right color=Black misc=0
dev.hdaa.0.nid25: pin: Mic (Black Jack)
dev.hdaa.0.nid24_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid24_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None 
ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.0.nid24: pin: Speaker (None) [DISABLED]
dev.hdaa.0.nid23: vendor widget [DISABLED]
dev.hdaa.0.nid22: vendor widget [DISABLED]
dev.hdaa.0.nid21: vendor widget [DISABLED]
dev.hdaa.0.nid20_original: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed 
ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid20_config: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed 
ctype=Analog loc=Internal color=Unknown misc=1
dev.hdaa.0.nid20: pin: Speaker (Fixed) [DISABLED]
dev.hdaa.0.nid19_original: 0x40000000 as=0 seq=0 device=Line-out conn=None 
ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid19_config: 0x40000000 as=0 seq=0 device=Line-out conn=None 
ctype=Unknown loc=0x00 color=Unknown misc=0
dev.hdaa.0.nid19: pin: Line-out (None) [DISABLED]
dev.hdaa.0.nid18_original: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed 
ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid18_config: 0x90a60130 as=3 seq=0 device=Mic conn=Fixed 
ctype=Digital loc=Internal color=Unknown misc=1
dev.hdaa.0.nid18: pin: Mic (Fixed)
dev.hdaa.0.nid17: vendor widget [DISABLED]
dev.hdaa.0.nid16: vendor widget [DISABLED]
dev.hdaa.0.nid15: vendor widget [DISABLED]
dev.hdaa.0.nid14: vendor widget [DISABLED]
dev.hdaa.0.nid13: vendor widget [DISABLED]
dev.hdaa.0.nid12: vendor widget [DISABLED]
dev.hdaa.0.nid11: vendor widget [DISABLED]
dev.hdaa.0.nid10: vendor widget [DISABLED]
dev.hdaa.0.nid9: audio input [DISABLED]
dev.hdaa.0.nid8: audio input
dev.hdaa.0.nid7: audio input
dev.hdaa.0.nid6: audio output [DISABLED]
dev.hdaa.0.nid5: vendor widget [DISABLED]
dev.hdaa.0.nid4: vendor widget [DISABLED]
dev.hdaa.0.nid3: audio output [DISABLED]
dev.hdaa.0.nid2: audio output
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x17aa3981
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: Realtek ALC257 Audio Function Group
dev.hdaa.%parent:
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x10ec device=0x0257 revision=0x00 stepping=0x01
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: Realtek ALC257 HDA CODEC
dev.hdacc.%parent:
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.wake: 0
dev.hdac.0.%parent: pci0
dev.hdac.0.%pnpinfo: vendor=0x8086 device=0x51c8 subvendor=0x17aa 
subdevice=0x3881 class=0x040380
dev.hdac.0.%location: slot=31 function=3 dbsf=pci0:0:31:3 
handle=\_SB_.PC00.HDAS
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: Intel Alder Lake-P HDA Controller
dev.hdac.%parent:

Maybe this will provide some clues for those more familiar with this?

> 
>> 
>> Regards,
>> Milan
> 
--Chris