[lkml]   [2009]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectsound: -EPERM on first mplayer invocation

For a long time I observe the following nuisance:
when I run mplayer for the very first time after boot,
I can't adjust the volume. mplayer spews this to stderr:

alsa-control: error setting left channel, Operation not permitted

This happens even if I login as root and run mplayer as root.

I tracked it down to snd_ctl_elem_write in sound/core/control.c

static int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,
struct snd_ctl_elem_value *control)
struct snd_kcontrol *kctl;
struct snd_kcontrol_volatile *vd;
unsigned int index_offset;
int result;

kctl = snd_ctl_find_id(card, &control->id);
if (kctl == NULL) {
result = -ENOENT;
} else {
index_offset = snd_ctl_get_ioff(kctl, &control->id);
vd = &kctl->vd[index_offset];
if (!(vd->access & SNDRV_CTL_ELEM_ACCESS_WRITE) ||
kctl->put == NULL ||
(file && vd->owner && vd->owner != file)) {
printk("vd->access & SNDRV_CTL_ELEM_ACCESS_WRITE:%x\n", vd->access & SNDRV_CTL_ELEM_ACCESS_WRITE);
printk("kctl->put:%p\n", kctl->put);
printk("file:%p vd->owner:%p\n", file, vd->owner);
result = -EPERM;
} else {

The above printk triggers and prints:

file:ffff88007c56a5c0 vd->owner:ffff88007bc34740

Thus, vd->owner != file.

As I said, it only happens on very first run of mplayer,
and it isn't a recent change, I think I saw it at least
for one year with different kernels.

Takashi, any idea what might be happening here?
How can I help you more with tracking it down?

 \ /
  Last update: 2009-08-02 23:39    [W:0.037 / U:29.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site