Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling values #442

Open
thenameisluk opened this issue Sep 19, 2024 · 1 comment
Open

Handling values #442

thenameisluk opened this issue Sep 19, 2024 · 1 comment

Comments

@thenameisluk
Copy link

i have similar config to https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/Qualcomm/sc7180/adau7002-max98357a/HiFi.conf
for homestar

# Use case configuration for ALC5682+MAX98357A on SC7180

SectionVerb {
	Value {
		TQ "HiFi"
	}
}

SectionDevice."Speaker" {
	Comment "Speaker"


	Value {
		PlaybackChannels 4
		PlaybackPCM "hw:${CardId},1"
		PlaybackPriority 100
		PlaybackMixerElem "Speaker"
		PlaybackVolume "Speaker Playback Volume"
	}
}

SectionDevice."Mic" {
	Comment "Internal Microphone"

	EnableSequence [
		cset "name='IF1 01 ADC Swap Mux' 1"
		cset "name='Stereo1 ADC L2 Mux' 1"
		cset "name='Stereo1 ADC R2 Mux' 1"
		cset "name='Stereo1 ADC MIXL ADC2 Switch' 1"
		cset "name='Stereo1 ADC MIXR ADC2 Switch' 1"
	]

	DisableSequence [
		cset "name='Stereo1 ADC L2 Mux' 0"
		cset "name='Stereo1 ADC R2 Mux' 0"
		cset "name='Stereo1 ADC MIXL ADC2 Switch' 0"
		cset "name='Stereo1 ADC MIXR ADC2 Switch' 0"
	]

	Value {
		CapturePCM "hw:${CardId},0"
		CapturePriority 100
		CaptureMixerElem "STO1 ADC"
		CaptureVolume "STO1 ADC Capture Volume"
	}
}

SectionDevice."HDMI" {
	Comment "HDMI Jack"
	
	ConflictingDevice [
		"Speaker"
	]

	EnableSequence [
	]

	DisableSequence [
	]

	Value {
		PlaybackPriority 200
		PlaybackPCM "hw:${CardId},2"
		JackControl "HDMI Jack"
	}
}

the speaker and mic section is irrelevant here
hdmi is causing issues

without

	ConflictingDevice [
		"Speaker"
	]

pipewire doesn't want to use the ucm at all unless the hdmi is plugged in

with it
pipewire will only configure hdmi if hdmi is plugged in (when you restart it or at boot)

it's all on the same card
and the interface never goes away, only switches between

# amixer -c 0 contents
numid=9,iface=CARD,name='HDMI Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off
...

without hdmi and

# amixer -c 0 contents
numid=9,iface=CARD,name='HDMI Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on

with hdmi

sudo alsactl monitoralso shows

node hw:0, #9 (0,0,0,HDMI Jack,0) VALUE

when plugging in and unplugging

knowing all this i am unable to figure out how to handle it with ucm2
and would appreciate some help getting it working without that ConflictingDevice

@perexg
Copy link
Member

perexg commented Oct 14, 2024

Usually, this problem is caused by the driver. PW tries to enumerate all devices when started, but unfortunately, some drivers are returning errors instead creating a "dummy" output or input when the cable is not connected. You may analyze this issue using spa-acp-tool. Note that PW inherits the code from PA. For this case, the dynamic behavior should be considered instead "static" probe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants