@@ -1837,16 +1837,24 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,
1837
1837
{
1838
1838
struct nhlt_specific_cfg * cfg ;
1839
1839
struct skl_pipe * pipe = mconfig -> pipe ;
1840
+ struct skl_pipe_params save = * pipe -> p_params ;
1840
1841
struct skl_pipe_fmt * pipe_fmt ;
1841
1842
struct skl_dev * skl = get_skl_ctx (dai -> dev );
1842
1843
int link_type = skl_tplg_be_link_type (mconfig -> dev_type );
1843
1844
u8 dev_type = skl_tplg_be_dev_type (mconfig -> dev_type );
1845
+ int ret ;
1844
1846
1845
1847
skl_tplg_fill_dma_id (mconfig , params );
1846
1848
1847
1849
if (link_type == NHLT_LINK_HDA )
1848
1850
return 0 ;
1849
1851
1852
+ * pipe -> p_params = * params ;
1853
+ ret = skl_tplg_get_pipe_config (skl , mconfig );
1854
+ if (ret )
1855
+ goto err ;
1856
+
1857
+ dev_dbg (skl -> dev , "%s using pipe config: %d\n" , __func__ , pipe -> pipe_config_idx );
1850
1858
if (pipe -> direction == SNDRV_PCM_STREAM_PLAYBACK )
1851
1859
pipe_fmt = & pipe -> configs [pipe -> pipe_config_idx ].out_fmt ;
1852
1860
else
@@ -1865,10 +1873,15 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,
1865
1873
dev_err (dai -> dev , "Blob NULL for id:%d type:%d dirn:%d ch:%d, freq:%d, fmt:%d\n" ,
1866
1874
mconfig -> vbus_id , link_type , params -> stream ,
1867
1875
params -> ch , params -> s_freq , params -> s_fmt );
1868
- return - EINVAL ;
1876
+ ret = - EINVAL ;
1877
+ goto err ;
1869
1878
}
1870
1879
1871
1880
return 0 ;
1881
+
1882
+ err :
1883
+ * pipe -> p_params = save ;
1884
+ return ret ;
1872
1885
}
1873
1886
1874
1887
static int skl_tplg_be_set_src_pipe_params (struct snd_soc_dai * dai ,
0 commit comments