Linux (namely, handspun distros) definitely has some rough edges. Multimedia can be one of them. I’m currently working on solving a sound issue: really, it’s the microphone. It won’t record anything. And debugging it isn’t a whole lot of fun. But, there are tools. lspci -vvnk gets you a very detailed list of what the kernel sees on the hardware side of things. Adding -s lets you focus on the device of interest. Quick question: how do you get the slot-id to use with -s? Use a different lspci command.
# lspci | grep Audio 00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04) 01:00.1 Audio device: NVIDIA Corporation GF114 HDMI Audio Controller (rev a1)
And, now, since I’m dealing with the Intel sound device, I know that I care about slot 00:1b.0
# lspci -vvnnk -s 00:1b.0 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: Micro-Star International Co., Ltd. Device [1462:d751] Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 45 Region 0: Memory at f6a30000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME- Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+ Address: 00000000feeff00c Data: 4122 Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us ExtTag- RBE- FLReset+ DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- MaxPayload 128 bytes, MaxReadReq 128 bytes DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend- LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us ClockPM- Surprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk- ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt- Capabilities: [100 v1] Virtual Channel Caps: LPEVC=0 RefClk=100ns PATEntryBits=1 Arb: Fixed- WRR32- WRR64- WRR128- Ctrl: ArbSelect=Fixed Status: InProgress- VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans- Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256- Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01 Status: NegoPending- InProgress- VC1: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans- Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256- Ctrl: Enable+ ID=1 ArbSelect=Fixed TC/VC=22 Status: NegoPending- InProgress- Capabilities: [130 v1] Root Complex Link Desc: PortNumber=0f ComponentID=00 EltType=Config Link0: Desc: TargetPort=00 TargetComponent=00 AssocRCRB- LinkType=MemMapped LinkValid+ Addr: 00000000fed1c000 Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel #
Should have grabbed some other pieces of information first:
I’m trying to enable built-in sound on:
- Motherboard: MSI Z77A-GD65 LGA 1155 Intel Z77
- lspci: Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
- lspci: Subsystem: Micro-Star International Co., Ltd. Device [1462:d751]
- kernel module: snd_hda_intel
- tail -1 /etc/modprobe.d/alsa.conf: options snd-hda-intel model=auto
- grep /proc/asound/card0/codec#0: Codec Realtek ALC898
- grep /proc/asound/card0/codec#1: Intel PantherPoint HDMI
I’m not at all convinced that the codecs are being chosen correctly with the model=auto option for snd. Why? Because the control sets in alsamixer seem way too convoluted (which I think I’ve dealt with after dealing with driver mismatches).
I ended up calling the microphone a *fail* for now. The only thing I need it for is Skype and I can skype on a different machine. I ended up with this line in /etc/modprobe.d/alsa.conf:
options snd-hda-intel model=auto position_fix=1 enable_msi=1
Some folks had luck with the postition_fix parameter getting the microphone working. For me, it simply convinced me that the mic was picking up the environment and not just amplifying noise/feedback in the system. The various hda devices have “pin” configurations with different attributes (input, output, enabled, disabled, etc.) that you can see with a python program: hda_analyzer.py. However, that looked intimidating enough that I didn’t want to try to experiment with it. So, for now, no mic. But sound works fine.