@@ -1028,7 +1028,7 @@ static int fsl_sai_dai_resume(struct snd_soc_dai *cpu_dai)
1028
1028
return 0 ;
1029
1029
}
1030
1030
1031
- static struct snd_soc_dai_driver fsl_sai_dai = {
1031
+ static struct snd_soc_dai_driver fsl_sai_dai_template = {
1032
1032
.probe = fsl_sai_dai_probe ,
1033
1033
.playback = {
1034
1034
.stream_name = "CPU-Playback" ,
@@ -1382,6 +1382,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
1382
1382
if (sai -> soc -> reg_offset == 8 )
1383
1383
fsl_sai_regmap_config = fsl_sai_v3_regmap_config ;
1384
1384
1385
+ memcpy (& sai -> cpu_dai_drv , & fsl_sai_dai_template ,
1386
+ sizeof (fsl_sai_dai_template ));
1387
+
1385
1388
sai -> regmap = devm_regmap_init_mmio_clk (& pdev -> dev ,
1386
1389
NULL , base , & fsl_sai_regmap_config );
1387
1390
if (IS_ERR (sai -> regmap )) {
@@ -1467,9 +1470,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
1467
1470
/* Sync Tx with Rx as default by following old DT binding */
1468
1471
sai -> synchronous [RX ] = true;
1469
1472
sai -> synchronous [TX ] = false;
1470
- fsl_sai_dai .symmetric_rates = 1 ;
1471
- fsl_sai_dai .symmetric_channels = 1 ;
1472
- fsl_sai_dai .symmetric_samplebits = 1 ;
1473
+ sai -> cpu_dai_drv .symmetric_rates = 1 ;
1474
+ sai -> cpu_dai_drv .symmetric_channels = 1 ;
1475
+ sai -> cpu_dai_drv .symmetric_samplebits = 1 ;
1473
1476
1474
1477
if (of_find_property (np , "fsl,sai-synchronous-rx" , NULL ) &&
1475
1478
of_find_property (np , "fsl,sai-asynchronous" , NULL )) {
@@ -1486,9 +1489,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
1486
1489
/* Discard all settings for asynchronous mode */
1487
1490
sai -> synchronous [RX ] = false;
1488
1491
sai -> synchronous [TX ] = false;
1489
- fsl_sai_dai .symmetric_rates = 0 ;
1490
- fsl_sai_dai .symmetric_channels = 0 ;
1491
- fsl_sai_dai .symmetric_samplebits = 0 ;
1492
+ sai -> cpu_dai_drv .symmetric_rates = 0 ;
1493
+ sai -> cpu_dai_drv .symmetric_channels = 0 ;
1494
+ sai -> cpu_dai_drv .symmetric_samplebits = 0 ;
1492
1495
}
1493
1496
1494
1497
platform_set_drvdata (pdev , sai );
@@ -1554,7 +1557,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
1554
1557
regcache_cache_only (sai -> regmap , true);
1555
1558
1556
1559
ret = devm_snd_soc_register_component (& pdev -> dev , & fsl_component ,
1557
- & fsl_sai_dai , 1 );
1560
+ & sai -> cpu_dai_drv , 1 );
1558
1561
if (ret )
1559
1562
return ret ;
1560
1563
0 commit comments