lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun,  8 Mar 2020 04:13:54 +0100
From:   Tobias Schramm <t.schramm@...jaro.org>
To:     Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Cc:     Liam Girdwood <lgirdwood@...il.com>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org,
        Tobias Schramm <t.schramm@...jaro.org>
Subject: [RFC PATCH 0/1] Use native gpiolib inversion for jack gpios

This patch changes the logic used for jack gpio state inversion to
utilize gpiolib inversion.

Previously the gpio active state would not correspond to the plugged-in
state of the jack. Since the active state of a gpio is usually defined by
its purpose in a specific application I'd expect the active state to
represent the jacks plug status.

However, judging by the users [1], [2] of snd_soc_jack_add_gpiods the
ACPI tables of some devices seem to indicate the "wrong" polarity for
their jack detect gpios.
I'm not entirely sure how to deal with those devices. At the moment I'd
vote for inverting the gpio active level again
(via gpiod_toggle_active_low) inside snd_soc_jack_add_gpios if
gpio->gpiod_dev != NULL and gpio->invert is set.

I'm not entirely sure about [3] either. In my opinion removing invert = 1
from ams_delta_hook_switch_gpios and adding GPIO_ACTIVE_LOW to the flags
of hook_switch in [4] would be the right move here.

What are your thoughts on this?


Best regards,

Tobias

[1] /sound/soc/intel/boards/byt-max98090.c
[2] /sound/soc/intel/boards/cht_bsw_max98090_ti.c
[3] /sound/soc/ti/ams-delta.c
[4] /arch/arm/mach-omap1/board-ams-delta.c

Tobias Schramm (1):
  ASoC: jack: use gpiolib inversion flag for inverted gpios

 sound/soc/soc-jack.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ