From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id C61031EFD51; Tue, 15 Nov 2016 01:24:02 -0500 (EST) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) by befuddled.reisers.ca (Postfix) with ESMTPS id 6C2681EFD48 for ; Tue, 15 Nov 2016 01:24:00 -0500 (EST) Received: by mail-it0-x22b.google.com with SMTP id q124so152057717itd.1 for ; Mon, 14 Nov 2016 22:24:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZhaD3fVqQx8uzjcm/JL+Co5mxACB6h/XTL4Z0Z5CY4E=; b=GpwySJd8vqRd9k7RVTFsAx5hBFW1ePd+nhYOHBBqzO9yDdukFBFW3NlGw2u4t1EEij wusHZx6Net/stR/Xkibi/Edqx514Jw0Dh5z9mNtXe2SIM0UHU4+zyiakEgpdOGlMnhT0 t+H+RUgWZ0Ql/f19T4QrzNiSqrmykA/TR5SxTjTXLblNIpNG3pRgJmAeslB4WHF7mY8o 0KFRa43Euduw0W1DikaeMBTLWZLC30VRwelPhMvFks24FnXwRQT9nhYbm2tFYthXvO+q hdRA8K/+kNKaUkBYyqGbgMgejy+Z8JACZaGkqvg8ywdPDQ87SRKPDBTelP4ijUwcgs3h 4Fzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZhaD3fVqQx8uzjcm/JL+Co5mxACB6h/XTL4Z0Z5CY4E=; b=EHfCvuxI8dY6VJKpT+p0WbMnvDsVNAs7ALgazhr49A85MrlWE5+a1mmjiE2v7d2BJQ XhplcTiBPljA5OVQdN+DEZ1WCAhOUs7igZSmE67TVwp4fw3SrrQ/7t2DYyxfY1XcJuLx qKNMRlLNThAF7h0+04VnnpbSy9rFNil0ORUSyJeQNVubJSshB000cA18ORCcfaOHOZ5r 3SAGVJG9NZkIDZ7WcdHbGUyd9RH+1CXCDvtvqs8UxeFzCYpXLxmZdFrkBVFqR91EqcaS D4dB7rKNUUf9u4CMF/VYx/FKPBwvpvjYESPPbUuw0yywM77WN13hPOMCGos6cprtmsgx lMog== X-Gm-Message-State: ABUngveibN+qPDGBClJcymex8RDClyDa0i+/xkkgjzNr6iTm8n+7vUTzbAJoQFOGpNj7OqpfGnRwKVgEhnDm3Q== X-Received: by 10.36.148.75 with SMTP id j72mr1554105ite.9.1479191033854; Mon, 14 Nov 2016 22:23:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.25.65 with HTTP; Mon, 14 Nov 2016 22:23:53 -0800 (PST) In-Reply-To: <20161112221844.GK2417@var.home> References: <20161110161032.GO7521@var.bordeaux.inria.fr> <20161111083447.GE2417@var.home> <20161111162750.GK2417@var.home> <20161111163209.GV2417@var.home> <20161112154759.GP2417@var.home> <20161112221844.GK2417@var.home> From: Okash Khawaja Date: Tue, 15 Nov 2016 06:23:53 +0000 Message-ID: Subject: Re: Status of kernel To: Samuel Thibault Cc: John Covici , David Borowski , "Speakup is a screen review system for Linux." X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2016 06:24:02 -0000 Hi Samuel, Apologies for the delay - got abducted by aliens while I was sniffing hot coffee through nose. Please bear with me as I try and understand this. So we have: 1. speakup tty line discipline N_SPEAKUP 2. device /dev/ttyx N_SPEAKUP is set as line discipline for /dev/ttyx. The challenge is enabling speakup before userland. Is the above correct? And how will /dev/ttyx be used? Also is there a link to where you pasted your idea from? Someone attempted something similar back in 2005: http://lkml.iu.edu/hypermail/linux/kernel/0510.2/0803.html Thanks, Okash On Sat, Nov 12, 2016 at 10:18 PM, Samuel Thibault < samuel.thibault@ens-lyon.org> wrote: > Okash Khawaja, on Sat 12 Nov 2016 16:13:22 +0000, wrote: > > Could you explain your idea a bit more? I have been reading the driver > code and > > want to contribute to this project. > > Just copy/pasting some previous thoughts. The idea would be to make > speakup a tty line discipline, just like it is for a mouse, ppp, etc. > > =E2=80=9C > land? One of the goals of speakup is to be available before userland > works (otherwise we could as well just move the drivers to userland), so > we don't have any userland helper to set the line disciline up. > > And even before setting up the line discipline, how can speakup open > the port? We don't have a process context or /dev/, so we can't just > use sys_open and alike. What we could use is some function which takes > a minor/major pair or a device name, and returns a filp, then we can > tty_set_ldisc(N_SPEAKUP) on file_tty(filp), but I don't know if such > thing exists? That would probably be building a struct inode (getting > inspired from fs/ramfs/), then just open it? Something like: > > struct inode *inode =3D new_inode(sb); > > init_special_inode(inode, S_IFCHR, MKDEV(major, minor)); > filp =3D get_empty_filp(); > do_dentry_open(filp, inode, NULL, NULL); > struct tty_struct *tty =3D file_tty(filp); > tty_set_ldisc(tty, N_SPEAKUP); > =E2=80=9D > > Samuel >