From: Felipe Ferreri Tonello <eu@felipetonello.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
Wang Xingchao <xingchao.wang@linux.intel.com>,
linux-kernel@vger.kernel.org,
David Henningsson <david.henningsson@canonical.com>
Subject: Re: [PATCH 1/4] ALSA: Added jack detection kcontrol support
Date: Wed, 31 Jul 2013 20:48:27 -0700 [thread overview]
Message-ID: <51F9DA8B.8050302@felipetonello.com> (raw)
In-Reply-To: <20130727122524.GH9858@sirena.org.uk>
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@kernel.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?
WARNING: multiple messages have this Message-ID (diff)
From: Felipe Ferreri Tonello <eu@felipetonello.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Takashi Iwai <tiwai@suse.de>,
David Henningsson <david.henningsson@canonical.com>,
Wang Xingchao <xingchao.wang@linux.intel.com>,
Jaroslav Kysela <perex@perex.cz>
Subject: Re: [PATCH 1/4] ALSA: Added jack detection kcontrol support
Date: Wed, 31 Jul 2013 20:48:27 -0700 [thread overview]
Message-ID: <51F9DA8B.8050302@felipetonello.com> (raw)
In-Reply-To: <20130727122524.GH9858@sirena.org.uk>
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@kernel.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?
next prev parent reply other threads:[~2013-08-01 3:48 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 18:25 [PATCH 0/4] ALSA: Implement core jack support for kcontrol Felipe F. Tonello
2013-07-26 18:25 ` [PATCH 1/4] ALSA: Added jack detection kcontrol support Felipe F. Tonello
2013-07-26 18:46 ` Mark Brown
2013-07-26 19:04 ` Felipe Tonello
2013-07-26 19:04 ` Felipe Tonello
2013-07-26 18:54 ` Mark Brown
2013-07-26 18:54 ` Mark Brown
2013-07-26 19:10 ` Felipe Tonello
2013-07-26 22:48 ` Mark Brown
2013-07-26 23:13 ` Felipe Tonello
2013-07-26 23:13 ` Felipe Tonello
2013-07-27 12:25 ` Mark Brown
2013-07-27 12:25 ` Mark Brown
2013-07-29 12:05 ` Takashi Iwai
2013-08-01 3:49 ` Felipe Ferreri Tonello
2013-08-01 3:48 ` Felipe Ferreri Tonello [this message]
2013-08-01 3:48 ` Felipe Ferreri Tonello
2013-08-01 8:24 ` Mark Brown
2013-08-01 8:24 ` Mark Brown
2013-07-26 18:25 ` [PATCH 2/4] ALSA: HDA: Updating jack implementation according new ALSA Jacks Felipe F. Tonello
2013-07-26 18:25 ` [PATCH 3/4] ALSA: SoC: " Felipe F. Tonello
2013-07-26 18:50 ` Mark Brown
2013-07-26 18:50 ` Mark Brown
2013-07-26 19:11 ` Felipe Tonello
2013-07-26 18:25 ` [PATCH 4/4] ALSA: oxygen: " Felipe F. Tonello
2013-07-26 18:56 ` Mark Brown
2013-07-26 18:56 ` Mark Brown
2013-07-26 19:02 ` Felipe Tonello
2013-07-26 19:02 ` Felipe Tonello
2013-07-26 22:45 ` Mark Brown
2013-07-26 22:45 ` Mark Brown
2013-07-26 22:48 ` Felipe Tonello
2013-07-29 12:10 ` Takashi Iwai
2013-08-01 3:51 ` Felipe Ferreri Tonello
2013-07-26 22:45 ` [PATCH v2 0/3] ALSA: Implement core jack support for kcontrol Felipe F. Tonello
2013-07-26 22:45 ` [PATCH v2 1/3] ALSA: Added jack detection kcontrol support Felipe F. Tonello
2013-07-29 14:19 ` Takashi Iwai
2013-07-29 14:19 ` Takashi Iwai
2013-08-01 3:52 ` Felipe Ferreri Tonello
2013-07-26 22:45 ` [PATCH v2 2/3] ALSA: pci: HDA/oxygen: Updating jack implementation according new ALSA Jacks Felipe F. Tonello
2013-07-26 22:45 ` [PATCH v2 3/3] ALSA: SoC: " Felipe F. Tonello
2013-07-29 15:03 ` Stephen Warren
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=51F9DA8B.8050302@felipetonello.com \
--to=eu@felipetonello.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=david.henningsson@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=xingchao.wang@linux.intel.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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.