@@ -1423,7 +1423,7 @@ static int snd_sof_get_hw_config_params(struct snd_sof_dev *sdev, struct snd_sof
1423
1423
1424
1424
static int
1425
1425
snd_sof_get_nhlt_endpoint_data (struct snd_sof_dev * sdev , struct snd_sof_dai * dai ,
1426
- bool single_format ,
1426
+ bool single_bitdepth ,
1427
1427
struct snd_pcm_hw_params * params , u32 dai_index ,
1428
1428
u32 linktype , u8 dir , u32 * * dst , u32 * len )
1429
1429
{
@@ -1446,7 +1446,7 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
1446
1446
* Look for 32-bit blob first instead of 16-bit if copier
1447
1447
* supports multiple formats
1448
1448
*/
1449
- if (bit_depth == 16 && !single_format ) {
1449
+ if (bit_depth == 16 && !single_bitdepth ) {
1450
1450
dev_dbg (sdev -> dev , "Looking for 32-bit blob first for DMIC\n" );
1451
1451
format_change = true;
1452
1452
bit_depth = 32 ;
@@ -1494,7 +1494,7 @@ snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai
1494
1494
bit_depth = params_width (params );
1495
1495
format_change = false;
1496
1496
get_new_blob = true;
1497
- } else if (linktype == SOF_DAI_INTEL_DMIC && !single_format ) {
1497
+ } else if (linktype == SOF_DAI_INTEL_DMIC && !single_bitdepth ) {
1498
1498
/*
1499
1499
* The requested 32-bit blob (no format change for the
1500
1500
* 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
1550
1550
#else
1551
1551
static int
1552
1552
snd_sof_get_nhlt_endpoint_data (struct snd_sof_dev * sdev , struct snd_sof_dai * dai ,
1553
- bool single_format ,
1553
+ bool single_bitdepth ,
1554
1554
struct snd_pcm_hw_params * params , u32 dai_index ,
1555
1555
u32 linktype , u8 dir , u32 * * dst , u32 * len )
1556
1556
{
1557
1557
return 0 ;
1558
1558
}
1559
1559
#endif
1560
1560
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 )
1564
1564
{
1565
1565
struct sof_ipc4_audio_format * fmt ;
1566
1566
u32 valid_bits ;
@@ -1591,7 +1591,7 @@ sof_ipc4_prepare_dai_copier(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,
1591
1591
struct snd_pcm_hw_params dai_params = * params ;
1592
1592
struct sof_ipc4_copier_data * copier_data ;
1593
1593
struct sof_ipc4_copier * ipc4_copier ;
1594
- bool single_format ;
1594
+ bool single_bitdepth ;
1595
1595
int ret ;
1596
1596
1597
1597
ipc4_copier = dai -> private ;
@@ -1605,25 +1605,25 @@ sof_ipc4_prepare_dai_copier(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,
1605
1605
* format lookup
1606
1606
*/
1607
1607
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 ,
1609
1609
available_fmt -> output_pin_fmts ,
1610
1610
available_fmt -> num_output_formats );
1611
1611
1612
1612
/* Update the dai_params with the only supported format */
1613
- if (single_format ) {
1613
+ if (single_bitdepth ) {
1614
1614
ret = sof_ipc4_update_hw_params (sdev , & dai_params ,
1615
1615
& available_fmt -> output_pin_fmts [0 ].audio_fmt ,
1616
1616
BIT (SNDRV_PCM_HW_PARAM_FORMAT ));
1617
1617
if (ret )
1618
1618
return ret ;
1619
1619
}
1620
1620
} else {
1621
- single_format = sof_ipc4_copier_is_single_format (sdev ,
1621
+ single_bitdepth = sof_ipc4_copier_is_single_bitdepth (sdev ,
1622
1622
available_fmt -> input_pin_fmts ,
1623
1623
available_fmt -> num_input_formats );
1624
1624
1625
1625
/* Update the dai_params with the only supported format */
1626
- if (single_format ) {
1626
+ if (single_bitdepth ) {
1627
1627
ret = sof_ipc4_update_hw_params (sdev , & dai_params ,
1628
1628
& available_fmt -> input_pin_fmts [0 ].audio_fmt ,
1629
1629
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,
1632
1632
}
1633
1633
}
1634
1634
1635
- ret = snd_sof_get_nhlt_endpoint_data (sdev , dai , single_format ,
1635
+ ret = snd_sof_get_nhlt_endpoint_data (sdev , dai , single_bitdepth ,
1636
1636
& dai_params ,
1637
1637
ipc4_copier -> dai_index ,
1638
1638
ipc4_copier -> dai_type , dir ,
@@ -1667,7 +1667,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
1667
1667
u32 out_ref_rate , out_ref_channels ;
1668
1668
u32 deep_buffer_dma_ms = 0 ;
1669
1669
int output_fmt_index ;
1670
- bool single_output_format ;
1670
+ bool single_output_bitdepth ;
1671
1671
int i ;
1672
1672
1673
1673
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,
1804
1804
return ret ;
1805
1805
1806
1806
/* 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 );
1810
1810
switch (swidget -> id ) {
1811
1811
case snd_soc_dapm_aif_in :
1812
1812
case snd_soc_dapm_dai_out :
@@ -1818,7 +1818,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
1818
1818
out_ref_rate = in_fmt -> sampling_frequency ;
1819
1819
out_ref_channels = SOF_IPC4_AUDIO_FORMAT_CFG_CHANNELS_COUNT (in_fmt -> fmt_cfg );
1820
1820
1821
- if (!single_output_format )
1821
+ if (!single_output_bitdepth )
1822
1822
out_ref_valid_bits =
1823
1823
SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH (in_fmt -> fmt_cfg );
1824
1824
break ;
@@ -1827,7 +1827,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
1827
1827
case snd_soc_dapm_dai_in :
1828
1828
out_ref_rate = params_rate (fe_params );
1829
1829
out_ref_channels = params_channels (fe_params );
1830
- if (!single_output_format ) {
1830
+ if (!single_output_bitdepth ) {
1831
1831
out_ref_valid_bits = sof_ipc4_get_valid_bits (sdev , fe_params );
1832
1832
if (out_ref_valid_bits < 0 )
1833
1833
return out_ref_valid_bits ;
@@ -1845,7 +1845,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
1845
1845
* if the output format is the same across all available output formats, choose
1846
1846
* that as the reference.
1847
1847
*/
1848
- if (single_output_format ) {
1848
+ if (single_output_bitdepth ) {
1849
1849
struct sof_ipc4_audio_format * out_fmt ;
1850
1850
1851
1851
out_fmt = & available_fmt -> output_pin_fmts [0 ].audio_fmt ;
0 commit comments