* snd_hwdep_open() as non-root user
@ 2012-10-04 11:01 Rafal Powierski
2012-10-04 12:50 ` Clemens Ladisch
0 siblings, 1 reply; 3+ messages in thread
From: Rafal Powierski @ 2012-10-04 11:01 UTC (permalink / raw)
To: alsa-devel
Developers,
I would like to access pin verb hda interface using snd_hwdep_open() function.
It works fine if I run as root.
I hope there is a way to configure my kubuntu so I can do it as non-root user (e.g. debugging)
so far, I have been trying changing access flags for devices in /dev/snd/ directory to crwxrwxrwx no plus character.
It did not change my privileges for snd_hwdep_open() - still returns –13.
I assume that the device-file responsible is /dev/snd/hwC1D0, the same as parameter given to “hda-verb” program.
I am developing a new hardware, using HDA codec.
Please help
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: snd_hwdep_open() as non-root user
2012-10-04 11:01 snd_hwdep_open() as non-root user Rafal Powierski
@ 2012-10-04 12:50 ` Clemens Ladisch
2012-10-04 16:06 ` Rafal Powierski
0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2012-10-04 12:50 UTC (permalink / raw)
To: Rafal Powierski; +Cc: alsa-devel
Rafal Powierski wrote:
> I would like to access pin verb hda interface using snd_hwdep_open() function.
> It works fine if I run as root.
> I hope there is a way to configure my kubuntu so I can do it as non-root user (e.g. debugging)
> so far, I have been trying changing access flags for devices in /dev/snd/ directory to crwxrwxrwx no plus character.
> It did not change my privileges for snd_hwdep_open() - still returns –13.
sound/pci/hda/hda_hwdep.c says:
static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file)
{
#ifndef CONFIG_SND_DEBUG_VERBOSE
if (!capable(CAP_SYS_RAWIO))
return -EACCES;
#endif
return 0;
}
Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: snd_hwdep_open() as non-root user
2012-10-04 12:50 ` Clemens Ladisch
@ 2012-10-04 16:06 ` Rafal Powierski
0 siblings, 0 replies; 3+ messages in thread
From: Rafal Powierski @ 2012-10-04 16:06 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
Thank you Clemens,
sudo setcap cap_sys_rawio... solves the problem :)
I only need to ad it to the qt build or to the app itself.
Best Regards,
Rafal
-----Original Message-----
From: Clemens Ladisch
Sent: Thursday, October 04, 2012 2:50 PM
To: Rafal Powierski
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] snd_hwdep_open() as non-root user
Rafal Powierski wrote:
> I would like to access pin verb hda interface using snd_hwdep_open()
> function.
> It works fine if I run as root.
> I hope there is a way to configure my kubuntu so I can do it as non-root
> user (e.g. debugging)
> so far, I have been trying changing access flags for devices in /dev/snd/
> directory to crwxrwxrwx no plus character.
> It did not change my privileges for snd_hwdep_open() - still returns –13.
sound/pci/hda/hda_hwdep.c says:
static int hda_hwdep_open(struct snd_hwdep *hw, struct file *file)
{
#ifndef CONFIG_SND_DEBUG_VERBOSE
if (!capable(CAP_SYS_RAWIO))
return -EACCES;
#endif
return 0;
}
Regards,
Clemens
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-04 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-04 11:01 snd_hwdep_open() as non-root user Rafal Powierski
2012-10-04 12:50 ` Clemens Ladisch
2012-10-04 16:06 ` Rafal Powierski
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.