Re: query about snd_pcm_hw_refine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 17, 2008 at 3:15 PM, Pharaoh . <pharaoh137@xxxxxxxxx> wrote:

> Hi
>
> I get following error when trying to run  aplay with my plugin:
>
> #aplay -D myplug test.wav
>
> Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, St
> ereo
> aplay: set_params:882: Broken configuration for this PCM: no
> configurations available.
>
> After looking at the code, I figured out that its snd_pcm_hw_refine which
> is causing problem.
> It looks like following in pcm_params.c in alsa lib 1.0.13,
>
>
> int snd_pcm_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
> {
>     int res;
>
> #ifdef REFINE_DEBUG
>     snd_output_t *log;
>     snd_output_stdio_attach(&log, stderr, 0);
>
> #endif
>     printf("#####%s \n", __FUNCTION__);
>     assert(pcm && params);
> #ifdef REFINE_DEBUG
>     snd_output_printf(log, "REFINE called:\n");
>     snd_pcm_hw_params_dump(params, log);
> #endif
>     printf("#####%s calling hw_refine\n", __FUNCTION__);
>     res = pcm->ops->hw_refine(pcm->op_arg, params);
>     printf("#####% return val of hw_refine = %d\n", res);
> #ifdef REFINE_DEBUG
>     snd_output_printf(log, "refine done - result = %i\n", res);
>     snd_pcm_hw_params_dump(params, log);
>     snd_output_close(log);
> #endif
>     return res;
> }
>
> I have modified the alsa.conf for my plugin by adding following in it at
> the end,
>
> pcm.myplug {
>         type myplug
>         card 0
> }
>
> What could be the problem?
> -pharaoh.
>
>
Problem solved, I modified my alsa.conf to look like this:

pcm.myplug {
        @args [ FORMAT ]
           type myplug
           card 0
           rate 44100
           bitrate 128
           channels 2
        format $FORMAT
}


-pharaoh.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux