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
[FEATURE] topology1: bundle SSP config and DAI format definitions per codec driver #6961
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
@ranj063 we kind of do, the copier has a format and so does the dai. If you have a copier that deals with S16_LE and a DAI that works with S32_LE, something will be off.
@ranj063 we kind of do, the copier has a format and so does the dai. If you have a copier that deals with S16_LE and a DAI that works with S32_LE, something will be off.
@plbossart I'm not sure what you meant by "copier has a format and so does the DAI". Can you please poing me to where we set the formats in topology?
@plbossart & @ranj063 So what should be done here? Check and barf if copier output format has bit depths other than what is configured in the DAI? (No idea yet how accomplish that, but just trying get some understanding about the issue.)
I think a good check would be to verify that the bit clock makes sense, but I don't see where the sampling frequency or fsync are specified. Also we could double-check that the valid_bit_depth and the tdm_slot_width are compatible, the former needs to be smaller than the latter otherwise we will truncate the data.
I guess the easiest would to do some sanity checks in the driver, if the topology makes sense. Its a little bit late in the chain, but then again, nobody should release a topology without testing it, and on the other hand the alsatplg is a compiler that does not and should not understand the semantics of the topology file. Something in the middle would be some intermediate validator... but yes, I think it should be quite Ok for the driver to go through the loaded topology and give an error if its not consistent. @ranj063 , or do you have a better idea?
Activity
lgirdwood commentedon Jan 18, 2023
@juimonen @ranj063 @jsarha are we good here for topology2 ? If not, can we discuss and capture it in the topology2 Feature issue. Thanks.
kv2019i commentedon Mar 6, 2023
Feature cufoff week for v2.5 and this is not assigned to anyone, so moving forward.
lgirdwood commentedon May 11, 2023
@jsarha pls confirm this is not issue with topology2.
ranj063 commentedon May 25, 2023
@lgirdwood as of today we do not have a DAI format in topology2. So I dont see the issue there
plbossart commentedon May 25, 2023
@ranj063 we kind of do, the copier has a format and so does the dai. If you have a copier that deals with S16_LE and a DAI that works with S32_LE, something will be off.
lgirdwood commentedon May 31, 2023
Ok, too late to fix for v2.6 intplg2, lets make sure we are covered for v2.7.
ranj063 commentedon May 31, 2023
@plbossart I'm not sure what you meant by "copier has a format and so does the DAI". Can you please poing me to where we set the formats in topology?
plbossart commentedon May 31, 2023
@ranj063 the DAI has configuration parameters which MUST be aligned with the copier setup.
jsarha commentedon Jun 1, 2023
@plbossart & @ranj063 So what should be done here? Check and barf if copier output format has bit depths other than what is configured in the DAI? (No idea yet how accomplish that, but just trying get some understanding about the issue.)
plbossart commentedon Jun 1, 2023
I think a good check would be to verify that the bit clock makes sense, but I don't see where the sampling frequency or fsync are specified. Also we could double-check that the valid_bit_depth and the tdm_slot_width are compatible, the former needs to be smaller than the latter otherwise we will truncate the data.
But I have no idea if we can do those checks...
jsarha commentedon Jun 1, 2023
I guess the easiest would to do some sanity checks in the driver, if the topology makes sense. Its a little bit late in the chain, but then again, nobody should release a topology without testing it, and on the other hand the alsatplg is a compiler that does not and should not understand the semantics of the topology file. Something in the middle would be some intermediate validator... but yes, I think it should be quite Ok for the driver to go through the loaded topology and give an error if its not consistent. @ranj063 , or do you have a better idea?
lgirdwood commentedon Jul 4, 2023
@jsarha @ranj063 do we have a plan for v2.7 ?
plbossart commentedon Jul 4, 2023
I don't think we have a plan and I vote to close the issue. It's just too much work for limited benefits, topology1 is behind us (I hope)