Re: i810_audio and full duplex

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Wed Jun 21 2000 - 11:05:44 EST


I Lee Hetherington wrote:
>
> Does anyone have full duplex working with i810_audio? I know commercial
> OSS does full duplex on my hardware and perhaps ALSA as well.

Note that OSS full duplex is fundamentally broken. Using full duplex
requires that a driver force the playback settings -- 8/16 bit,
mono/stereo, block size, etc. -- to match the record settings. Even if
the hardware channels are independent of each other, OSS' ambiguity
requires that playback and record march together in lock step.

If possible, you are much better off to change the app to try this:

        /* try multiple open first. note this is API
         * change in kernel 2.[34].x */
        playback = open ("/dev/dsp0", O_RDONLY);
        record = open("/dev/dsp0", O_WRONLY);
        old_full_duplex = -1;

        /* if full duplex reported possible but we couldn't get
         * both channels independently, try to grab
         * them together
         */
        if ((cap & DSP_CAP_DUPLEX) &&
           (playback >= 0) &&
           (record < 0)) {
                close (playback);
                sleep (1);

                playback = -1;
                record = -1;
                old_full_duplex =
                        open ("/dev/dsp0", O_RDWR);
        }

-- 
Jeff Garzik              |
Building 1024            | Free beer tomorrow.
MandrakeSoft, Inc.       |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:22 EST