This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Voice codec on arago kernel



I'm waiting for DVSDK release and I'm using r36 arago kernel.

I notice it is still not supported voice codec CONFIG_SND_SOC_CQ0093VC.

So I try a backport from 2.6.34 Kevin Hilman  to 2.6.32 arago one ofthe following patches

MFD: DaVinci Voice Codec
ASoC: DaVinci: CQ93VC Voice Codec
ASoC: DaVinci: Voice Codec Interface

It compiles and all is recognized, but I have dma error.

Any idea what is the best to do?

The problem is in sound/soc/davinci/davinci-pcm.c file.

Here you are the log.

aplay tone1KHzMono_8000.wav
Playing WAVE 'tone1KHzMono_8000.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
davinci_pcm_prepare - 203
davinci_pcm_enqueue_dma - 77: period=2000,dma_offset=0,dma_pos=-2044854272
davinci_pcm: audio_set_dma_params_play channel = 79 dma_ptr = 861e0000 period_size=7d0
davinci_pcm_enqueue_dma - 84: data_type=0
davinci_pcm_enqueue_dma - 77: period=2000,dma_offset=2000,dma_pos=-2044852272
davinci_pcm: audio_set_dma_params_play channel = 79 dma_ptr = 861e07d0 period_size=7d0
davinci_pcm_enqueue_dma - 84: data_type=0
aplay: pcm_write:1528: write error: Input/output error

  • After having bakported voice codec patch series from 2.6.34 to 2.6.32 we have found the issue about dma.
    Here you are the patch.
    If needed I can provide also the adaption of Miguel Aguilar patch series to 2.6.32 arago dm365 kernel:
           From 80a6609eeb0995732318c7ab672767e39a111f3b Mon Sep 17 00:00:00 2001
           From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
           Date: Thu, 11 Mar 2010 09:32:42 -0600
           Subject: [PATCH 1/3] ASoC: DaVinci: Voice Codec Interface
       
           From 94a532f7156582ec7459f21baa4de6665773974a Mon Sep 17 00:00:00 2001
           From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
           Date: Thu, 11 Mar 2010 09:32:59 -0600
           Subject: [PATCH 2/3] ASoC: DaVinci: CQ93VC Voice Codec
       
           From 45a057ea5c2016f233c3c4209fd53b4f11b7d0e6 Mon Sep 17 00:00:00 2001
           From: Miguel Aguilar <miguel.aguilar@ridgerun.com>
           Date: Thu, 11 Mar 2010 09:32:21 -0600
           Subject: [PATCH 3/3] MFD: DaVinci Voice Codec

     

    commit 8b61add93bdb0440569ab9c1fecfb2790d8cbd02
    Author: Rodolfo Giometti <giometti@linux.it>
    Date:   Sun Aug 29 17:59:07 2010 +0200

        davinci davinci-vcif: voice Codec Interface fix up
       
        Fix has two steps:
       
        1) A missing "break" whose prevents an invalid davinci_vcif_stop()
           call after davinci_vcif_start().
       
        2) A wrong C programming style whose requires "dma_params" field to be
           the first field of the struct davinci_vcif_dev.
       
        Signed-off-by: Rodolfo Giometti <giometti@linux.it>

    diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
    index f3c275d..ff64aad 100644
    --- a/sound/soc/davinci/davinci-vcif.c
    +++ b/sound/soc/davinci/davinci-vcif.c
    @@ -46,8 +46,8 @@
     } while (0)
     
     struct davinci_vcif_dev {
    -       struct davinci_vc *davinci_vc;
            struct davinci_pcm_dma_params   dma_params[2];
    +       struct davinci_vc *davinci_vc;
     };
     
     static void davinci_vcif_start(struct snd_pcm_substream *substream)
    @@ -159,6 +159,7 @@ static int davinci_vcif_trigger(struct snd_pcm_substream *substream, int cmd,
            case SNDRV_PCM_TRIGGER_RESUME:
            case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
                    davinci_vcif_start(substream);
    +               break;
            case SNDRV_PCM_TRIGGER_STOP:
            case SNDRV_PCM_TRIGGER_SUSPEND:
            case SNDRV_PCM_TRIGGER_PAUSE_PUSH: