* Not important oops
@ 2004-01-21 12:55 p z oooo
2004-01-21 18:40 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: p z oooo @ 2004-01-21 12:55 UTC (permalink / raw)
To: alsa-devel
Hi,
When I remove control through hwdep layer on emu10k1
driver when in use by oss emulation I got oops.
This is because oss emulation holds pointer to this control.
Is there any api to disable an then enable oss emulation or
only proc interface ???
Jan 20 20:53:52 localhost kernel: Unable to handle kernel NULL
pointer dereference at virtual address 000000b0
Jan 20 20:53:52 localhost kernel: printing eip:
Jan 20 20:53:52 localhost kernel: e8edc94b
Jan 20 20:53:52 localhost kernel: *pde = 0567b067
Jan 20 20:53:52 localhost kernel: *pte = 00000000
Jan 20 20:53:52 localhost kernel: Oops: 0000
Jan 20 20:53:52 localhost kernel: snd-pcm-oss snd-mixer-oss evdev
tuner saa7134 video-buf v4l2-common v4l1-compat ir-common videodev
w83781d i2c-isa eeprom i2c-proc i2c-viapro i2c-dev i2c-core
Jan 20 20:53:52 localhost kernel: CPU: 0
Jan 20 20:53:52 localhost kernel: EIP: 0060:[<e8edc94b>]
Tainted: P
Jan 20 20:53:52 localhost kernel: EFLAGS: 00010286
Jan 20 20:53:52 localhost kernel:
Jan 20 20:53:52 localhost kernel: EIP is at snd_emu10k1_gpr_ctl_info
[snd-emu10k1] 0xb (2.4.22-1.2115.nptlcustom)
Jan 20 20:53:52 localhost kernel: eax: daf33cc0 ebx: daf33cc0
ecx: daa8ce00 edx: 00000000
Jan 20 20:53:52 localhost kernel: esi: daa8ce00 edi: c5ff8000
ebp: d4795f60 esp: d4795ef4
Jan 20 20:53:52 localhost kernel: ds: 0068 es: 0068 ss: 0068
Jan 20 20:53:52 localhost kernel: Process xine (pid: 4800,
stackpage=d4795000)
Jan 20 20:53:52 localhost kernel: Stack: e9040ded daf33cc0 daa8ce00
00000000 00000000 d4795f64 dd93a0e4 dd2bf400
Jan 20 20:53:52 localhost kernel: dadb7000 dadb714c c9a9d200
e90411d7 c9a9d200 dd93a0e4 daf33cc0 d4795f60
Jan 20 20:53:52 localhost kernel: d4795f64 dffef300 dd93a0e4
c9a9d200 c52ae540 c9a9d200 e90406cf c9a9d200
Jan 20 20:53:52 localhost kernel: Call Trace: [<e9040ded>]
snd_mixer_oss_get_volume1_vol [snd-mixer-oss] 0x6d (0xd4795ef4)
Jan 20 20:53:52 localhost kernel: [<e90411d7>]
snd_mixer_oss_get_volume1 [snd-mixer-oss] 0x207 (0xd4795f20)
Jan 20 20:53:52 localhost kernel: [<e90406cf>]
snd_mixer_oss_get_volume [snd-mixer-oss] 0x9f (0xd4795f4c)
Jan 20 20:53:52 localhost kernel: [<e904086d>] snd_mixer_oss_ioctl1
[snd-mixer-oss] 0xcd (0xd4795f70)
Jan 20 20:53:52 localhost kernel: [<e9040b30>] snd_mixer_oss_ioctl
[snd-mixer-oss] 0x0 (0xd4795f90)
Jan 20 20:53:52 localhost kernel: [<c015570c>] sys_ioctl [kernel]
0xbc (0xd4795f94)
Jan 20 20:53:52 localhost kernel: [<c014561a>] sys_open [kernel] 0x8a
(0xd4795fa8)
Jan 20 20:53:52 localhost kernel: [<c01099df>] system_call [kernel]
0x33 (0xd4795fc0)
Jan 20 20:53:52 localhost kernel:
Jan 20 20:53:52 localhost kernel:
Jan 20 20:53:52 localhost kernel: Code: 8b 82 b0 00 00 00 85 c0 75 09
83 ba b4 00 00 00 01 74 22 c7
____________________________________
http://www.logofun.pobox.sk - urobte radost svojmu telefonu
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Not important oops
2004-01-21 12:55 Not important oops p z oooo
@ 2004-01-21 18:40 ` Takashi Iwai
2004-01-21 18:49 ` Jaroslav Kysela
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2004-01-21 18:40 UTC (permalink / raw)
To: p z oooo; +Cc: alsa-devel
At Wed, 21 Jan 2004 13:55:53 +0100,
p z oooo wrote:
>
> Hi,
>
> When I remove control through hwdep layer on emu10k1
> driver when in use by oss emulation I got oops.
> This is because oss emulation holds pointer to this control.
> Is there any api to disable an then enable oss emulation or
> only proc interface ???
hmm weird, the access to ctl elements in mixer_oss.c is restricted
with card->controls_rwsem. since snd_emu10k1_del_controls issues
down_write() for it, it must be safe...
Takashi
>
> Jan 20 20:53:52 localhost kernel: Unable to handle kernel NULL
> pointer dereference at virtual address 000000b0
> Jan 20 20:53:52 localhost kernel: printing eip:
> Jan 20 20:53:52 localhost kernel: e8edc94b
> Jan 20 20:53:52 localhost kernel: *pde = 0567b067
> Jan 20 20:53:52 localhost kernel: *pte = 00000000
> Jan 20 20:53:52 localhost kernel: Oops: 0000
> Jan 20 20:53:52 localhost kernel: snd-pcm-oss snd-mixer-oss evdev
> tuner saa7134 video-buf v4l2-common v4l1-compat ir-common videodev
> w83781d i2c-isa eeprom i2c-proc i2c-viapro i2c-dev i2c-core
> Jan 20 20:53:52 localhost kernel: CPU: 0
> Jan 20 20:53:52 localhost kernel: EIP: 0060:[<e8edc94b>]
> Tainted: P
> Jan 20 20:53:52 localhost kernel: EFLAGS: 00010286
> Jan 20 20:53:52 localhost kernel:
> Jan 20 20:53:52 localhost kernel: EIP is at snd_emu10k1_gpr_ctl_info
> [snd-emu10k1] 0xb (2.4.22-1.2115.nptlcustom)
> Jan 20 20:53:52 localhost kernel: eax: daf33cc0 ebx: daf33cc0
> ecx: daa8ce00 edx: 00000000
> Jan 20 20:53:52 localhost kernel: esi: daa8ce00 edi: c5ff8000
> ebp: d4795f60 esp: d4795ef4
> Jan 20 20:53:52 localhost kernel: ds: 0068 es: 0068 ss: 0068
> Jan 20 20:53:52 localhost kernel: Process xine (pid: 4800,
> stackpage=d4795000)
> Jan 20 20:53:52 localhost kernel: Stack: e9040ded daf33cc0 daa8ce00
> 00000000 00000000 d4795f64 dd93a0e4 dd2bf400
> Jan 20 20:53:52 localhost kernel: dadb7000 dadb714c c9a9d200
> e90411d7 c9a9d200 dd93a0e4 daf33cc0 d4795f60
> Jan 20 20:53:52 localhost kernel: d4795f64 dffef300 dd93a0e4
> c9a9d200 c52ae540 c9a9d200 e90406cf c9a9d200
> Jan 20 20:53:52 localhost kernel: Call Trace: [<e9040ded>]
> snd_mixer_oss_get_volume1_vol [snd-mixer-oss] 0x6d (0xd4795ef4)
> Jan 20 20:53:52 localhost kernel: [<e90411d7>]
> snd_mixer_oss_get_volume1 [snd-mixer-oss] 0x207 (0xd4795f20)
> Jan 20 20:53:52 localhost kernel: [<e90406cf>]
> snd_mixer_oss_get_volume [snd-mixer-oss] 0x9f (0xd4795f4c)
> Jan 20 20:53:52 localhost kernel: [<e904086d>] snd_mixer_oss_ioctl1
> [snd-mixer-oss] 0xcd (0xd4795f70)
> Jan 20 20:53:52 localhost kernel: [<e9040b30>] snd_mixer_oss_ioctl
> [snd-mixer-oss] 0x0 (0xd4795f90)
> Jan 20 20:53:52 localhost kernel: [<c015570c>] sys_ioctl [kernel]
> 0xbc (0xd4795f94)
> Jan 20 20:53:52 localhost kernel: [<c014561a>] sys_open [kernel] 0x8a
> (0xd4795fa8)
> Jan 20 20:53:52 localhost kernel: [<c01099df>] system_call [kernel]
> 0x33 (0xd4795fc0)
> Jan 20 20:53:52 localhost kernel:
> Jan 20 20:53:52 localhost kernel:
> Jan 20 20:53:52 localhost kernel: Code: 8b 82 b0 00 00 00 85 c0 75 09
> 83 ba b4 00 00 00 01 74 22 c7
>
>
>
> ____________________________________
> http://www.logofun.pobox.sk - urobte radost svojmu telefonu
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Not important oops
2004-01-21 18:40 ` Takashi Iwai
@ 2004-01-21 18:49 ` Jaroslav Kysela
2004-01-21 18:58 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Jaroslav Kysela @ 2004-01-21 18:49 UTC (permalink / raw)
To: Takashi Iwai; +Cc: p z oooo, alsa-devel
On Wed, 21 Jan 2004, Takashi Iwai wrote:
> At Wed, 21 Jan 2004 13:55:53 +0100,
> p z oooo wrote:
> >
> > Hi,
> >
> > When I remove control through hwdep layer on emu10k1
> > driver when in use by oss emulation I got oops.
> > This is because oss emulation holds pointer to this control.
> > Is there any api to disable an then enable oss emulation or
> > only proc interface ???
>
> hmm weird, the access to ctl elements in mixer_oss.c is restricted
> with card->controls_rwsem. since snd_emu10k1_del_controls issues
> down_write() for it, it must be safe...
I think that he meant that slot->kcontrol members are not removed.
We need probably rebuild the OSS mixer -> ALSA control connections when
a control - which is used with the OSS mixer code - was removed.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Not important oops
2004-01-21 18:49 ` Jaroslav Kysela
@ 2004-01-21 18:58 ` Takashi Iwai
2004-01-22 0:29 ` James Courtier-Dutton
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2004-01-21 18:58 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: p z oooo, alsa-devel
At Wed, 21 Jan 2004 19:49:39 +0100 (CET),
Jaroslav wrote:
>
> On Wed, 21 Jan 2004, Takashi Iwai wrote:
>
> > At Wed, 21 Jan 2004 13:55:53 +0100,
> > p z oooo wrote:
> > >
> > > Hi,
> > >
> > > When I remove control through hwdep layer on emu10k1
> > > driver when in use by oss emulation I got oops.
> > > This is because oss emulation holds pointer to this control.
> > > Is there any api to disable an then enable oss emulation or
> > > only proc interface ???
> >
> > hmm weird, the access to ctl elements in mixer_oss.c is restricted
> > with card->controls_rwsem. since snd_emu10k1_del_controls issues
> > down_write() for it, it must be safe...
>
> I think that he meant that slot->kcontrol members are not removed.
ah yes, i overlooked that.
> We need probably rebuild the OSS mixer -> ALSA control connections when
> a control - which is used with the OSS mixer code - was removed.
or, store only the snd_ctl_elem_id instead of kcontrol, and retrieve
the control at each time. since the access to the mixer element is
less frequent than pcm, the overhead by this won't be too much, i
think.
but rebuilding would be better, when the mixer elements are completely
changed and become incompatible with the old setting.
we can use notify handler for this (e.g. SND_MIXER_OSS_NOTIFY_RECONFIGURE).
(but the caller should be blocked until the notification is processed,
otherwise there would be a race condition.)
Takashi
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Not important oops
2004-01-21 18:58 ` Takashi Iwai
@ 2004-01-22 0:29 ` James Courtier-Dutton
2004-01-22 11:41 ` Jaroslav Kysela
0 siblings, 1 reply; 6+ messages in thread
From: James Courtier-Dutton @ 2004-01-22 0:29 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Jaroslav Kysela, p z oooo, alsa-devel
Takashi Iwai wrote:
> At Wed, 21 Jan 2004 19:49:39 +0100 (CET),
> Jaroslav wrote:
>
>>On Wed, 21 Jan 2004, Takashi Iwai wrote:
>>
>>
>>>At Wed, 21 Jan 2004 13:55:53 +0100,
>>>p z oooo wrote:
>>>
>>>>Hi,
>>>>
>>>>When I remove control through hwdep layer on emu10k1
>>>>driver when in use by oss emulation I got oops.
>>>>This is because oss emulation holds pointer to this control.
>>>>Is there any api to disable an then enable oss emulation or
>>>>only proc interface ???
>>>
>>>hmm weird, the access to ctl elements in mixer_oss.c is restricted
>>>with card->controls_rwsem. since snd_emu10k1_del_controls issues
>>>down_write() for it, it must be safe...
>>
>>I think that he meant that slot->kcontrol members are not removed.
>
>
> ah yes, i overlooked that.
>
>
>>We need probably rebuild the OSS mixer -> ALSA control connections when
>>a control - which is used with the OSS mixer code - was removed.
>
>
> or, store only the snd_ctl_elem_id instead of kcontrol, and retrieve
> the control at each time. since the access to the mixer element is
> less frequent than pcm, the overhead by this won't be too much, i
> think.
>
> but rebuilding would be better, when the mixer elements are completely
> changed and become incompatible with the old setting.
>
> we can use notify handler for this (e.g. SND_MIXER_OSS_NOTIFY_RECONFIGURE).
> (but the caller should be blocked until the notification is processed,
> otherwise there would be a race condition.)
>
>
> Takashi
>
While you are looking at the oss emulation mixer, there is another bug
there.
User application does VOL++.
OSS has a range from 0-100
ALSA uses hardware range of 0-31.
THus: -
OSS VOL=0
OSS VOL++
ALSA VOL stays at 0
OSS READ VOL, = 0;
It seems like to emulate OSS correctly, one needs to hold volume values
in the OSS mixer emulation code, instead of just passing them through to
the ALSA mixer.
Cheers
James
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Not important oops
2004-01-22 0:29 ` James Courtier-Dutton
@ 2004-01-22 11:41 ` Jaroslav Kysela
0 siblings, 0 replies; 6+ messages in thread
From: Jaroslav Kysela @ 2004-01-22 11:41 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
On Thu, 22 Jan 2004, James Courtier-Dutton wrote:
> User application does VOL++.
> OSS has a range from 0-100
> ALSA uses hardware range of 0-31.
> THus: -
> OSS VOL=0
> OSS VOL++
> ALSA VOL stays at 0
> OSS READ VOL, = 0;
It should work. We have correction for this case in snd_mixer_oss_conv1().
Perhaps, the code has a bug somewhere. Can you write a small code which
shows this bug for debugging?
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-01-22 11:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-21 12:55 Not important oops p z oooo
2004-01-21 18:40 ` Takashi Iwai
2004-01-21 18:49 ` Jaroslav Kysela
2004-01-21 18:58 ` Takashi Iwai
2004-01-22 0:29 ` James Courtier-Dutton
2004-01-22 11:41 ` Jaroslav Kysela
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.