Linux Input Archive on lore.kernel.org
 help / color / Atom feed
From: "Colenbrander, Roderick" <Roderick.Colenbrander@sony.com>
To: Daniel Ogorchock <djogorchock@gmail.com>,
	"Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
Cc: Bastien Nocera <hadess@hadess.net>,
	Roderick Colenbrander <thunderbird2k@gmail.com>,
	linux-input <linux-input@vger.kernel.org>,
	Billy Laws <blaws05@gmail.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Jiri Kosina <jikos@kernel.org>,
	Siarhei Vishniakou <svv@google.com>,
	"s.jegen@gmail.com" <s.jegen@gmail.com>,
	Carl Mueller <carmueller@gmail.com>
Subject: Re: [PATCH v11 00/11] HID: nintendo
Date: Sat, 1 Aug 2020 19:59:11 +0000
Message-ID: <BY5PR13MB382682A947A8FB72720AA718984F0@BY5PR13MB3826.namprd13.prod.outlook.com> (raw)
In-Reply-To: <CAEVj2t=Az1G6X9Kj050aXVetW+PX==LgoEM9C3ES886NsYygcw@mail.gmail.com>

> I'd been telling people to use firejail as a temporary workaround to prevent
> steam from seeing the hidraw device. Note that hid-nintendo sets the most
> significant bit of the evdev's version number to allow userspace applications
> to discern it from the default hid device. There's no current mechanism in
> the driver to yield to userspace using hidraw, but I can look at what
> hid-steam is currently doing to accomplish that.
> 
> I guess the downside to that method is that any other process listening to
> the controller's evdev events would cease to receive them (maybe a voice
> chat program using one of the buttons as a push-to-talk hotkey or something
> similar).

> Does steam use hidraw for the sony dualshock controllers as well? If so, is
> hid-sony doing anything special for that usecase?

In hid-sony we are not doing anything like hid-steam is doing (no virtual extra hidraw device).

I just don't know how I feel about mixing of evdev and hidraw. It just means userspace drivers are doing things behind the back of the real driver (unless you add a virtual hidraw driver like hid-steam). For Sony devices I'm not a big fan as our devices are very complex. Our devices tend to use a single output report (same report id) for rumble, audio and other types of data. When we will expose audio properly, a user space application doing hidraw will mess up audio streams and other behavior (e.g. power settings are also in the same hid report).

I don't know a good way yet. Has the usage of EVIOCGRAB been explored? If I recall it was intended to claim exclusive access to a device at least for input. It is a way of avoiding of some of the issues for simpler devices.

Virtual devices could work too, but I really dislike the extra complexity to hid drivers. Just in Sony case our driver for future devices will already be quite complex. If we really want virtual device support, I don't think it would scale to add it to every driver. Maybe there would be a generic way in the HID driver in which drivers can blacklist certain reports or hook into just certain requests or so.

Thanks,
Roderick

  parent reply index

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  3:29 Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 01/11] HID: nintendo: add nintendo switch controller driver Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 02/11] HID: nintendo: add player led support Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 03/11] HID: nintendo: add power supply support Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 04/11] HID: nintendo: add home led support Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 05/11] HID: nintendo: add rumble support Daniel J. Ogorchock
2020-04-25 13:01   ` Bastien Nocera
2020-03-17  3:29 ` [PATCH v11 06/11] HID: nintendo: improve subcommand reliability Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 07/11] HID: nintendo: send subcommands after receiving input report Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 08/11] HID: nintendo: reduce device removal subcommand errors Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 09/11] HID: nintendo: patch hw version for userspace HID mappings Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 10/11] HID: nintendo: set controller uniq to MAC Daniel J. Ogorchock
2020-03-17  3:29 ` [PATCH v11 11/11] HID: nintendo: add support for charging grip Daniel J. Ogorchock
2020-04-01 16:27 ` [PATCH v11 00/11] HID: nintendo Benjamin Tissoires
2020-04-03 13:16   ` Jiri Kosina
2020-04-25 13:01 ` Bastien Nocera
2020-04-26 20:42   ` Roderick Colenbrander
2020-04-26 21:14     ` Bastien Nocera
2020-04-26 22:31       ` Roderick Colenbrander
2020-04-27  8:56         ` Bastien Nocera
2020-05-22 19:11           ` Daniel Ogorchock
2020-07-22 18:54             ` Pierre-Loup A. Griffais
2020-07-22 19:22               ` Daniel Ogorchock
2020-07-22 19:47                 ` Bastien Nocera
2020-07-22 20:03                   ` Daniel Ogorchock
2020-08-01 19:59                 ` Colenbrander, Roderick [this message]
2020-08-04  5:59                   ` Daniel Ogorchock

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=BY5PR13MB382682A947A8FB72720AA718984F0@BY5PR13MB3826.namprd13.prod.outlook.com \
    --to=roderick.colenbrander@sony.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=blaws05@gmail.com \
    --cc=carmueller@gmail.com \
    --cc=djogorchock@gmail.com \
    --cc=hadess@hadess.net \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=pgriffais@valvesoftware.com \
    --cc=s.jegen@gmail.com \
    --cc=svv@google.com \
    --cc=thunderbird2k@gmail.com \
    /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

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git