At Wed, 04 Sep 2002 23:51:25 +0900,
Patrick Shirkey wrote:
> 
> Takashi Iwai wrote:
> > At Wed, 04 Sep 2002 23:32:25 +0900,
> > Patrick Shirkey wrote:
> > 
> >>I have just found that the quattro will not output an audible stream 
> >>from the external input channels until it has been made to output a 
> >>stream through the internal i/o first.
> >>
> >>This means that the direct monitor switch does not work until a file is 
> >>played internally through the card.
> >>
> >>After that everything works as expected.
> >>
> >>Is this a fixable bug or should I make a note in the online docs about it?
> > 
> > 
> > could you check whether only hw_params() (prepare()) sets up enough,
> > or do you really need to feed data to the output?
> > 
> 
> I can, how should I go about doing so?

well, just write a few codes...

#include <alsa/asoundlib.h>

int main()
{
        snd_pcm_t *pcm;
        int err;
        snd_pcm_hw_params_t hw;

        err = snd_pcm_open(&pcm, "hw:0,0", SND_PCM_STREAM_PLAYBACK, 0);
        snd_pcm_hw_params_alloca(&hw);
        err = snd_pcm_hw_params_any(pcm, hw);
        err = snd_pcm_hw_params_set_access(pcm, hw, SND_PCM_ACCESS_RW_INTERLEAVED);
        err = snd_pcm_hw_params_set_format(pcm, hw, SND_PCM_FORMAT_S16_LE);
        err = snd_pcm_hw_params_set_rate(pcm, hw, 48000, 0);
        err = snd_pcm_hw_params_set_channels(pcm, hw, 2);
        err = snd_pcm_hw_params_set_period_size(pcm, hw, 512, 0);
        err = snd_pcm_hw_params_set_buffer_size(pcm, hw, 1024, 0);
        err = snd_pcm_hw_params(pcm, hw);
        return err;
}


(not tested at all ;)


Takashi


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to