You are not logged in.

#1 2026-02-10 02:45:25

_tmkc
Member
Registered: 2025-03-03
Posts: 6

Realtek ALC897, 3.5 jack acts either as headphones or microphone

Hello,
I am struggling to get my system to recognize my headsets with mic.
I have built-in microphone in my laptop, but i want it to use the one in my headsets.

I have tried adding '/etc/modprobe.d/alsa-base.conf' -> tried many different models, none of which seems to work
I have tried tinkering around `hdajackretask` but it's way over my head.

I have seen in similar topic to post responses to this commands:

sudo fuser -v /dev/snd/*

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  zerk       1129 F.... pipewire
                     zerk       1130 F.... wireplumber
                     zerk      12642 F.... alsamixer
/dev/snd/controlC1:  zerk       1130 F.... wireplumber
/dev/snd/pcmC0D0p:   zerk       1129 F...m pipewire
/dev/snd/seq:        zerk       1129 F.... pipewire 

arecord -lL

null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
    Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC897 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC897 Analog
    Front output / input
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
usbstream:CARD=NVidia
    HDA NVidia
    USB Stream Output
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC897 Analog [ALC897 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

sudo dmesg | grep -E 'snd|sof'

[    0.058942] software IO TLB: area num 32.
[    0.790189] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.790190] software IO TLB: mapped [mem 0x000000002dd72000-0x0000000031d72000] (64MB)
[   24.625245] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[   26.488298] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[   26.488392] snd_hda_intel 0000:01:00.1: Disabling MSI
[   26.488400] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[   26.543495] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops intel_audio_component_bind_ops [i915])
[   26.615083] snd_hda_codec_alc662 hdaudioC0D0: autoconfig for ALC897: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[   26.615098] snd_hda_codec_alc662 hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   26.615105] snd_hda_codec_alc662 hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[   26.615110] snd_hda_codec_alc662 hdaudioC0D0:    mono: mono_out=0x0
[   26.615113] snd_hda_codec_alc662 hdaudioC0D0:    inputs:
[   26.615116] snd_hda_codec_alc662 hdaudioC0D0:      Mic=0x12

amixer -c0

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 61 [70%] [-19.50dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Headphone Mic',0
  Capabilities: pvolume pswitch cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Mono
  Limits: Playback 0 - 31
  Mono: Capture [off]
  Front Left: Playback 30 [97%] [10.50dB] [on]
  Front Right: Playback 30 [97%] [10.50dB] [on]
Simple mixer control 'Headphone Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 0 [0%] [-65.25dB] [off]
  Front Right: Playback 0 [0%] [-65.25dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 253 [99%] [-0.40dB]
  Front Right: Playback 253 [99%] [-0.40dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 63 [100%] [30.00dB] [on]
  Front Right: Capture 63 [100%] [30.00dB] [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'
Simple mixer control 'Internal Mic',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Mono
  Mono: Capture [on]
Simple mixer control 'Loopback Mixing',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'

pactl list sources

Source #55
	State: RUNNING
	Name: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
	Description: Monitor of Built-in Audio Analog Stereo
	Driver: PipeWire
	Sample Specification: s32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 65536 / 100% / 0.00 dB
	Monitor of Sink: alsa_output.pci-0000_00_1f.3.analog-stereo
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE DECIBEL_VOLUME LATENCY
	Properties:
		object.path = "alsa:acp:PCH:7:playback"
		api.alsa.path = "front:0"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "playback"
		port.group = "playback"
		device.icon_name = "audio-card-analog"
		device.bus = "pci"
		audio.channels = "2"
		audio.position = "FL,FR"
		device.routes = "2"
		alsa.resolution_bits = "16"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x624d188000 irq 222"
		alsa.driver_name = "snd_hda_intel"
		alsa.mixer_name = "Realtek ALC897"
		alsa.components = "HDA:10ec0897,145886e1,00100402 HDA:8086281c,80860101,00100000"
		alsa.id = "PCH"
		device.api = "alsa"
		device.class = "monitor"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC897 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.sync.id = "00000000:00000000:00000000:00000000"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		card.profile.device = "7"
		device.id = "44"
		factory.name = "api.alsa.pcm.sink"
		node.pause-on-idle = "false"
		priority.driver = "1009"
		priority.session = "1009"
		media.class = "Audio/Sink"
		node.name = "alsa_output.pci-0000_00_1f.3.analog-stereo"
		node.nick = "ALC897 Analog"
		device.description = "Built-in Audio"
		api.alsa.card.name = "HDA Intel PCH"
		api.alsa.card.longname = "HDA Intel PCH at 0x624d188000 irq 222"
		factory.id = "19"
		clock.quantum-limit = "8192"
		client.id = "41"
		node.driver = "true"
		node.loop.name = "data-loop.0"
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "55"
		object.serial = "55"
		node.max-latency = "16384/48000"
		api.alsa.period-size = "1024"
		api.alsa.period-num = "32"
		api.alsa.headroom = "0"
		device.enum.api = "udev"
		api.alsa.card = "0"
		device.plugged.usec = "26647399"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.subsystem = "sound"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "0x51c8"
		device.product.name = "Alder Lake PCH-P High Definition Audio Controller"
		device.form_factor = "internal"
		device.name = "alsa_card.pci-0000_00_1f.3"
		device.nick = "HDA Intel PCH"
		api.alsa.use-acp = "true"
		api.acp.auto-profile = "false"
		api.acp.auto-port = "false"
		api.dbus.ReserveDevice1.Priority = "-20"
		api.alsa.split-enable = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		spa.object.id = "2"
		device.string = "0"
	Ports:
		analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability group: Legacy 3, availability unknown)
		analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 2, availability unknown)
	Active Port: analog-output-headphones
	Formats:
		pcm

Source #56
	State: SUSPENDED
	Name: alsa_input.pci-0000_00_1f.3.analog-stereo
	Description: Built-in Audio Analog Stereo
	Driver: PipeWire
	Sample Specification: s32le 2ch 48000Hz
	Channel Map: front-left,front-right
	Owner Module: 4294967295
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Base Volume: 20724 /  32% / -30.00 dB
	Monitor of Sink: n/a
	Latency: 0 usec, configured 0 usec
	Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
	Properties:
		object.path = "alsa:acp:PCH:0:capture"
		api.alsa.path = "front:0"
		api.alsa.pcm.card = "0"
		api.alsa.pcm.stream = "capture"
		port.group = "capture"
		device.icon_name = "audio-card-analog"
		device.bus = "pci"
		audio.channels = "2"
		audio.position = "FL,FR"
		device.routes = "2"
		alsa.resolution_bits = "16"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0x624d188000 irq 222"
		alsa.driver_name = "snd_hda_intel"
		alsa.mixer_name = "Realtek ALC897"
		alsa.components = "HDA:10ec0897,145886e1,00100402 HDA:8086281c,80860101,00100000"
		alsa.id = "PCH"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC897 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.sync.id = "00000000:00000000:00000000:00000000"
		device.profile.name = "analog-stereo"
		device.profile.description = "Analog Stereo"
		card.profile.device = "0"
		device.id = "44"
		factory.name = "api.alsa.pcm.source"
		node.pause-on-idle = "false"
		priority.driver = "2009"
		priority.session = "2009"
		media.class = "Audio/Source"
		node.name = "alsa_input.pci-0000_00_1f.3.analog-stereo"
		node.nick = "ALC897 Analog"
		device.description = "Built-in Audio"
		api.alsa.card.name = "HDA Intel PCH"
		api.alsa.card.longname = "HDA Intel PCH at 0x624d188000 irq 222"
		factory.id = "19"
		clock.quantum-limit = "8192"
		client.id = "41"
		node.driver = "true"
		node.loop.name = "data-loop.0"
		library.name = "audioconvert/libspa-audioconvert"
		object.id = "56"
		object.serial = "56"
		device.enum.api = "udev"
		api.alsa.card = "0"
		device.plugged.usec = "26647399"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.subsystem = "sound"
		device.vendor.id = "0x8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "0x51c8"
		device.product.name = "Alder Lake PCH-P High Definition Audio Controller"
		device.form_factor = "internal"
		device.name = "alsa_card.pci-0000_00_1f.3"
		device.nick = "HDA Intel PCH"
		api.alsa.use-acp = "true"
		api.acp.auto-profile = "false"
		api.acp.auto-port = "false"
		api.dbus.ReserveDevice1.Priority = "-20"
		api.alsa.split-enable = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		spa.object.id = "2"
		device.string = "0"
	Ports:
		analog-input-internal-mic: Internal Microphone (type: Mic, priority: 8900, availability group: Legacy 1, availability unknown)
		analog-input-headphone-mic: Microphone (type: Mic, priority: 8700, availability group: Legacy 2, availability unknown)
	Active Port: analog-input-internal-mic
	Formats:
		pcm

Any help is welcome.

PS. Hope I didn't mess up formatting and post is readable.

Offline

#2 2026-02-10 20:34:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,064

Re: Realtek ALC897, 3.5 jack acts either as headphones or microphone

You tried which model definitions how, and which is active right now

systool -vm snd-hda-intel #from sysfsutils

? Generally the one most people had success with is dell-headset-multi or just headset-multi

FWIW a random googler for the exact codec brought up https://bugs.launchpad.net/ubuntu/+sour … comments/2 which is something you could try (you'd pass the file name without the "/lib/firmware" prefix to a patch option in a modprobe config like

options snd-hda-intel patch=hda-jack-retask.fw

Offline

#3 2026-02-11 00:37:47

_tmkc
Member
Registered: 2025-03-03
Posts: 6

Re: Realtek ALC897, 3.5 jack acts either as headphones or microphone

Hello V1del,

Thank you for response.

My bad is I do not remember which model was "active" when i generated output of commands, I can run them again on a "clear" system if that might help.

systool -vm snd-hda-intel #from sysfsutils

Error opening module snd-hda-intel

Models I tried by putting below into /etc/modprobe.d/alsa-base.conf and restarting PC every time:

options snd-hda-intel model=model

List:
headset-mic
headset-mode
dell-headset-multi
alc283-headset
alc662-headset
alc668-headset
alc891-headset-multi

FWIW a random googler for the exact codec brought up https://bugs.launchpad.net/ubuntu/+sour … comments/2 which is something you could try (you'd pass the file name without the "/lib/firmware" prefix to a patch option in a modprobe config like

I have added file: /lib/firmware/hda-jack-retask.fw

and put 

options snd-hda-intel patch=hda-jack-retask.fw

into /etc/modprobe.d/alsa-base.conf

None of above is working. In pavucontrol i can see Internal Microphone / Microphone in inputs and Speakers / Headphones in outputs.
When I set outputs to Headphones it only works when input is set to InternalMic, otherwise headset behaves as mic only.

Offline

#4 2026-02-11 19:19:22

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,064

Re: Realtek ALC897, 3.5 jack acts either as headphones or microphone

Ah feck it's

systool -vm snd_hda_intel

, fwiw something that "might" have a chance to trip you up with just the model options (though iirc with the nvidia hdmi driver the loading order is fairly stable, so this might be a red herring) is that the card indices "might" switch (compare aplay -l on reboot) and if that happened it's possible the model option applied to the wrong logical card (sadly there's no way to control this deterministically with cards sharing snd_hda_intel)

Offline

#5 2026-02-11 19:30:04

_tmkc
Member
Registered: 2025-03-03
Posts: 6

Re: Realtek ALC897, 3.5 jack acts either as headphones or microphone

Output of systool -vm snd_hda_tool

Module = "snd_hda_intel"

  Attributes:
    coresize            = "69632"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "2"
    srcversion          = "BEB191A25B4F1B29C04C755"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    align_buffer_size   = "-1"
    bdl_pos_adj         = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    beep_mode           = "N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N"
    ctl_dev_id          = "N"
    dmic_detect         = "Y"
    enable_msi          = "-1"
    enable              = "Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y"
    id                  = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    index               = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    jackpoll_ms         = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    model               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    patch               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    pm_blacklist        = "-1"
    position_fix        = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    power_save          = "10"
    power_save_controller= "Y"
    probe_mask          = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    probe_only          = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    single_cmd          = "-1"
    snoop               = "-1"

  Sections:

output of aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC897 Analog [ALC897 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [DELL S3422DWG]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Both outputs generated with no alsa-base.conf or hda-jack-retask.fw files

, fwiw something that "might" have a chance to trip you up with just the model options (though iirc with the nvidia hdmi driver the loading order is fairly stable, so this might be a red herring) is that the card indices "might" switch (compare aplay -l on reboot) and if that happened it's possible the model option applied to the wrong logical card (sadly there's no way to control this deterministically with cards sharing snd_hda_intel)

if you are talking about this part card 0 when i was trying on my own Intel was always 0 index and nvidia 1 index so i think its the same each time.

Offline

#6 2026-02-11 20:21:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,064

Re: Realtek ALC897, 3.5 jack acts either as headphones or microphone

hda-jack-retask files get created by playing around with hdajackretask, these commands are just to confirm what the current state of your system is. (e.g. if this is supposed to be a boot with the patch option set, it currently isn't, if snd_hda_intel gets loaded in initramfs and you have an alsa-base.conf setting up the patch option you might have to regenerate your initramfs)

Offline

#7 2026-02-14 18:56:19

_tmkc
Member
Registered: 2025-03-03
Posts: 6

Re: Realtek ALC897, 3.5 jack acts either as headphones or microphone

Update:

I checked if snd-hda-intel model are loaded, I checked if patches applied by hdajackretask are applied and it seems they are.

I played around more with hdajackretask, I though i was getting close because mic seemed to receive some kind of input but it was just noise.

In the end I ordered ~5$ usb adapter and it works well.

@V1del thank you for help anyway. Cheers

Offline

Board footer

Powered by FluxBB