[alsa-devel] [RFC] tty (or char) bus?
samuel.thibault at ens-lyon.org
Fri Jul 17 19:54:28 CEST 2009
Janusz Krzysztofik, le Tue 14 Jul 2009 17:31:23 +0200, a écrit :
> In my attempt to add support for contols to a voice modem codec sound
> device driver, I found that in order to talk to the modem, it would be
> convenient if I can get access to a tty device from inside the kernel in
> a way similiar to that available form userspace.
> AFAICS, even if tty lowlevel write() could be used unmodified, a
> convenient way of reading characters from a tty is missing and should
> be implemented in a line discipline. Please correct me if I am wrong.
Have you seen the receive_buf line discipline hook? Indeed it's not a
read() operation as from userland, but at least you can get the data
from the tty that way.
> OTOH, I found that some kind of abstraction layer for acccessing devices
> over a tty could be convenient. Instead of allocating a new line
> discipline for each specific device, sometimes found on a specific board
> only, why not just create a new bus type?
I'd tend to agree with you, as I also have a use case for that: braille
& speech synthesis devices. However for now I haven't found a really
convincing argument why line disciplines aren't enough.
More information about the Alsa-devel