svn commit: r325298 - head/sys/dev/evdev

Vladimir Kondratyev wulf at FreeBSD.org
Wed Nov 1 22:33:45 UTC 2017


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


More information about the svn-src-head mailing list