* Re: [PATCH 4/4] snd-maestro3: Make hardware volume buttons an input device
[not found] ` <4BD00176.3000904@redhat.com>
@ 2010-04-22 15:11 ` Ville Syrjälä
2010-04-22 16:59 ` [alsa-devel] " Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjälä @ 2010-04-22 15:11 UTC (permalink / raw)
To: Hans de Goede; +Cc: alsa-devel, dmitry.torokhov, linux-input
On Thu, Apr 22, 2010 at 09:57:42AM +0200, Hans de Goede wrote:
> On 04/21/2010 06:05 PM, Ville Syrjälä wrote:
> > On Wed, Apr 21, 2010 at 11:04:09AM -0400, Hans de Goede wrote:
> >> @@ -2524,6 +2494,42 @@ static int m3_resume(struct pci_dev *pci)
> >> }
> >> #endif /* CONFIG_PM */
> >>
> >> +#ifdef CONFIG_INPUT
> >> +static int __devinit snd_m3_input_register(struct snd_m3 *chip)
> >> +{
> >> + struct input_dev *input_dev;
> >> + int err;
> >> +
> >> + input_dev = input_allocate_device();
> >> + if (!input_dev)
> >> + return -ENOMEM;
> >> +
> >> + snprintf(chip->phys, sizeof(chip->phys), "pci-%s/input0",
> >> + pci_name(chip->pci));
> >
> > What's the proper format of phys? I see gameport stuff uses
> > pci%s/gameport0, ir stuff uses pci-%s/ir0. I can't immediately find any
> > other pci input things.
> >
>
> I've no idea, I took the pci-%s/ part from other pci drivers registering
> input devices and the input0 part is based on doing:
> cat /sys/class/input/input?/phys
>
> On my system which yields a string ending in input0 for almost all
> input devices.
Same for me. Unfortunately none start with "pci". Adding Dmitry and
linux-input in cc. Dmitry, any official statement about this phys
string?
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH 4/4] snd-maestro3: Make hardware volume buttons an input device
2010-04-22 15:11 ` [PATCH 4/4] snd-maestro3: Make hardware volume buttons an input device Ville Syrjälä
@ 2010-04-22 16:59 ` Dmitry Torokhov
2010-04-22 17:54 ` Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2010-04-22 16:59 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: Hans de Goede, alsa-devel, linux-input
On Thursday 22 April 2010 08:11:12 am Ville Syrjälä wrote:
> On Thu, Apr 22, 2010 at 09:57:42AM +0200, Hans de Goede wrote:
> > On 04/21/2010 06:05 PM, Ville Syrjälä wrote:
> > > On Wed, Apr 21, 2010 at 11:04:09AM -0400, Hans de Goede wrote:
> > >> @@ -2524,6 +2494,42 @@ static int m3_resume(struct pci_dev *pci)
> > >>
> > >> }
> > >> #endif /* CONFIG_PM */
> > >>
> > >> +#ifdef CONFIG_INPUT
> > >> +static int __devinit snd_m3_input_register(struct snd_m3 *chip)
> > >> +{
> > >> + struct input_dev *input_dev;
> > >> + int err;
> > >> +
> > >> + input_dev = input_allocate_device();
> > >> + if (!input_dev)
> > >> + return -ENOMEM;
> > >> +
> > >> + snprintf(chip->phys, sizeof(chip->phys), "pci-%s/input0",
> > >> + pci_name(chip->pci));
> > >
> > > What's the proper format of phys? I see gameport stuff uses
> > > pci%s/gameport0, ir stuff uses pci-%s/ir0. I can't immediately find any
> > > other pci input things.
> >
> > I've no idea, I took the pci-%s/ part from other pci drivers registering
> > input devices and the input0 part is based on doing:
> > cat /sys/class/input/input?/phys
> >
> > On my system which yields a string ending in input0 for almost all
> > input devices.
>
> Same for me. Unfortunately none start with "pci". Adding Dmitry and
> linux-input in cc. Dmitry, any official statement about this phys
> string?
Phys can be pretty much anything, it is supposed to aid in identifying
particular device by physical connection. DVB guys like phys ending in
"irX", everywhere else we put "inputX" (normally input0 but if there
several input devices on the same physical device, like some USB HID
devices, there could be xxx/input1, xxx/intput2 and so on).
The piece in the quoted patch segment seems to be just fine.
Hope this helps.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH 4/4] snd-maestro3: Make hardware volume buttons an input device
2010-04-22 16:59 ` [alsa-devel] " Dmitry Torokhov
@ 2010-04-22 17:54 ` Ville Syrjälä
0 siblings, 0 replies; 3+ messages in thread
From: Ville Syrjälä @ 2010-04-22 17:54 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Hans de Goede, alsa-devel, linux-input
On Thu, Apr 22, 2010 at 09:59:00AM -0700, Dmitry Torokhov wrote:
> On Thursday 22 April 2010 08:11:12 am Ville Syrjälä wrote:
> > On Thu, Apr 22, 2010 at 09:57:42AM +0200, Hans de Goede wrote:
> > > On 04/21/2010 06:05 PM, Ville Syrjälä wrote:
> > > > On Wed, Apr 21, 2010 at 11:04:09AM -0400, Hans de Goede wrote:
> > > >> @@ -2524,6 +2494,42 @@ static int m3_resume(struct pci_dev *pci)
> > > >>
> > > >> }
> > > >> #endif /* CONFIG_PM */
> > > >>
> > > >> +#ifdef CONFIG_INPUT
> > > >> +static int __devinit snd_m3_input_register(struct snd_m3 *chip)
> > > >> +{
> > > >> + struct input_dev *input_dev;
> > > >> + int err;
> > > >> +
> > > >> + input_dev = input_allocate_device();
> > > >> + if (!input_dev)
> > > >> + return -ENOMEM;
> > > >> +
> > > >> + snprintf(chip->phys, sizeof(chip->phys), "pci-%s/input0",
> > > >> + pci_name(chip->pci));
> > > >
> > > > What's the proper format of phys? I see gameport stuff uses
> > > > pci%s/gameport0, ir stuff uses pci-%s/ir0. I can't immediately find any
> > > > other pci input things.
> > >
> > > I've no idea, I took the pci-%s/ part from other pci drivers registering
> > > input devices and the input0 part is based on doing:
> > > cat /sys/class/input/input?/phys
> > >
> > > On my system which yields a string ending in input0 for almost all
> > > input devices.
> >
> > Same for me. Unfortunately none start with "pci". Adding Dmitry and
> > linux-input in cc. Dmitry, any official statement about this phys
> > string?
>
> Phys can be pretty much anything, it is supposed to aid in identifying
> particular device by physical connection. DVB guys like phys ending in
> "irX", everywhere else we put "inputX" (normally input0 but if there
> several input devices on the same physical device, like some USB HID
> devices, there could be xxx/input1, xxx/intput2 and so on).
OK. I was mainly worried that perhaps some tool might use it and would
need some specific format. In this case the dash between the bus type
and the device name caught my eye as some drivers have it and some
don't.
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-22 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1271862249-22612-1-git-send-email-hdegoede@redhat.com>
[not found] ` <1271862249-22612-4-git-send-email-hdegoede@redhat.com>
[not found] ` <20100421160551.GB6861@sci.fi>
[not found] ` <4BD00176.3000904@redhat.com>
2010-04-22 15:11 ` [PATCH 4/4] snd-maestro3: Make hardware volume buttons an input device Ville Syrjälä
2010-04-22 16:59 ` [alsa-devel] " Dmitry Torokhov
2010-04-22 17:54 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).