From: Okash Khawaja <okash.khawaja@gmail.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: "Speakup is a screen review system for Linux."
<speakup@linux-speakup.org>
Subject: Re: usb-autoload
Date: Thu, 31 Aug 2017 19:21:59 +0100 [thread overview]
Message-ID: <20170831182159.GA480@sanghar> (raw)
In-Reply-To: <CAOtcWM3jyeC3YRrqWyMjsGaaEbM9eEVnVHYxN-G2q6dcwZVBiA@mail.gmail.com>
Hi,
On Sat, Aug 26, 2017 at 03:48:40PM +0100, Okash Khawaja wrote:
> I am thinking of modifying speakup driver so that it can take in dev
> parameter after it has been loaded. Is there a simpler way?
Here's what I am thinking for usb autoload. Let's say speakup_usb_serial
is the driver which will be automatically loaded based upon usb vendor
and product id, when user plugs in native usb synth, such as triple
talk. speakup module will be pre-requisite for speakup_usb_serial so it
will already be in memory when following flow starts from inside
speakup_usb_serial. It assumes the native usb synth requires ltlk.
Functions of the form speakup.* are those exposed by speakup module.
First speakup_usb_serial will check if ltlk is already loaded
ltlk not loaded:
1. speakup.next_load_as_delayed("ltlk"): tell speakup that very next
time when ltlk is loaded, don't initialise it, i.e. don't call
do_synth_init().
2. load ltlk
3. speakup.delayed_init("ltlk", "ttyUSBX"): tell speakup to first
set dev_name of ltlk synth to ttyUSBX and then call do_synth_init
ltlk is already loaded:
1. speakup.is_initialised("ltlk")?
YES:
> do nothing as ltlk is loaded and initialised so we assume it's
being used
NO:
> speakup.delayed_init("ltlk", "ttyUSBX");
This should cover the scenario when ltlk is built into kernel.
Thanks,
Okash
next prev parent reply other threads:[~ UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAOtcWM2Wdn014m6WKMm7n6NTNzGNJEqy63P1jBOpeAk0gdxf4Q@mail.gmail.com>
[not found] ` <CAOtcWM2eSH7kcUjqZSN1Ma6=K4==_OJLBMukSOux-yNd5_KT0A@mail.gmail.com>
[not found] ` <CAOtcWM3RPzPBfVKTJhs02UVHEHj8bDWewQdhaG3ZDd0fsx5Wow@mail.gmail.com>
[not found] ` <CAOtcWM2x7AhEG+MCNvEFBfpTE874OJ_4GR9z-LAm3+XFqwJb3g@mail.gmail.com>
[not found] ` <CAOtcWM2aFQPoU61+abqxpSDUUBzynWO4z1rs8HCEheBe1c_few@mail.gmail.com>
[not found] ` <CAOtcWM3vO9K+nxyE+z0Dd3Nm5tnhkeRwNJcp_sTsPi+yD8+oGQ@mail.gmail.com>
[not found] ` <CAOtcWM0RtC8ZQK2P18TtbcDL1ghK2263+5e=PAVw0YpovSYFeA@mail.gmail.com>
[not found] ` <CAOtcWM3Qp0Nymj8Hz3=mJ59DdMSay_5qhW5zyqGOWLcHUG0qYQ@mail.gmail.com>
[not found] ` <CAOtcWM0QhmVVhpc39=2s+FeR4MwoKpxzX9SKYMwsmHwUcd+JtA@mail.gmail.com>
` usb-autoload Okash Khawaja
` Okash Khawaja [this message]
` usb-autoload Samuel Thibault
` usb-autoload Okash Khawaja
` usb-autoload Samuel Thibault
` usb-autoload Okash Khawaja
` usb-autoload Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170831182159.GA480@sanghar \
--to=okash.khawaja@gmail.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).