Skip to content

Topology: Multiple configurations for SSP DAIs #1092

Closed

Description

@plbossart

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 was filed initially as thesofproject/soft#11, moving to SOF issues since it was missed as reported by @dragosht
The matching kernel issue is thesofproject/linux#697

Activity

  1. lgirdwood commented on Mar 11, 2019

    @lgirdwood
    Member

    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.

  2. plbossart commented on Mar 11, 2019

    @plbossart
    MemberAuthor

    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.

  3. dragosht commented on Mar 26, 2019

    @dragosht

    @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:

    DAI_CONFIG(SSP, 5, 5, SSP5-Codec, 6,
               SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24576000, codec_mclk_in),
                          SSP_CLOCK(bclk, 1536000, codec_slave),
                          SSP_CLOCK(fsync, 48000, codec_slave),
                          SSP_TDM(2, 16, 3, 3),
                          SSP_CONFIG_DATA(SSP, 5, 16)),
               SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24576000, codec_mclk_in),
                          SSP_CLOCK(bclk, 3072000, codec_slave),
                          SSP_CLOCK(fsync, 48000, codec_slave),
                          SSP_TDM(2, 32, 3, 3),
                          SSP_CONFIG_DATA(SSP, 5, 32)))
    

    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.

  4. ranj063 commented on Mar 26, 2019

    @ranj063
    Collaborator

    @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"
    }

    tuples."short.pdm1" {
    	SOF_TKN_INTEL_DMIC_PDM_CTRL_ID		"1"
    	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"
    }
    

    }

  5. dragosht commented on Mar 28, 2019

    @dragosht

    @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 ...

  6. wenqingfu commented on Mar 28, 2019

    @wenqingfu
  7. added this to the 1.4 milestone on Apr 18, 2019
  8. modified the milestones: v1.4, v1.5 on Aug 30, 2019
  9. lgirdwood commented on Jan 27, 2020

    @lgirdwood
    Member

    @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.

  10. modified the milestones: v1.5, v1.6 on Feb 20, 2020
  11. lgirdwood commented on Aug 18, 2020

    @lgirdwood
    Member

    Moving to v1.7 and making this notable.

  12. modified the milestones: v1.6, v1.7 on Aug 18, 2020
  13. added
    NotableEnhancement is significant or notable for release.
    on Aug 18, 2020
  14. lgirdwood commented on Jan 12, 2021

    @lgirdwood
    Member

    @juimonen any update here - would like to close for v1.7

  15. modified the milestones: v1.7, v1.8 on Jan 22, 2021
  16. lgirdwood commented on May 10, 2021

    @lgirdwood
    Member

    @kv2019i @juimonen @ranj063 do we have this all upstream now ? if lets close.

  17. kv2019i commented on May 11, 2021

    @kv2019i
    Collaborator

    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.

  18. plbossart commented on May 11, 2021

    @plbossart
    MemberAuthor

    it only took two years :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NotableEnhancement is significant or notable for release.enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions