Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

tvp5158 audio error

$
0
0

Hi,

TI8148DMEO board TVP5158 use McAsp0, and our board used McAsp1, the hope can someone help me, I now thought other solution.

I use 8148 platform, packages version number is DVRRDK_02. 00.00.23. Use TVP5158 recorded in files.Our tvp5158 is taken up in McAsp1 it.

Error information:

1: Set   Audio Storage Path
 2: Start Audio Capture
 3: Stop  Audio Capture
 4: Start Audio Playback
 5: Stop  Audio Playback
 6: Set Audio Capture Configuration

 p: Previous Menu

 Enter Choice: 1
 
 Enter file write path : /home
 
 Selected file write path [/home]
 
Store path set to /home
Trying to set storage path to /home

 ===================
 Audio Settings Menu
 ===================

 1: Set   Audio Storage Path
 2: Start Audio Capture
 3: Stop  Audio Capture
 4: Start Audio Playback
 5: Stop  Audio Playback
 6: Set Audio Capture Configuration

 p: Previous Menu

 Enter Choice: 2
 
 Select AUDIO CAPTURE CH ID [0 .. 3] : 0
 
 Selected CH ID = 0
 
 
Removing /home/01/record01.pcm
Removing /home/01/record02.pcm
Removing /home/01/record03.pcm
Removing /home/01/record04.pcm
Removing /home/01/record05.pcm
Removing /home/01/record06.pcm
Removing /home/01/record07.pcm
Removing /home/01/record08.pcm
Removing /home/01/record09.pcm
Removing /home/01/record10.pcm
AUDIO >>  opened plughw:1,0 device
 [ SOUND ] set codec DAI configuration: sound/soc/davinci/davinci-evm.c : evm_hw_params : 102 name[TVP5158AUDIO]
 [ SOUND ] set cpu DAI configuration: sound/soc/davinci/davinci-evm.c : evm_hw_params : 119 name[TVP5158AUDIO]
 

 ===================
 Audio Settings Menu
 ===================

 1: Set   Audio Storage Path
 2: Start Audio Capture
 3: Stop  Audio Capture
 4: Start Audio Playback
 5: Stop  Audio Playback
 6: Set Audio Capture Configuration

 p: Previous Menu

 Enter Choice: Opened /home/01/ [ SOUND ] : sound/soc/davinci/davinci-mcasp.c : davinci_mcasp_start : 410
 [ SOUND ] : sound/soc/davinci/davinci-mcasp.c : mcasp_start_rx : 352
[ AUDIO ] : sound/core/pcm_lib.c : 1733 : name=subdevice #0
record01.pcm for recording..
capture write error (DMA or IRQ trouble?)
 AUDIO >> read f [ SOUND ] : sound/soc/davinci/davinci-mcasp.c : davinci_mcasp_stop : 440
 [ SOUND ] : sound/soc/davinci/davinci-mcasp.c : mcasp_stop_rx : 426
rom audio interface failed (Input/output error)
 AUDIO >>  CAPTURE ERROR Input/output error, capture wont continue...
AUDIO >> Device closed

Below is my fix:

1. arch/arm/mach-omap2/devices.c static struct snd_platform_data ti8148_evm_snd_data_tvp5158 = {
-    .tx_dma_offset    = 0x46000000,
-    .rx_dma_offset    = 0x46000000,
+    .tx_dma_offset    = 0x46400000,
+    .rx_dma_offset    = 0x46400000,
     .op_mode    = DAVINCI_MCASP_IIS_MODE,
     .num_serializer = ARRAY_SIZE(ti8148_iis_serializer_direction_tvp5158),
     .tdm_slots    = 4,    /* Number of channels in TVP5158 - Set 16 for 16 channel capture */

}

+static struct resource ti81xx_mcasp1_resource[] = {
+    {
+        .name = "mcasp1",
+        .start = TI81XX_ASP1_BASE,
+        .end = TI81XX_ASP1_BASE + (SZ_1K * 12) - 1,
+        .flags = IORESOURCE_MEM,
+    },
+    /* TX event */
+    {
+        .start = TI81XX_DMA_MCASP1_AXEVT,
+        .end = TI81XX_DMA_MCASP1_AXEVT,
+        .flags = IORESOURCE_DMA,
+    },
+    /* RX event */
+    {
+        .start = TI81XX_DMA_MCASP1_AREVT,
+        .end = TI81XX_DMA_MCASP1_AREVT,
+        .flags = IORESOURCE_DMA,
+    },
+};

+static struct platform_device ti81xx_mcasp1_device = {
+    .name = "davinci-mcasp",
+    .id = 1,
+    .num_resources = ARRAY_SIZE(ti81xx_mcasp1_resource),
+    .resource = ti81xx_mcasp1_resource,
+};

 void __init ti81xx_register_mcasp(int id, struct snd_platform_data *pdata)
 {
     ti81xx_mcasp_device.dev.platform_data = pdata;
     platform_device_register(&ti81xx_mcasp_device);
-    ti81xx_mcasp0_device.dev.platform_data = &ti8148_evm_snd_data_tvp5158;
-    platform_device_register(&ti81xx_mcasp0_device);
+    ti81xx_mcasp1_device.dev.platform_data = &ti8148_evm_snd_data_tvp5158;
+    platform_device_register(&ti81xx_mcasp1_device);
 }

2 . sound/soc/davinci/davinci-evm.c

 static struct snd_soc_dai_link ti81xx_evm_dai_tvp5158 = {
         .name = "TVP5158AUDIO",
         .stream_name = "TVP-PCM",
-        .cpu_dai_name= "davinci-mcasp.0",
+    .cpu_dai_name= "davinci-mcasp.1",
         .codec_dai_name = "tvp5158-hifi",
         .platform_name ="davinci-pcm-audio",
         .codec_name = "tvp5158-codec.1-0058",

3 sound/soc/davinci/davinci-mcasp.c

 static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
     {
-        .name        = "davinci-mcasp.0",
+        .name        = "davinci-mcasp.1",
         .playback    = {
             .channels_min    = 2,
             .channels_max     = 2,
@@ -974,7 +980,7 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
 
     },
     {
-        "davinci-mcasp.1",
+        "davinci-mcasp.0",
         .playback     = {
             .channels_min    = 1,
             .channels_max    = 384,


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>