Kaynağa Gözat

更新asound.conf,关于tts的播放,打开声卡的时候要open这个tts_play节点

luyuan_t440 3 yıl önce
ebeveyn
işleme
58d260439b

+ 39 - 1
buildroot-external/board/arkmicro/ark1668e_devb_emmc/rootfs_overlay/etc/asound.conf

@@ -11,6 +11,21 @@ pcm.!dmix {
 #               rate 44100
         }
 }
+
+pcm.!tts_dmix {
+        type dmix
+        ipc_key 6789
+        ipc_key_add_uid yes
+        slave {
+                pcm "hw:0,1"
+#               period_time 0
+                period_size 1024
+                buffer_size 16384
+               format S16_LE
+               rate 22050
+        }
+}
+
 pcm.!dsnoop {
         type dsnoop
         ipc_key 5778
@@ -91,7 +106,20 @@ pcm.softvol4 {
     min_dB            -51.0  
     max_dB            -0.0 
     resolution        128                                                         
-}  
+}
+pcm.softvol5 {               
+    type            softvol  
+    slave {                     
+        pcm         "tts_dmix"      #redirect the output to dmix (instead of "hw:0,0")
+    }                           
+    control {                   
+        name        "softmaster4"       #override the PCM slider to set the softvol volume level globally
+        card        0           
+    }                           
+    min_dB            -51.0  
+    max_dB            -0.0 
+    resolution        128                                                         
+} 
 pcm.asymed {
         type asym
         playback.pcm "softvol"
@@ -103,6 +131,16 @@ pcm.!default {
         slave.pcm "asymed"
 }
 
+pcm.asymed_tts {                                                                                       
+        type asym                                                                                        
+        playback.pcm "softvol5"
+}                                                                                                        
+                                                                                                         
+pcm.!tts_play {      
+        type plug                                                                                        
+        slave.pcm "asymed_tts"
+} 
+
 ctl.mixer0 {
         type hw
         card 0