You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Topology: Multiple configurations for SSP DAIs #1092
We need the ability to expose multiple configurations per DAI in the topology file, and means for the driver to pass the relevant configuration over IPC to the firmware.
One example is support for 8 or 16 kHz for a Bluetooth HFP link.
This also needs to export an enum kcontrol for each SSP port that has > 1 configuration in order for userspace to select the correct configuration based on use case.
that's not the ask for now. The topology can pass multiple configurations to the kernel (32 IRRC), but we only deal with the first in the kernel. We would want to limit any userspace interaction and possibly select the configuration based e.g. on sampling frequency and channels.
@plbossart I have some changes available for this issue at dragosht@2c4b7a2 . Basically, generating multiple HWConfig sections and referencing those from the BE section seems to work, but I haven't yet figured out how to deal with having multiple SOF_TKN_INTEL_SSP_SAMPLE_BITS values.
would require for the config->ssp.sample_valid_bits to get initialized to either 16 or 32 bits, based on what configuration is being used. But I see the driver is currently getting it from some per-SSP generated vendor tuple in the topology file.
@dragosht please take a look at dmic.m4 for an example of how we add 2 sets of PDM_TUPLES() for the DMIC's. You might have to do something similar to it. Basically, if you have the same set of tokens, you need to have something like this ine the conf file: ie tuples."short.pdm0" and tuples."short.pdm1".
Is this helpful?
SectionVendorTuples."DAICONFIG.DMIC0_pdm_tuples" {
tokens "sof_dmic_pdm_tokens"
tuples."short.pdm0" {
SOF_TKN_INTEL_DMIC_PDM_CTRL_ID "0"
SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable "1"
SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable "1"
SOF_TKN_INTEL_DMIC_PDM_POLARITY_A "0"
SOF_TKN_INTEL_DMIC_PDM_POLARITY_B "0"
SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE "0"
SOF_TKN_INTEL_DMIC_PDM_SKEW "0"
}
@ranj063 Yes, this will probably be the way to deal with it. And then the driver will somehow need to get the right value of ssp.sample_valid_bits based on which hw_config it is using ...
Ack, AFAIK all is now merged. Let's have @plbossart as the reported also have a say, but unless he objects (and there's some aspect not covered by Bluetooth), let's go ahead and close.
Activity
lgirdwood commentedon Mar 11, 2019
This also needs to export an enum kcontrol for each SSP port that has > 1 configuration in order for userspace to select the correct configuration based on use case.
plbossart commentedon Mar 11, 2019
that's not the ask for now. The topology can pass multiple configurations to the kernel (32 IRRC), but we only deal with the first in the kernel. We would want to limit any userspace interaction and possibly select the configuration based e.g. on sampling frequency and channels.
dragosht commentedon Mar 26, 2019
@plbossart I have some changes available for this issue at dragosht@2c4b7a2 . Basically, generating multiple HWConfig sections and referencing those from the BE section seems to work, but I haven't yet figured out how to deal with having multiple SOF_TKN_INTEL_SSP_SAMPLE_BITS values.
So for instance, having 2 HW configs like this:
would require for the config->ssp.sample_valid_bits to get initialized to either 16 or 32 bits, based on what configuration is being used. But I see the driver is currently getting it from some per-SSP generated vendor tuple in the topology file.
ranj063 commentedon Mar 26, 2019
@dragosht please take a look at dmic.m4 for an example of how we add 2 sets of PDM_TUPLES() for the DMIC's. You might have to do something similar to it. Basically, if you have the same set of tokens, you need to have something like this ine the conf file: ie tuples."short.pdm0" and tuples."short.pdm1".
Is this helpful?
SectionVendorTuples."DAICONFIG.DMIC0_pdm_tuples" {
tokens "sof_dmic_pdm_tokens"
tuples."short.pdm0" {
SOF_TKN_INTEL_DMIC_PDM_CTRL_ID "0"
SOF_TKN_INTEL_DMIC_PDM_MIC_A_Enable "1"
SOF_TKN_INTEL_DMIC_PDM_MIC_B_Enable "1"
SOF_TKN_INTEL_DMIC_PDM_POLARITY_A "0"
SOF_TKN_INTEL_DMIC_PDM_POLARITY_B "0"
SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE "0"
SOF_TKN_INTEL_DMIC_PDM_SKEW "0"
}
}
dragosht commentedon Mar 28, 2019
@ranj063 Yes, this will probably be the way to deal with it. And then the driver will somehow need to get the right value of ssp.sample_valid_bits based on which hw_config it is using ...
wenqingfu commentedon Mar 28, 2019
thesofproject/linux#758
lgirdwood commentedon Jan 27, 2020
@slawblauciak I've put you down as the FW owner since the PR is almost done now. It looks like @fredoh9 ran out of time.
lgirdwood commentedon Aug 18, 2020
Moving to v1.7 and making this notable.
lgirdwood commentedon Jan 12, 2021
@juimonen any update here - would like to close for v1.7
lgirdwood commentedon May 10, 2021
@kv2019i @juimonen @ranj063 do we have this all upstream now ? if lets close.
kv2019i commentedon May 11, 2021
Ack, AFAIK all is now merged. Let's have @plbossart as the reported also have a say, but unless he objects (and there's some aspect not covered by Bluetooth), let's go ahead and close.
plbossart commentedon May 11, 2021
it only took two years :-)