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

amd-soundwire: add support for AMD generic soundwire legacy machine driver #470

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ucm2/amd-soundwire/HiFi.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SectionVerb {
Value.TQ "HiFi"
}

<amd-soundwire/rt722-sdca.conf>
15 changes: 15 additions & 0 deletions ucm2/amd-soundwire/amd-soundwire.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Syntax 3

SectionUseCase."HiFi" {
File "/amd-soundwire/HiFi.conf"
Comment "AMD High Quality Music"
}

If.rt722_init {
Condition {
Type String
Haystack "${CardComponents}"
Needle "rt722"
}
True.Include.rt722_init.File "/codecs/rt722/init.conf"
}
89 changes: 89 additions & 0 deletions ucm2/amd-soundwire/rt722-sdca.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Use case Configuration for amd-soundwire card

If.RT722 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config is almost identical to ucm2/sof-soundwire . I would add/merge code. If AMD driver follow the similar components scheme (${CardComponents} string), it can be a good benefit to share configs.

Copy link
Author

@vijendarmukunda vijendarmukunda Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perexg : Agreed. But due to time constraint, We need to release the UCM files to unblock the customer release. Let this PR go as initial version. We will look in to your suggested changes and implement the changes as next version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you show the components string ? amixer -c 0 info will print it (replace zero with the correct ALSA card number).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below is the component string output for amd-soundwire sound card.
Components : ' cfg-amp:1 hs:rt722 spk:rt722 mic:rt722'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perexg : We have identified one issue which may needs to update the UCM files. Please hold this pull request

Condition {
Type String
Haystack "${CardComponents}"
Needle "rt722"
}
True {
SectionDevice."Headphones" {
Comment "Headphones"

EnableSequence [
cset "name='Headphone Switch' on"
]

DisableSequence [
cset "name='Headphone Switch' off"
]

Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
JackControl "Headphone Jack"
}
}

SectionDevice."Headset" {
Comment "Headset Microphone"

EnableSequence [
cset "name='Headset Mic Switch' on"
cset "name='rt722 FU0F Capture Switch' on"
]

DisableSequence [
cset "name='Headset Mic Switch' off"
cset "name='rt722 FU0F Capture Switch' off"
]

Value {
CapturePriority 200
CapturePCM "hw:${CardId},1"
JackControl "Headset Mic Jack"
CaptureSwitch "rt722 FU0F Capture Switch"
CaptureVolume "rt722 FU0F Capture Volume"
CaptureMixerElem "rt722 FU0F"
}
}

SectionDevice."Speaker" {
Comment "Speaker"

EnableSequence [
cset "name='Speaker Switch' on"
]
DisableSequence [
cset "name='Speaker Switch' off"
]

Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},2"
PlaybackMixerElem "rt722 FU06"
PlaybackVolume "rt722 FU06 Playback Volume"
}
}

SectionDevice."InternalMic" {
Comment "Soundwire DMIC"

EnableSequence [
cset "name='rt722 FU1E Capture Switch' on"
]

DisableSequence [
cset "name='rt722 FU1E Capture Switch' off"
]

Value {
CapturePriority 200
CapturePCM "hw:${CardId},4"
CaptureSwitch "rt722 FU1E Capture Switch"
CaptureVolume "rt722 FU1E Capture Volume"
CaptureMixerElem "rt722 FU1E"
}
}
}
}
1 change: 1 addition & 0 deletions ucm2/conf.d/amd-soundwire/amd-soundwire.conf