Hi,
grante wrote:
Writing a tty driver is what you do if you want to implement a
tty device -- a driver that creates a /dev/ttyXXX device that
implements the normal serial-port functionality. Is that what
you want?
No, this is not what I want.
I want to create a device driver for the speech codec.
And since the speech codec is attached to the controller over a serial port, my device driver needs to be able to send and receive data over the serial port.
grante wrote:
You haven't described what sort of a "device" you want. What
is it's API going to be? Do you want a character device? An
audio device for use by ALSA? A block device?
I would like to create a character device.
If one reads from the character device, the compressed speech samples (if there are any) should come out of the driver.
On the other side one should be able to write compressed speech samples to the character device.
For speech codec configuration I would like to use ioctls (e.g. to set up the speech codec bit rate).
The other end of the speech codec is a PCM interface where uncompressed PCM speech samples will go in and out.
These PCM samples will be transfered over a high speed SPI bus.
From a driver perspective this will be done in a separate ALSA driver which should not be part of the UART related discussion here.
The ALSA driver is used to create a "virtual" soundcard like interface with an audio source and sink.
To get the picture one needs to consider both interfaces (SPI for PCM and UART for compressed speech data and control):
If PCM speech samples are written to the speech codec by means of the ALSA driver, the chip will compress those speech samples.
The compressed speech packets will then appear on the serial port where they can be read by the speech codec character device driver.
Consecutively, a userland application will receive the compressed speech samples by reading from the mentioned character device.
The other way works vice versa: A userland application writes compressed speech samples to the speech codec character device.
The character device driver will transfer the compressed speech samples to the chip which in turn will decompress them.
Finally the decompressed speech samples will be available on the ALSA device.
grante wrote:
[Since your problem is a general linux question and has nothing
in particular to do with Atmel parts, this probably isn't the
best place to be asking the question.]
I already posted to the linux-embedded mailing list, but so far I did not receive a lot of answers.
Maybe I should post to the high volume linux kernel mailing list as well ?
Where would be the best place for these kind of questions ?
cheers,
knossos