From owner-svn-src-all@freebsd.org Wed Nov 1 22:33:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA185E65F1D; Wed, 1 Nov 2017 22:33:45 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7483D15D9; Wed, 1 Nov 2017 22:33:45 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA1MXi4e057148; Wed, 1 Nov 2017 22:33:44 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA1MXiRV057146; Wed, 1 Nov 2017 22:33:44 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201711012233.vA1MXiRV057146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Wed, 1 Nov 2017 22:33:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325298 - head/sys/dev/evdev X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: head/sys/dev/evdev X-SVN-Commit-Revision: 325298 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2017 22:33:45 -0000 Author: wulf Date: Wed Nov 1 22:33:44 2017 New Revision: 325298 URL: https://svnweb.freebsd.org/changeset/base/325298 Log: evdev: Disable value normalization and state filtering for SND events. Some events can take sound pitch as a value so can not be represented as binary on/off events. Tracking for on/off state is left in place as it is a part of the evdev API. Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12676 Modified: head/sys/dev/evdev/evdev.c head/sys/dev/evdev/evdev.h Modified: head/sys/dev/evdev/evdev.c ============================================================================== --- head/sys/dev/evdev/evdev.c Wed Nov 1 22:30:36 2017 (r325297) +++ head/sys/dev/evdev/evdev.c Wed Nov 1 22:33:44 2017 (r325298) @@ -634,8 +634,6 @@ evdev_sparse_event(struct evdev_dev *evdev, uint16_t t break; case EV_SND: - if (bit_test(evdev->ev_snd_states, code) == value) - return (EV_SKIP_EVENT); bit_change(evdev->ev_snd_states, code, value); break; Modified: head/sys/dev/evdev/evdev.h ============================================================================== --- head/sys/dev/evdev/evdev.h Wed Nov 1 22:30:36 2017 (r325297) +++ head/sys/dev/evdev/evdev.h Wed Nov 1 22:33:44 2017 (r325298) @@ -197,7 +197,7 @@ static __inline int evdev_push_snd(struct evdev_dev *evdev, uint16_t code, int32_t value) { - return (evdev_push_event(evdev, EV_SND, code, value != 0)); + return (evdev_push_event(evdev, EV_SND, code, value)); } static __inline int