-
Notifications
You must be signed in to change notification settings - Fork 318
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
Conversation
Commit c77a4fe ("topology2: pcm_caps: Remove defaults for rate_min/rate_max") changed how rate constraints are described in topology. After this change, the rate_min/max was ignored by SOF Linux driver and the rate was incorrectly limited to 48000Hz for these topologies. Fix this issue by enumerating the supported sampling rates with "rates". Link: https://github.com/thesofproject/sof/issues/9067 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@@ -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' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@ujfalusi good for you ? |
Commit c77a4fe ("topology2: pcm_caps: Remove defaults for rate_min/rate_max") changed how rate constraints are described in topology. After this change, the rate_min/max was ignored by SOF Linux driver and the rate was incorrectly limited to 48000Hz for these topologies.
Fix this issue by enumerating the supported sampling rates with "rates".
Link: thesofproject/sof-test#1185