Skip to content

[FEATURE] topology1: bundle SSP config and DAI format definitions per codec driver #6961

Description

@johnylin76

Is your feature request related to a problem? Please describe.
In present topologies, SSP_CONFIG and DAI format (FMT) are defined separately, while the bitwidth under SSP_CONFIG_DATA and DAI data format for AMP SSP have to be unified. There is no checker for that so it's easy to be misaligned by careless changes (e.g. #6956)

Describe the solution you'd like
Bundle SSP_CONFIG and DAI format definitions together, and use the codec driver name as selection key.
Definitions can be listed in a specific m4 file, e.g. platform/intel/amp-codec-config.m4

ifelse(
CODEC, `MAX98357A', `
    define(`AMP_SSP_CONFIG', `
        SSP_CONFIG(I2S, SSP_CLOCK(mclk, 19200000, 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, SPK_SSP_INDEX, 16))')
    define(`AMP_DAI_FMT', `s16le')',
CODEC, `MAX98360A', `
......

Describe alternatives you've considered

  1. Implement a checker to assert the alignment.
  2. Deduce the bitwidth under SSP_CONFIG_DATA from DAI format or vice versa.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions