Skip to content

topology: cleanup/align SoundWire device numbers - #3806

Merged
lgirdwood merged 6 commits into
thesofproject:masterfrom
plbossart:fix/sdw-device-numbers
Feb 10, 2021
Merged

topology: cleanup/align SoundWire device numbers#3806
lgirdwood merged 6 commits into
thesofproject:masterfrom
plbossart:fix/sdw-device-numbers

Conversation

@plbossart

Copy link
Copy Markdown
Member

No description provided.

@naveen-manohar naveen-manohar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With UCM changes, Verified Basic Audio on Volteer-SDW - sof-tgl-sdw-max98373-rt5682.tplg

@plbossart

Copy link
Copy Markdown
Member Author

@bardliao @RanderWang can you take a look on other SoundWire devices?

@bardliao

bardliao commented Feb 3, 2021

Copy link
Copy Markdown
Collaborator

I tested 3 sdw laptops and all of them looks good to me.
Below is the result of cat /proc/asound/pcm

tgl sdca
00-00: Headphone (*) :  : playback 1
00-01: Headset mic (*) :  : capture 1
00-02: SDW1-speakers (*) :  : playback 1
00-04: Microphones (*) :  : capture 1
00-05: HDMI1 (*) :  : playback 1
00-06: HDMI2 (*) :  : playback 1
00-07: HDMI3 (*) :  : playback 1


tgl sdw
00-00: Headphone (*) :  : playback 1
00-01: Headset mic (*) :  : capture 1
00-02: Speakers (*) :  : playback 1
00-04: Microphones (*) :  : capture 1
00-05: HDMI1 (*) :  : playback 1
00-06: HDMI2 (*) :  : playback 1
00-07: HDMI3 (*) :  : playback 1


cml sdw 2 1308 laptop
00-00: Headphone (*) :  : playback 1
00-01: Headset mic (*) :  : capture 1
00-02: SDW1-speakers (*) :  : playback 1
00-04: Microphones (*) :  : capture 1
00-05: HDMI1 (*) :  : playback 1
00-06: HDMI2 (*) :  : playback 1
00-07: HDMI3 (*) :  : playback 1

@RanderWang

Copy link
Copy Markdown
Collaborator

I tested 3 sdw laptops and all of them looks good to me.
Below is the result of cat /proc/version

tgl sdca
00-00: Headphone (*) :  : playback 1
00-01: Headset mic (*) :  : capture 1
00-02: SDW1-speakers (*) :  : playback 1
00-04: Microphones (*) :  : capture 1
00-05: HDMI1 (*) :  : playback 1
00-06: HDMI2 (*) :  : playback 1
00-07: HDMI3 (*) :  : playback 1


tgl sdw
00-00: Headphone (*) :  : playback 1
00-01: Headset mic (*) :  : capture 1
00-02: Speakers (*) :  : playback 1
00-04: Microphones (*) :  : capture 1
00-05: HDMI1 (*) :  : playback 1
00-06: HDMI2 (*) :  : playback 1
00-07: HDMI3 (*) :  : playback 1


cml sdw 2 1308 laptop
00-00: Headphone (*) :  : playback 1
00-01: Headset mic (*) :  : capture 1
00-02: SDW1-speakers (*) :  : playback 1
00-04: Microphones (*) :  : capture 1
00-05: HDMI1 (*) :  : playback 1
00-06: HDMI2 (*) :  : playback 1
00-07: HDMI3 (*) :  : playback 1

@bardliao why only 3 HDMI for tgl device ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PCM8 for iDisp4 is missed

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PCM8 ?

@RanderWang

Copy link
Copy Markdown
Collaborator

it is ok on Volteer
root@sh-tglu-volt-sdw-03:~# cat /proc/asound/pcm
00-00: Headphone () : : playback 1
00-01: Headset mic (
) : : capture 1
00-02: smart373-spk () : : playback 1
00-03: echo (
) : : capture 1
00-05: HDMI1 () : : playback 1
00-06: HDMI2 (
) : : playback 1
00-07: HDMI3 () : : playback 1
00-08: HDMI4 (
) : : playback 1
00-10: DMIC48kHz () : : capture 1
00-12: DMIC16k (
) : : capture 1
01-00: USB Audio : USB Audio : playback 1 : capture 1

@naveen-manohar

Copy link
Copy Markdown
Contributor

On Volteer-SDW:
Old_PCM vs New_PCM
image

@lgirdwood

Copy link
Copy Markdown
Member

@naveen-manohar are you saying we alos need an UCM update here ?
@plbossart looks like we have a conflict.

@plbossart

Copy link
Copy Markdown
Member Author

@naveen-manohar are you saying we alos need an UCM update here ?
@plbossart looks like we have a conflict.

Yes Volteer will need a UCM update, but that was shared and accepted by the Chrome folks. The Volteer configuration is not in alsa-ucm-conf upstream so platforms which are handled upstream, such as Dell/HP, have priority.

@plbossart

Copy link
Copy Markdown
Member Author

@plbossart looks like we have a conflict.

yes, I managed to self-conflict between PRs. I need to change device names as well.

@naveen-manohar

Copy link
Copy Markdown
Contributor

@naveen-manohar are you saying we alos need an UCM update here ?
@plbossart looks like we have a conflict.

Yes Volteer will need a UCM update, but that was shared and accepted by the Chrome folks. The Volteer configuration is not in alsa-ucm-conf upstream so platforms which are handled upstream, such as Dell/HP, have priority.

Post this PR merge, shall take to Chrome Tree & submit along with UCM change.

@lgirdwood

Copy link
Copy Markdown
Member

@plbossart fyi - some merge conflicts.

@plbossart

Copy link
Copy Markdown
Member Author

@plbossart fyi - some merge conflicts.

yes, will work on this later today.

This topology is no longer used and productized, let's remove it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This file was used for early enablement of SoundWire on a platform,
before we had support for amplifiers. This is no longer needed, let's
remove it.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Confusion between input and output, and PCM name and pipeline ID.

Copy/paste likely here.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add macro to allow the use of "BufferedMic" instead of
"DMIC16kHz" in KPB usages.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This patch follows the suggested layout:

PCM0   playback	Jack
PCM1   capture 	Jack
PCM2   playback	Speaker
PCM3   capture	Amplifier Reference (typically based on I/V feedback)
PCM4   capture 	Microphone
PCM5   playback	HDMI 1
PCM6   playback	HDMI 2
PCM7   playback	HDMI 3
PCM8   playback	HDMI 4
PCM9   RESERVED
PCM10  capture	DMIC
PCM11  capture	DMIC16kHz
PCM12  capture 	BufferedMic (aka KPB)
PCM13  playback Bluetooth
PCM14  capture 	Bluetooth

PCM40  playback	Speaker 2 (non-aggregated)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Align on the following names:

PCM0   playback	Jack
PCM1   capture 	Jack
PCM2   playback	Speaker
PCM3   capture	Amplifier Reference (typically based on I/V feedback)
PCM4   capture 	Microphone
PCM5   playback	HDMI 1
PCM6   playback	HDMI 2
PCM7   playback	HDMI 3
PCM8   playback	HDMI 4
PCM9   RESERVED
PCM10  capture	DMIC
PCM11  capture	DMIC16kHz
PCM12  capture 	BufferedMic (aka KPB)
PCM13  playback Bluetooth
PCM14  capture 	Bluetooth

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
@plbossart

plbossart commented Feb 9, 2021

Copy link
Copy Markdown
Member Author

@ranj063 @kv2019i @bardliao @perexg FYI here's the list of devices and names I came up with.

PCMDeviceList.txt

@lgirdwood
lgirdwood merged commit 980d880 into thesofproject:master Feb 10, 2021
@lgirdwood lgirdwood added this to the v1.7 milestone Feb 10, 2021
@plbossart

Copy link
Copy Markdown
Member Author

@lgirdwood we should have been more careful on this one, CI tests did show a problem with alsa-bat precisely due to the device number issues.

https://sof-ci.01.org/sofpr/PR3806/build8108/devicetest/

I only realized this with the daily test and @fredoh9 's help.

good old alsa-bat still has its value. All other tests don't seem to check for expected device numbers or names.

@lgirdwood

Copy link
Copy Markdown
Member

@plbossart thanks, fwiw, I've been seeing this all week and I've created an issue for CI test to dump PCM and card names when this happens. Do you have a followup for UCM ? or do you want to revert and hold for v1.8 ?

@plbossart

Copy link
Copy Markdown
Member Author

@plbossart thanks, fwiw, I've been seeing this all week and I've created an issue for CI test to dump PCM and card names when this happens. Do you have a followup for UCM ? or do you want to revert and hold for v1.8 ?

I have a followup coming, @ranj063 helped me find the issues in current topologies that were exposed by my changes.
It's literally a Jenga game, when you remove or redefine a part the whole thing can crumble.

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

Successfully merging this pull request may close these issues.

5 participants