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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51F9DA8B.8050302@felipetonello.com>
Date:	Wed, 31 Jul 2013 20:48:27 -0700
From:	Felipe Ferreri Tonello <eu@...ipetonello.com>
To:	Mark Brown <broonie@...nel.org>
CC:	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
	Takashi Iwai <tiwai@...e.de>,
	David Henningsson <david.henningsson@...onical.com>,
	Wang Xingchao <xingchao.wang@...ux.intel.com>,
	Jaroslav Kysela <perex@...ex.cz>
Subject: Re: [PATCH 1/4] ALSA: Added jack detection kcontrol support

On 07/27/2013 05:25 AM, Mark Brown wrote:
> On Fri, Jul 26, 2013 at 04:13:40PM -0700, Felipe Tonello wrote:
>> On Fri, Jul 26, 2013 at 3:48 PM, Mark Brown <broonie@...nel.org> wrote:
>
>>>>> What I'd expect to happen here is that for multi function jacks we
>>>>> create a control per function if the controls are valid.
>
>> Ok, so the idea is just to change the control to type integer instead
>> of boolean, right?
>> Because as you say, the user will be able to check the type of jack
>> based on the status value, right?
>
> It might be more idiomatic and more compatible with userspace to create
> multiple controls for the jack, there was some discussion of this in the
> past I think but I can't remember the result.
>
>>> Yes.  If there's only one function supported the current code is fine
>>> but for multiple functions it's going to discard useful information.
>
>> So, what do you suggest to do that? I'm not sure if I understand what
>> you are saying.
>> When you mean function, do you mean the SND_JACK_BTN_n or the the jack
>> types, such as SND_JACK_HEADPHONE, and so on?
>
> The jack types, the buttons definitely sohuld be going up as input
> events.
>
>> If a codec creates a jack type SND_JACK_HEADSET (= SND_JACK_HEADPHONE
>> | SND_JACK_MICROPHONE). It should be created two controls, name +
>> "Headphone Jack" and name + "Microphone Jack"? If so, what about the
>> status to report? How to know which control to report?
>
> The drivers report a bitmask for status.
>

I did that but I'm not happy with the control name. Usually drivers add 
jacks like: "Headset" for a headset, "Headphone" for a headphone and so on.
I did the following: control name is jack name + (jack type) + Jack. If 
jack type == jack name, don't add (jack type) to the name.

Any suggestion how it should be?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ