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

topology2: intel: bt-generic.conf: fix rate constraints #9068

Merged
merged 1 commit into from
Apr 26, 2024
Merged
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
6 changes: 2 additions & 4 deletions tools/topology/topology2/platform/intel/bt-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ Object.PCM.pcm [
direction "playback"
name $BT_PB_PCM_CAPS
formats 'S16_LE'
rate_min 8000
rate_max 48000
rates '8000,16000,48000'
channels_min 1
channels_max 2
}
Expand All @@ -245,8 +244,7 @@ Object.PCM.pcm [
direction "capture"
name $BT_CP_PCM_CAPS
formats 'S16_LE'
rate_min 8000
rate_max 48000
rates '8000,16000,48000'
Copy link
Contributor

@ujfalusi ujfalusi Apr 22, 2024

Choose a reason for hiding this comment

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

The range previously included 16, 32, 44.1 at least, is it valid to only pick these three of the range?

Copy link
Member

Choose a reason for hiding this comment

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

yes, lets keep it simple.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ujfalusi These match the supported Bluetooth profiles. 8 and 16 for HFP, and 48 for A2DP.

Copy link
Member

Choose a reason for hiding this comment

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

@kv2019i isn't 32kHz supported in the newer profiles with BT LE?

Copy link
Contributor

@fredoh9 fredoh9 Apr 22, 2024

Choose a reason for hiding this comment

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

A bit complicated case for tplg parser.
8000/16000 + mono + S16_LE is one of supported cases
48000 + stereo + S16_LE is another supported case?

sof_tplgreader.py will set 48000 first to rate when 48000 is available in rates, so this will fail again.

aplay -Dhw:0,2 -r 48000 -c 1 -f S16_LE -d 5 /dev/zero -v -q

before thesofproject/sof-test#1174 merged, rate is from rate_min, it was working with below params,

aplay -Dhw:0,2 -r 8000 -c 1 -f S16_LE -d 5 /dev/zero -v -q

Copy link
Collaborator

Choose a reason for hiding this comment

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

@fredoh9 explained this to me and I think the key issue is: assuming that rate and number of channels are independent of each other.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@plbossart yes, LE will have more rates, but we those also require addition of new SSP configurations which are not there yet, so until those added, we should advertise what we actually support (and that is 8/16/48 now)

@fredoh9 ack. this is just hitting the limits of what we can express in capabilities. the topology description of PCM cannot express the PCM does not support all combinations of supported channels and rates.

channels_min 1
channels_max 2
}
Expand Down