@@ -1423,7 +1423,7 @@ static int snd_sof_get_hw_config_params(struct snd_sof_dev *sdev, struct snd_sof
14231423
14241424static int
14251425snd_sof_get_nhlt_endpoint_data (struct snd_sof_dev * sdev , struct snd_sof_dai * dai ,
1426- bool single_format ,
1426+ bool single_bitdepth ,
14271427 struct snd_pcm_hw_params * params , u32 dai_index ,
14281428 u32 linktype , u8 dir , u32 * * dst , u32 * len )
14291429{
@@ -1446,7 +1446,7 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
14461446 * Look for 32-bit blob first instead of 16-bit if copier
14471447 * supports multiple formats
14481448 */
1449- if (bit_depth == 16 && !single_format ) {
1449+ if (bit_depth == 16 && !single_bitdepth ) {
14501450 dev_dbg (sdev -> dev , "Looking for 32-bit blob first for DMIC\n" );
14511451 format_change = true;
14521452 bit_depth = 32 ;
@@ -1494,7 +1494,7 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
14941494 bit_depth = params_width (params );
14951495 format_change = false;
14961496 get_new_blob = true;
1497- } else if (linktype == SOF_DAI_INTEL_DMIC && !single_format ) {
1497+ } else if (linktype == SOF_DAI_INTEL_DMIC && !single_bitdepth ) {
14981498 /*
14991499 * The requested 32-bit blob (no format change for the
15001500 * blob request) was not found in NHLT table, try to
@@ -1550,17 +1550,17 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
15501550#else
15511551static int
15521552snd_sof_get_nhlt_endpoint_data (struct snd_sof_dev * sdev , struct snd_sof_dai * dai ,
1553- bool single_format ,
1553+ bool single_bitdepth ,
15541554 struct snd_pcm_hw_params * params , u32 dai_index ,
15551555 u32 linktype , u8 dir , u32 * * dst , u32 * len )
15561556{
15571557 return 0 ;
15581558}
15591559#endif
15601560
1561- bool sof_ipc4_copier_is_single_format (struct snd_sof_dev * sdev ,
1562- struct sof_ipc4_pin_format * pin_fmts ,
1563- u32 pin_fmts_size )
1561+ bool sof_ipc4_copier_is_single_bitdepth (struct snd_sof_dev * sdev ,
1562+ struct sof_ipc4_pin_format * pin_fmts ,
1563+ u32 pin_fmts_size )
15641564{
15651565 struct sof_ipc4_audio_format * fmt ;
15661566 u32 valid_bits ;
@@ -1591,7 +1591,7 @@ sof_ipc4_prepare_dai_copier(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,
15911591 struct snd_pcm_hw_params dai_params = * params ;
15921592 struct sof_ipc4_copier_data * copier_data ;
15931593 struct sof_ipc4_copier * ipc4_copier ;
1594- bool single_format ;
1594+ bool single_bitdepth ;
15951595 int ret ;
15961596
15971597 ipc4_copier = dai -> private ;
@@ -1605,25 +1605,25 @@ sof_ipc4_prepare_dai_copier(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,
16051605 * format lookup
16061606 */
16071607 if (dir == SNDRV_PCM_STREAM_PLAYBACK ) {
1608- single_format = sof_ipc4_copier_is_single_format (sdev ,
1608+ single_bitdepth = sof_ipc4_copier_is_single_bitdepth (sdev ,
16091609 available_fmt -> output_pin_fmts ,
16101610 available_fmt -> num_output_formats );
16111611
16121612 /* Update the dai_params with the only supported format */
1613- if (single_format ) {
1613+ if (single_bitdepth ) {
16141614 ret = sof_ipc4_update_hw_params (sdev , & dai_params ,
16151615 & available_fmt -> output_pin_fmts [0 ].audio_fmt ,
16161616 BIT (SNDRV_PCM_HW_PARAM_FORMAT ));
16171617 if (ret )
16181618 return ret ;
16191619 }
16201620 } else {
1621- single_format = sof_ipc4_copier_is_single_format (sdev ,
1621+ single_bitdepth = sof_ipc4_copier_is_single_bitdepth (sdev ,
16221622 available_fmt -> input_pin_fmts ,
16231623 available_fmt -> num_input_formats );
16241624
16251625 /* Update the dai_params with the only supported format */
1626- if (single_format ) {
1626+ if (single_bitdepth ) {
16271627 ret = sof_ipc4_update_hw_params (sdev , & dai_params ,
16281628 & available_fmt -> input_pin_fmts [0 ].audio_fmt ,
16291629 BIT (SNDRV_PCM_HW_PARAM_FORMAT ));
@@ -1632,7 +1632,7 @@ sof_ipc4_prepare_dai_copier(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,
16321632 }
16331633 }
16341634
1635- ret = snd_sof_get_nhlt_endpoint_data (sdev , dai , single_format ,
1635+ ret = snd_sof_get_nhlt_endpoint_data (sdev , dai , single_bitdepth ,
16361636 & dai_params ,
16371637 ipc4_copier -> dai_index ,
16381638 ipc4_copier -> dai_type , dir ,
@@ -1667,7 +1667,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
16671667 u32 out_ref_rate , out_ref_channels ;
16681668 u32 deep_buffer_dma_ms = 0 ;
16691669 int output_fmt_index ;
1670- bool single_output_format ;
1670+ bool single_output_bitdepth ;
16711671 int i ;
16721672
16731673 dev_dbg (sdev -> dev , "copier %s, type %d" , swidget -> widget -> name , swidget -> id );
@@ -1804,9 +1804,9 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
18041804 return ret ;
18051805
18061806 /* set the reference params for output format selection */
1807- single_output_format = sof_ipc4_copier_is_single_format (sdev ,
1808- available_fmt -> output_pin_fmts ,
1809- available_fmt -> num_output_formats );
1807+ single_output_bitdepth = sof_ipc4_copier_is_single_bitdepth (sdev ,
1808+ available_fmt -> output_pin_fmts ,
1809+ available_fmt -> num_output_formats );
18101810 switch (swidget -> id ) {
18111811 case snd_soc_dapm_aif_in :
18121812 case snd_soc_dapm_dai_out :
@@ -1818,7 +1818,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
18181818 out_ref_rate = in_fmt -> sampling_frequency ;
18191819 out_ref_channels = SOF_IPC4_AUDIO_FORMAT_CFG_CHANNELS_COUNT (in_fmt -> fmt_cfg );
18201820
1821- if (!single_output_format )
1821+ if (!single_output_bitdepth )
18221822 out_ref_valid_bits =
18231823 SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH (in_fmt -> fmt_cfg );
18241824 break ;
@@ -1827,7 +1827,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
18271827 case snd_soc_dapm_dai_in :
18281828 out_ref_rate = params_rate (fe_params );
18291829 out_ref_channels = params_channels (fe_params );
1830- if (!single_output_format ) {
1830+ if (!single_output_bitdepth ) {
18311831 out_ref_valid_bits = sof_ipc4_get_valid_bits (sdev , fe_params );
18321832 if (out_ref_valid_bits < 0 )
18331833 return out_ref_valid_bits ;
@@ -1845,7 +1845,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
18451845 * if the output format is the same across all available output formats, choose
18461846 * that as the reference.
18471847 */
1848- if (single_output_format ) {
1848+ if (single_output_bitdepth ) {
18491849 struct sof_ipc4_audio_format * out_fmt ;
18501850
18511851 out_fmt = & available_fmt -> output_pin_fmts [0 ].audio_fmt ;
0 commit comments