* usb-autoload
[not found] ` <CAOtcWM0QhmVVhpc39=2s+FeR4MwoKpxzX9SKYMwsmHwUcd+JtA@mail.gmail.com>
@ ` Okash Khawaja
` usb-autoload Okash Khawaja
0 siblings, 1 reply; 7+ messages in thread
From: Okash Khawaja @ UTC (permalink / raw)
To: Samuel Thibault; +Cc: Speakup is a screen review system for Linux.
Hi,
When we implement our usb-serial driver, how will that driver tell
speakup_ltlk etc the minor device number?
I'm assuming this scenario: no speakup module is loaded, then user plugs in
usb synth, our usb-serial driver gets loaded which finds out minor device
number, and then loads something like speakup_ltlk and passes major and
minor device number to it.
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?
Thanks,
Okash
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: usb-autoload
` usb-autoload Okash Khawaja
@ ` Okash Khawaja
` usb-autoload Samuel Thibault
0 siblings, 1 reply; 7+ messages in thread
From: Okash Khawaja @ UTC (permalink / raw)
To: Samuel Thibault; +Cc: Speakup is a screen review system for Linux.
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: usb-autoload
` usb-autoload Okash Khawaja
@ ` Samuel Thibault
` usb-autoload Okash Khawaja
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Thibault @ UTC (permalink / raw)
To: Okash Khawaja; +Cc: Speakup is a screen review system for Linux.
Hello,
Okash Khawaja, on jeu. 31 août 2017 19:21:59 +0100, wrote:
> 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.
Right, that's a good thing indeed, because that makes a place where to
store the major/minor information.
I'd say it could be done this way:
- add dev variable to the speakup module, initialized to NULL
- when a USB speakup driver gets loaded, it sets ser and dev in the
speakup module, and then loads the driver module, and if not started
yet, starts it.
- when synth_init sees that speakup's dev variable is non-NULL, use that
instead of the module parameters.
Samuel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: usb-autoload
` usb-autoload Samuel Thibault
@ ` Okash Khawaja
` usb-autoload Samuel Thibault
0 siblings, 1 reply; 7+ messages in thread
From: Okash Khawaja @ UTC (permalink / raw)
To: Samuel Thibault; +Cc: Speakup is a screen review system for Linux.
Hi,
On Fri, Sep 1, 2017 at 12:44 AM, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
> Hello,
>
> Okash Khawaja, on jeu. 31 août 2017 19:21:59 +0100, wrote:
>> 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.
>
> Right, that's a good thing indeed, because that makes a place where to
> store the major/minor information.
>
> I'd say it could be done this way:
>
> - add dev variable to the speakup module, initialized to NULL
> - when a USB speakup driver gets loaded, it sets ser and dev in the
> speakup module, and then loads the driver module, and if not started
> yet, starts it.
> - when synth_init sees that speakup's dev variable is non-NULL, use that
> instead of the module parameters.
Okay this is a simpler approach so I'll use it. One thing I'll add is
to also add a synth_name variable to speakup. When setting dev we also
set synth_name so that dev override doesn't happen for some other
synth module that gets accidentally loaded between us setting
speakup's dev and us loading the synth driver module. Highly unlikely
but can potentially brick a synth, e.g. during testing.
Thanks,
Okash
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: usb-autoload
` usb-autoload Okash Khawaja
@ ` Samuel Thibault
` usb-autoload Okash Khawaja
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Thibault @ UTC (permalink / raw)
To: Okash Khawaja; +Cc: Speakup is a screen review system for Linux.
Okash Khawaja, on ven. 01 sept. 2017 16:25:12 +0100, wrote:
> One thing I'll add is to also add a synth_name variable to speakup.
Indeed :)
> Highly unlikely
"Highly unlikely" usually means it will happen :)
Samuel, who got "highly unlikely" bugs in the face when going from 10MB
files to 10GB files :)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: usb-autoload
` usb-autoload Samuel Thibault
@ ` Okash Khawaja
` usb-autoload Samuel Thibault
0 siblings, 1 reply; 7+ messages in thread
From: Okash Khawaja @ UTC (permalink / raw)
To: Samuel Thibault; +Cc: Speakup is a screen review system for Linux.
On Fri, Sep 1, 2017 at 4:27 PM, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
> Okash Khawaja, on ven. 01 sept. 2017 16:25:12 +0100, wrote:
>> One thing I'll add is to also add a synth_name variable to speakup.
>
> Indeed :)
>
>> Highly unlikely
>
> "Highly unlikely" usually means it will happen :)
>
> Samuel, who got "highly unlikely" bugs in the face when going from 10MB
> files to 10GB files :)
Haha... seems like you need to constantly plan for bad karma.
Will keep that in mind
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: usb-autoload
` usb-autoload Okash Khawaja
@ ` Samuel Thibault
0 siblings, 0 replies; 7+ messages in thread
From: Samuel Thibault @ UTC (permalink / raw)
To: Okash Khawaja; +Cc: Speakup is a screen review system for Linux.
Okash Khawaja, on ven. 01 sept. 2017 16:52:47 +0100, wrote:
> Haha... seems like you need to constantly plan for bad karma.
Writing code for a long time clearly defines some karma. Whatever you
have put under the carpet will definitely bite someday. Hopefully not
you because you'll have flown away before it bites :)
Samuel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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
` usb-autoload Okash Khawaja
` usb-autoload Samuel Thibault
` usb-autoload Okash Khawaja
` usb-autoload Samuel Thibault
` usb-autoload Okash Khawaja
` usb-autoload Samuel Thibault
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).