Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
On Thu, Jul 27, 2017 at 02:39:43AM -0700, Tony Lindgren wrote: > * Takashi Iwai[170718 02:38]: > > The problem manifests itself as an unblanaced of node reference. > > The node is released mistakenly at of_node_put() and this is caught as > > sleep-in-atomic, fortunately. > > So likely either something forgot to take the node ref or it hits the > > unreference due to the missing object by the implicit probe disorder, > > etc, I suppose. > Yup you're right. This is what happens, will send a fix for it shortly. There was also a separate thread where people were trying to fix this having run into it elsewhere. The of_graph APIs look pretty confusing from a user point of view sadly :( signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
On Thu, Jul 27, 2017 at 02:39:43AM -0700, Tony Lindgren wrote: > * Takashi Iwai [170718 02:38]: > > The problem manifests itself as an unblanaced of node reference. > > The node is released mistakenly at of_node_put() and this is caught as > > sleep-in-atomic, fortunately. > > So likely either something forgot to take the node ref or it hits the > > unreference due to the missing object by the implicit probe disorder, > > etc, I suppose. > Yup you're right. This is what happens, will send a fix for it shortly. There was also a separate thread where people were trying to fix this having run into it elsewhere. The of_graph APIs look pretty confusing from a user point of view sadly :( signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Takashi Iwai[170718 02:38]: > > The problem manifests itself as an unblanaced of node reference. > The node is released mistakenly at of_node_put() and this is caught as > sleep-in-atomic, fortunately. > > So likely either something forgot to take the node ref or it hits the > unreference due to the missing object by the implicit probe disorder, > etc, I suppose. Yup you're right. This is what happens, will send a fix for it shortly. Regards, Tony
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Takashi Iwai [170718 02:38]: > > The problem manifests itself as an unblanaced of node reference. > The node is released mistakenly at of_node_put() and this is caught as > sleep-in-atomic, fortunately. > > So likely either something forgot to take the node ref or it hits the > unreference due to the missing object by the implicit probe disorder, > etc, I suppose. Yup you're right. This is what happens, will send a fix for it shortly. Regards, Tony
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
On Tue, 18 Jul 2017 11:29:31 +0200, Sebastian Reichel wrote: > > Hi, > > On Mon, Jul 17, 2017 at 10:48:33PM -0700, Tony Lindgren wrote: > > * Sebastian Reichel[170717 07:14]: > > > Hi, > > > > > > On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > > > > * Sebastian Reichel [170717 03:13]: > > > > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > > > > * Sebastian Reichel [170712 > > > > > > 08:19]: > > > > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > > > > enabled as a loadable module. However loading it oopses for me, > > > > > > see below. Maybe some dependencies are missing? > > > > > > > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > > > > Looking at the stacktrace it seems to be a bug in audio graph > > > > > card and not in the codec driver. > > > > > > > > OK I do also have: > > > > > > > > CONFIG_DEBUG_LOCKDEP=y > > > > CONFIG_DEBUG_ATOMIC_SLEEP=y > > > > > > I added those and I do not get a stacktrace for anything sound > > > related and audio works. I noticed one issue in dapm routing, > > > that I accidently added. That will be fixed in PATCHv3, but its > > > in untestable path anyways (EXT capture, probably FM radio is > > > connected to EXT). > > > > Hmm maybe that was not with DEBUG_ATOMIC_SLEEP then? > > $ grep DEBUG_ATOMIC_SLEEP .config > CONFIG_DEBUG_ATOMIC_SLEEP=y > > > I also verified it does not happen unless your dts patch "ARM: > > dts: omap4-droid4: add soundcard" is applied. > > That's what I expected, since the stacktrace started in the > soundcard driver. > > > I doubt that having it as loadable module makes any difference > > here as it's the might_sleep() in __mutex_lock_common() producing > > the BUG. > > It might make a difference, since it changes the probe order. The > mutex may not even be called on my system. The problem manifests itself as an unblanaced of node reference. The node is released mistakenly at of_node_put() and this is caught as sleep-in-atomic, fortunately. So likely either something forgot to take the node ref or it hits the unreference due to the missing object by the implicit probe disorder, etc, I suppose. Takashi
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
On Tue, 18 Jul 2017 11:29:31 +0200, Sebastian Reichel wrote: > > Hi, > > On Mon, Jul 17, 2017 at 10:48:33PM -0700, Tony Lindgren wrote: > > * Sebastian Reichel [170717 07:14]: > > > Hi, > > > > > > On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > > > > * Sebastian Reichel [170717 03:13]: > > > > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > > > > * Sebastian Reichel [170712 > > > > > > 08:19]: > > > > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > > > > enabled as a loadable module. However loading it oopses for me, > > > > > > see below. Maybe some dependencies are missing? > > > > > > > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > > > > Looking at the stacktrace it seems to be a bug in audio graph > > > > > card and not in the codec driver. > > > > > > > > OK I do also have: > > > > > > > > CONFIG_DEBUG_LOCKDEP=y > > > > CONFIG_DEBUG_ATOMIC_SLEEP=y > > > > > > I added those and I do not get a stacktrace for anything sound > > > related and audio works. I noticed one issue in dapm routing, > > > that I accidently added. That will be fixed in PATCHv3, but its > > > in untestable path anyways (EXT capture, probably FM radio is > > > connected to EXT). > > > > Hmm maybe that was not with DEBUG_ATOMIC_SLEEP then? > > $ grep DEBUG_ATOMIC_SLEEP .config > CONFIG_DEBUG_ATOMIC_SLEEP=y > > > I also verified it does not happen unless your dts patch "ARM: > > dts: omap4-droid4: add soundcard" is applied. > > That's what I expected, since the stacktrace started in the > soundcard driver. > > > I doubt that having it as loadable module makes any difference > > here as it's the might_sleep() in __mutex_lock_common() producing > > the BUG. > > It might make a difference, since it changes the probe order. The > mutex may not even be called on my system. The problem manifests itself as an unblanaced of node reference. The node is released mistakenly at of_node_put() and this is caught as sleep-in-atomic, fortunately. So likely either something forgot to take the node ref or it hits the unreference due to the missing object by the implicit probe disorder, etc, I suppose. Takashi
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, On Mon, Jul 17, 2017 at 10:48:33PM -0700, Tony Lindgren wrote: > * Sebastian Reichel[170717 07:14]: > > Hi, > > > > On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > > > * Sebastian Reichel [170717 03:13]: > > > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > > > * Sebastian Reichel [170712 > > > > > 08:19]: > > > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > > > enabled as a loadable module. However loading it oopses for me, > > > > > see below. Maybe some dependencies are missing? > > > > > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > > > Looking at the stacktrace it seems to be a bug in audio graph > > > > card and not in the codec driver. > > > > > > OK I do also have: > > > > > > CONFIG_DEBUG_LOCKDEP=y > > > CONFIG_DEBUG_ATOMIC_SLEEP=y > > > > I added those and I do not get a stacktrace for anything sound > > related and audio works. I noticed one issue in dapm routing, > > that I accidently added. That will be fixed in PATCHv3, but its > > in untestable path anyways (EXT capture, probably FM radio is > > connected to EXT). > > Hmm maybe that was not with DEBUG_ATOMIC_SLEEP then? $ grep DEBUG_ATOMIC_SLEEP .config CONFIG_DEBUG_ATOMIC_SLEEP=y > I also verified it does not happen unless your dts patch "ARM: > dts: omap4-droid4: add soundcard" is applied. That's what I expected, since the stacktrace started in the soundcard driver. > I doubt that having it as loadable module makes any difference > here as it's the might_sleep() in __mutex_lock_common() producing > the BUG. It might make a difference, since it changes the probe order. The mutex may not even be called on my system. -- Sebastian signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, On Mon, Jul 17, 2017 at 10:48:33PM -0700, Tony Lindgren wrote: > * Sebastian Reichel [170717 07:14]: > > Hi, > > > > On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > > > * Sebastian Reichel [170717 03:13]: > > > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > > > * Sebastian Reichel [170712 > > > > > 08:19]: > > > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > > > enabled as a loadable module. However loading it oopses for me, > > > > > see below. Maybe some dependencies are missing? > > > > > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > > > Looking at the stacktrace it seems to be a bug in audio graph > > > > card and not in the codec driver. > > > > > > OK I do also have: > > > > > > CONFIG_DEBUG_LOCKDEP=y > > > CONFIG_DEBUG_ATOMIC_SLEEP=y > > > > I added those and I do not get a stacktrace for anything sound > > related and audio works. I noticed one issue in dapm routing, > > that I accidently added. That will be fixed in PATCHv3, but its > > in untestable path anyways (EXT capture, probably FM radio is > > connected to EXT). > > Hmm maybe that was not with DEBUG_ATOMIC_SLEEP then? $ grep DEBUG_ATOMIC_SLEEP .config CONFIG_DEBUG_ATOMIC_SLEEP=y > I also verified it does not happen unless your dts patch "ARM: > dts: omap4-droid4: add soundcard" is applied. That's what I expected, since the stacktrace started in the soundcard driver. > I doubt that having it as loadable module makes any difference > here as it's the might_sleep() in __mutex_lock_common() producing > the BUG. It might make a difference, since it changes the probe order. The mutex may not even be called on my system. -- Sebastian signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Sebastian Reichel[170717 07:14]: > Hi, > > On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > > * Sebastian Reichel [170717 03:13]: > > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > > * Sebastian Reichel [170712 08:19]: > > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > > enabled as a loadable module. However loading it oopses for me, > > > > see below. Maybe some dependencies are missing? > > > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > > Looking at the stacktrace it seems to be a bug in audio graph > > > card and not in the codec driver. > > > > OK I do also have: > > > > CONFIG_DEBUG_LOCKDEP=y > > CONFIG_DEBUG_ATOMIC_SLEEP=y > > I added those and I do not get a stacktrace for anything sound > related and audio works. I noticed one issue in dapm routing, > that I accidently added. That will be fixed in PATCHv3, but its > in untestable path anyways (EXT capture, probably FM radio is > connected to EXT). Hmm maybe that was not with DEBUG_ATOMIC_SLEEP then? I also verified it does not happen unless your dts patch "ARM: dts: omap4-droid4: add soundcard" is applied. I doubt that having it as loadable module makes any difference here as it's the might_sleep() in __mutex_lock_common() producing the BUG. Regards, Tony
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Sebastian Reichel [170717 07:14]: > Hi, > > On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > > * Sebastian Reichel [170717 03:13]: > > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > > * Sebastian Reichel [170712 08:19]: > > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > > enabled as a loadable module. However loading it oopses for me, > > > > see below. Maybe some dependencies are missing? > > > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > > Looking at the stacktrace it seems to be a bug in audio graph > > > card and not in the codec driver. > > > > OK I do also have: > > > > CONFIG_DEBUG_LOCKDEP=y > > CONFIG_DEBUG_ATOMIC_SLEEP=y > > I added those and I do not get a stacktrace for anything sound > related and audio works. I noticed one issue in dapm routing, > that I accidently added. That will be fixed in PATCHv3, but its > in untestable path anyways (EXT capture, probably FM radio is > connected to EXT). Hmm maybe that was not with DEBUG_ATOMIC_SLEEP then? I also verified it does not happen unless your dts patch "ARM: dts: omap4-droid4: add soundcard" is applied. I doubt that having it as loadable module makes any difference here as it's the might_sleep() in __mutex_lock_common() producing the BUG. Regards, Tony
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > * Sebastian Reichel[170717 03:13]: > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > * Sebastian Reichel [170712 08:19]: > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > enabled as a loadable module. However loading it oopses for me, > > > see below. Maybe some dependencies are missing? > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > Looking at the stacktrace it seems to be a bug in audio graph > > card and not in the codec driver. > > OK I do also have: > > CONFIG_DEBUG_LOCKDEP=y > CONFIG_DEBUG_ATOMIC_SLEEP=y I added those and I do not get a stacktrace for anything sound related and audio works. I noticed one issue in dapm routing, that I accidently added. That will be fixed in PATCHv3, but its in untestable path anyways (EXT capture, probably FM radio is connected to EXT). -- Sebastian signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, On Mon, Jul 17, 2017 at 03:17:10AM -0700, Tony Lindgren wrote: > * Sebastian Reichel [170717 03:13]: > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > > * Sebastian Reichel [170712 08:19]: > > > > * Switch from simple-audio-card to audio-graph-card > > > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > > enabled as a loadable module. However loading it oopses for me, > > > see below. Maybe some dependencies are missing? > > > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > > Looking at the stacktrace it seems to be a bug in audio graph > > card and not in the codec driver. > > OK I do also have: > > CONFIG_DEBUG_LOCKDEP=y > CONFIG_DEBUG_ATOMIC_SLEEP=y I added those and I do not get a stacktrace for anything sound related and audio works. I noticed one issue in dapm routing, that I accidently added. That will be fixed in PATCHv3, but its in untestable path anyways (EXT capture, probably FM radio is connected to EXT). -- Sebastian signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Sebastian Reichel[170717 03:13]: > Hi, > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > * Sebastian Reichel [170712 08:19]: > > > * Switch from simple-audio-card to audio-graph-card > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > enabled as a loadable module. However loading it oopses for me, > > see below. Maybe some dependencies are missing? > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > Looking at the stacktrace it seems to be a bug in audio graph > card and not in the codec driver. OK I do also have: CONFIG_DEBUG_LOCKDEP=y CONFIG_DEBUG_ATOMIC_SLEEP=y Tony > > 8< > > BUG: sleeping function called from invalid context at > > kernel/locking/mutex.c:747 > > in_atomic(): 1, irqs_disabled(): 128, pid: 1590, name: modprobe > > INFO: lockdep is turned off. > > irq event stamp: 0 > > hardirqs last enabled at (0): [< (null)>] (null) > > hardirqs last disabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > > softirqs last enabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > > softirqs last disabled at (0): [< (null)>] (null) > > CPU: 0 PID: 1590 Comm: modprobe Tainted: GW 4.13.0-rc1+ #126 > > Hardware name: Generic OMAP4 (Flattened Device Tree) > > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > > [] (show_stack) from [] (dump_stack+0xac/0xe0) > > [] (dump_stack) from [] (___might_sleep+0x228/0x2ac) > > [] (___might_sleep) from [] (__mutex_lock+0x28/0x9fc) > > [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) > > [] (mutex_lock_nested) from [] (kernfs_remove+0x18/0x30) > > [] (kernfs_remove) from [] (kobject_del+0x14/0x44) > > [] (kobject_del) from [] (kobject_put+0x114/0x224) > > [] (kobject_put) from [] (of_get_next_parent+0x2c/0x4c) > > [] (of_get_next_parent) from [] > > (of_graph_get_port_parent+0x10/0x70) > > [] (of_graph_get_port_parent) from [] > > (asoc_simple_card_parse_graph_dai+0x98/0xe0 [snd_soc_simple_card_utils]) > > [] (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) > > from [] (asoc_graph_card_probe+0x200/0x444 > > [snd_soc_audio_graph_card]) > > [] (asoc_graph_card_probe [snd_soc_audio_graph_card]) from > > [] (platform_drv_probe+0x50/0xb0) > > [] (platform_drv_probe) from [] > > (driver_probe_device+0x33c/0x478) > > [] (driver_probe_device) from [] > > (__driver_attach+0xe8/0x110) > > [] (__driver_attach) from [] > > (bus_for_each_dev+0x6c/0xa0) > > [] (bus_for_each_dev) from [] > > (bus_add_driver+0x198/0x270) > > [] (bus_add_driver) from [] (driver_register+0x78/0xf4) > > [] (driver_register) from [] > > (do_one_initcall+0x3c/0x170) > > [] (do_one_initcall) from [] (do_init_module+0x5c/0x1e0) > > [] (do_init_module) from [] (load_module+0x1270/0x14ec) > > [] (load_module) from [] (SyS_finit_module+0xa8/0xec) > > [] (SyS_finit_module) from [] > > (ret_fast_syscall+0x0/0x1c) > > OF: ERROR: Bad of_node_put() on > > /ocp/spi@48098000/pmic@0/audio-codec/port@0/endpoint
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Sebastian Reichel [170717 03:13]: > Hi, > > On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > > * Sebastian Reichel [170712 08:19]: > > > * Switch from simple-audio-card to audio-graph-card > > > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > > enabled as a loadable module. However loading it oopses for me, > > see below. Maybe some dependencies are missing? > > It works for me on top of v4.13-rc1 (my kernel is monolithic). > Looking at the stacktrace it seems to be a bug in audio graph > card and not in the codec driver. OK I do also have: CONFIG_DEBUG_LOCKDEP=y CONFIG_DEBUG_ATOMIC_SLEEP=y Tony > > 8< > > BUG: sleeping function called from invalid context at > > kernel/locking/mutex.c:747 > > in_atomic(): 1, irqs_disabled(): 128, pid: 1590, name: modprobe > > INFO: lockdep is turned off. > > irq event stamp: 0 > > hardirqs last enabled at (0): [< (null)>] (null) > > hardirqs last disabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > > softirqs last enabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > > softirqs last disabled at (0): [< (null)>] (null) > > CPU: 0 PID: 1590 Comm: modprobe Tainted: GW 4.13.0-rc1+ #126 > > Hardware name: Generic OMAP4 (Flattened Device Tree) > > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > > [] (show_stack) from [] (dump_stack+0xac/0xe0) > > [] (dump_stack) from [] (___might_sleep+0x228/0x2ac) > > [] (___might_sleep) from [] (__mutex_lock+0x28/0x9fc) > > [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) > > [] (mutex_lock_nested) from [] (kernfs_remove+0x18/0x30) > > [] (kernfs_remove) from [] (kobject_del+0x14/0x44) > > [] (kobject_del) from [] (kobject_put+0x114/0x224) > > [] (kobject_put) from [] (of_get_next_parent+0x2c/0x4c) > > [] (of_get_next_parent) from [] > > (of_graph_get_port_parent+0x10/0x70) > > [] (of_graph_get_port_parent) from [] > > (asoc_simple_card_parse_graph_dai+0x98/0xe0 [snd_soc_simple_card_utils]) > > [] (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) > > from [] (asoc_graph_card_probe+0x200/0x444 > > [snd_soc_audio_graph_card]) > > [] (asoc_graph_card_probe [snd_soc_audio_graph_card]) from > > [] (platform_drv_probe+0x50/0xb0) > > [] (platform_drv_probe) from [] > > (driver_probe_device+0x33c/0x478) > > [] (driver_probe_device) from [] > > (__driver_attach+0xe8/0x110) > > [] (__driver_attach) from [] > > (bus_for_each_dev+0x6c/0xa0) > > [] (bus_for_each_dev) from [] > > (bus_add_driver+0x198/0x270) > > [] (bus_add_driver) from [] (driver_register+0x78/0xf4) > > [] (driver_register) from [] > > (do_one_initcall+0x3c/0x170) > > [] (do_one_initcall) from [] (do_init_module+0x5c/0x1e0) > > [] (do_init_module) from [] (load_module+0x1270/0x14ec) > > [] (load_module) from [] (SyS_finit_module+0xa8/0xec) > > [] (SyS_finit_module) from [] > > (ret_fast_syscall+0x0/0x1c) > > OF: ERROR: Bad of_node_put() on > > /ocp/spi@48098000/pmic@0/audio-codec/port@0/endpoint
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > * Sebastian Reichel[170712 08:19]: > > * Switch from simple-audio-card to audio-graph-card > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > enabled as a loadable module. However loading it oopses for me, > see below. Maybe some dependencies are missing? It works for me on top of v4.13-rc1 (my kernel is monolithic). Looking at the stacktrace it seems to be a bug in audio graph card and not in the codec driver. -- Sebastian > 8< > BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:747 > in_atomic(): 1, irqs_disabled(): 128, pid: 1590, name: modprobe > INFO: lockdep is turned off. > irq event stamp: 0 > hardirqs last enabled at (0): [< (null)>] (null) > hardirqs last disabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > softirqs last enabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > softirqs last disabled at (0): [< (null)>] (null) > CPU: 0 PID: 1590 Comm: modprobe Tainted: GW 4.13.0-rc1+ #126 > Hardware name: Generic OMAP4 (Flattened Device Tree) > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0xac/0xe0) > [] (dump_stack) from [] (___might_sleep+0x228/0x2ac) > [] (___might_sleep) from [] (__mutex_lock+0x28/0x9fc) > [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) > [] (mutex_lock_nested) from [] (kernfs_remove+0x18/0x30) > [] (kernfs_remove) from [] (kobject_del+0x14/0x44) > [] (kobject_del) from [] (kobject_put+0x114/0x224) > [] (kobject_put) from [] (of_get_next_parent+0x2c/0x4c) > [] (of_get_next_parent) from [] > (of_graph_get_port_parent+0x10/0x70) > [] (of_graph_get_port_parent) from [] > (asoc_simple_card_parse_graph_dai+0x98/0xe0 [snd_soc_simple_card_utils]) > [] (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) > from [] (asoc_graph_card_probe+0x200/0x444 > [snd_soc_audio_graph_card]) > [] (asoc_graph_card_probe [snd_soc_audio_graph_card]) from > [] (platform_drv_probe+0x50/0xb0) > [] (platform_drv_probe) from [] > (driver_probe_device+0x33c/0x478) > [] (driver_probe_device) from [] > (__driver_attach+0xe8/0x110) > [] (__driver_attach) from [] (bus_for_each_dev+0x6c/0xa0) > [] (bus_for_each_dev) from [] (bus_add_driver+0x198/0x270) > [] (bus_add_driver) from [] (driver_register+0x78/0xf4) > [] (driver_register) from [] (do_one_initcall+0x3c/0x170) > [] (do_one_initcall) from [] (do_init_module+0x5c/0x1e0) > [] (do_init_module) from [] (load_module+0x1270/0x14ec) > [] (load_module) from [] (SyS_finit_module+0xa8/0xec) > [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x1c) > OF: ERROR: Bad of_node_put() on > /ocp/spi@48098000/pmic@0/audio-codec/port@0/endpoint signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, On Mon, Jul 17, 2017 at 02:29:04AM -0700, Tony Lindgren wrote: > * Sebastian Reichel [170712 08:19]: > > * Switch from simple-audio-card to audio-graph-card > > Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD > enabled as a loadable module. However loading it oopses for me, > see below. Maybe some dependencies are missing? It works for me on top of v4.13-rc1 (my kernel is monolithic). Looking at the stacktrace it seems to be a bug in audio graph card and not in the codec driver. -- Sebastian > 8< > BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:747 > in_atomic(): 1, irqs_disabled(): 128, pid: 1590, name: modprobe > INFO: lockdep is turned off. > irq event stamp: 0 > hardirqs last enabled at (0): [< (null)>] (null) > hardirqs last disabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > softirqs last enabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 > softirqs last disabled at (0): [< (null)>] (null) > CPU: 0 PID: 1590 Comm: modprobe Tainted: GW 4.13.0-rc1+ #126 > Hardware name: Generic OMAP4 (Flattened Device Tree) > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (dump_stack+0xac/0xe0) > [] (dump_stack) from [] (___might_sleep+0x228/0x2ac) > [] (___might_sleep) from [] (__mutex_lock+0x28/0x9fc) > [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) > [] (mutex_lock_nested) from [] (kernfs_remove+0x18/0x30) > [] (kernfs_remove) from [] (kobject_del+0x14/0x44) > [] (kobject_del) from [] (kobject_put+0x114/0x224) > [] (kobject_put) from [] (of_get_next_parent+0x2c/0x4c) > [] (of_get_next_parent) from [] > (of_graph_get_port_parent+0x10/0x70) > [] (of_graph_get_port_parent) from [] > (asoc_simple_card_parse_graph_dai+0x98/0xe0 [snd_soc_simple_card_utils]) > [] (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) > from [] (asoc_graph_card_probe+0x200/0x444 > [snd_soc_audio_graph_card]) > [] (asoc_graph_card_probe [snd_soc_audio_graph_card]) from > [] (platform_drv_probe+0x50/0xb0) > [] (platform_drv_probe) from [] > (driver_probe_device+0x33c/0x478) > [] (driver_probe_device) from [] > (__driver_attach+0xe8/0x110) > [] (__driver_attach) from [] (bus_for_each_dev+0x6c/0xa0) > [] (bus_for_each_dev) from [] (bus_add_driver+0x198/0x270) > [] (bus_add_driver) from [] (driver_register+0x78/0xf4) > [] (driver_register) from [] (do_one_initcall+0x3c/0x170) > [] (do_one_initcall) from [] (do_init_module+0x5c/0x1e0) > [] (do_init_module) from [] (load_module+0x1270/0x14ec) > [] (load_module) from [] (SyS_finit_module+0xa8/0xec) > [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x1c) > OF: ERROR: Bad of_node_put() on > /ocp/spi@48098000/pmic@0/audio-codec/port@0/endpoint signature.asc Description: PGP signature
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Sebastian Reichel[170712 08:19]: > * Switch from simple-audio-card to audio-graph-card Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD enabled as a loadable module. However loading it oopses for me, see below. Maybe some dependencies are missing? Regards, Tony 8< BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 128, pid: 1590, name: modprobe INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [< (null)>] (null) hardirqs last disabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 softirqs last enabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 softirqs last disabled at (0): [< (null)>] (null) CPU: 0 PID: 1590 Comm: modprobe Tainted: GW 4.13.0-rc1+ #126 Hardware name: Generic OMAP4 (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xac/0xe0) [] (dump_stack) from [] (___might_sleep+0x228/0x2ac) [] (___might_sleep) from [] (__mutex_lock+0x28/0x9fc) [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [] (mutex_lock_nested) from [] (kernfs_remove+0x18/0x30) [] (kernfs_remove) from [] (kobject_del+0x14/0x44) [] (kobject_del) from [] (kobject_put+0x114/0x224) [] (kobject_put) from [] (of_get_next_parent+0x2c/0x4c) [] (of_get_next_parent) from [] (of_graph_get_port_parent+0x10/0x70) [] (of_graph_get_port_parent) from [] (asoc_simple_card_parse_graph_dai+0x98/0xe0 [snd_soc_simple_card_utils]) [] (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) from [] (asoc_graph_card_probe+0x200/0x444 [snd_soc_audio_graph_card]) [] (asoc_graph_card_probe [snd_soc_audio_graph_card]) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x33c/0x478) [] (driver_probe_device) from [] (__driver_attach+0xe8/0x110) [] (__driver_attach) from [] (bus_for_each_dev+0x6c/0xa0) [] (bus_for_each_dev) from [] (bus_add_driver+0x198/0x270) [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [] (driver_register) from [] (do_one_initcall+0x3c/0x170) [] (do_one_initcall) from [] (do_init_module+0x5c/0x1e0) [] (do_init_module) from [] (load_module+0x1270/0x14ec) [] (load_module) from [] (SyS_finit_module+0xa8/0xec) [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x1c) OF: ERROR: Bad of_node_put() on /ocp/spi@48098000/pmic@0/audio-codec/port@0/endpoint
Re: [PATCHv2 0/6] Motorola Droid 4 Audio Support
* Sebastian Reichel [170712 08:19]: > * Switch from simple-audio-card to audio-graph-card Gave this a quick try against v4.13-rc1 with SND_AUDIO_GRAPH_CARD enabled as a loadable module. However loading it oopses for me, see below. Maybe some dependencies are missing? Regards, Tony 8< BUG: sleeping function called from invalid context at kernel/locking/mutex.c:747 in_atomic(): 1, irqs_disabled(): 128, pid: 1590, name: modprobe INFO: lockdep is turned off. irq event stamp: 0 hardirqs last enabled at (0): [< (null)>] (null) hardirqs last disabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 softirqs last enabled at (0): [] copy_process.part.5+0x2c4/0x1ac8 softirqs last disabled at (0): [< (null)>] (null) CPU: 0 PID: 1590 Comm: modprobe Tainted: GW 4.13.0-rc1+ #126 Hardware name: Generic OMAP4 (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xac/0xe0) [] (dump_stack) from [] (___might_sleep+0x228/0x2ac) [] (___might_sleep) from [] (__mutex_lock+0x28/0x9fc) [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [] (mutex_lock_nested) from [] (kernfs_remove+0x18/0x30) [] (kernfs_remove) from [] (kobject_del+0x14/0x44) [] (kobject_del) from [] (kobject_put+0x114/0x224) [] (kobject_put) from [] (of_get_next_parent+0x2c/0x4c) [] (of_get_next_parent) from [] (of_graph_get_port_parent+0x10/0x70) [] (of_graph_get_port_parent) from [] (asoc_simple_card_parse_graph_dai+0x98/0xe0 [snd_soc_simple_card_utils]) [] (asoc_simple_card_parse_graph_dai [snd_soc_simple_card_utils]) from [] (asoc_graph_card_probe+0x200/0x444 [snd_soc_audio_graph_card]) [] (asoc_graph_card_probe [snd_soc_audio_graph_card]) from [] (platform_drv_probe+0x50/0xb0) [] (platform_drv_probe) from [] (driver_probe_device+0x33c/0x478) [] (driver_probe_device) from [] (__driver_attach+0xe8/0x110) [] (__driver_attach) from [] (bus_for_each_dev+0x6c/0xa0) [] (bus_for_each_dev) from [] (bus_add_driver+0x198/0x270) [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [] (driver_register) from [] (do_one_initcall+0x3c/0x170) [] (do_one_initcall) from [] (do_init_module+0x5c/0x1e0) [] (do_init_module) from [] (load_module+0x1270/0x14ec) [] (load_module) from [] (SyS_finit_module+0xa8/0xec) [] (SyS_finit_module) from [] (ret_fast_syscall+0x0/0x1c) OF: ERROR: Bad of_node_put() on /ocp/spi@48098000/pmic@0/audio-codec/port@0/endpoint
[PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, This adds audio support to Motorola Droid 4. Tested: - Playing via both DACs using Speaker, Earpiece, Headphone - Recording using internal Mic - Volume Controls Known not to work: - 3.5mm detection support (requires closed source firmware, needs further investigation) - Modem / Bluetooth Audio (actually untested, but probably needs some quirks) Changes since PATCHv1: * Add patch from Tony exporting soc_dpcm_runtime_update * Integrate DT patch for vaudio initial mode * Split dt-binding from codec patch and add Ack from Rob * Fix CPCAP position in Kconfig/Makefile * Avoid "err +=" constructs * Simplify reset function * Drop cpcap_audio_read/write helpers * Do not use tertiary operator for mute register value * Update Input Mux logic * Switch from simple-audio-card to audio-graph-card -- Sebastian Sebastian Reichel (5): dt-bindings: sound: add motorola,cpcap-audio-codec ASoC: codec: cpcap: new codec ARM: dts: motorola-cpcap-mapphone: add audio-codec ARM: dts: motorola-cpcap-mapphone: set initial mode for vaudio ARM: dts: omap4-droid4: add soundcard Tony Lindgren (1): ALSA: pcm: Export soc_dpcm_runtime_update .../bindings/sound/motorola,cpcap-audio-codec.txt | 19 + arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi |7 + arch/arm/boot/dts/omap4-droid4-xt894.dts | 84 + sound/soc/codecs/Kconfig |5 + sound/soc/codecs/Makefile |2 + sound/soc/codecs/cpcap.c | 1607 sound/soc/soc-pcm.c|2 + 7 files changed, 1726 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/motorola,cpcap-audio-codec.txt create mode 100644 sound/soc/codecs/cpcap.c -- 2.13.2
[PATCHv2 0/6] Motorola Droid 4 Audio Support
Hi, This adds audio support to Motorola Droid 4. Tested: - Playing via both DACs using Speaker, Earpiece, Headphone - Recording using internal Mic - Volume Controls Known not to work: - 3.5mm detection support (requires closed source firmware, needs further investigation) - Modem / Bluetooth Audio (actually untested, but probably needs some quirks) Changes since PATCHv1: * Add patch from Tony exporting soc_dpcm_runtime_update * Integrate DT patch for vaudio initial mode * Split dt-binding from codec patch and add Ack from Rob * Fix CPCAP position in Kconfig/Makefile * Avoid "err +=" constructs * Simplify reset function * Drop cpcap_audio_read/write helpers * Do not use tertiary operator for mute register value * Update Input Mux logic * Switch from simple-audio-card to audio-graph-card -- Sebastian Sebastian Reichel (5): dt-bindings: sound: add motorola,cpcap-audio-codec ASoC: codec: cpcap: new codec ARM: dts: motorola-cpcap-mapphone: add audio-codec ARM: dts: motorola-cpcap-mapphone: set initial mode for vaudio ARM: dts: omap4-droid4: add soundcard Tony Lindgren (1): ALSA: pcm: Export soc_dpcm_runtime_update .../bindings/sound/motorola,cpcap-audio-codec.txt | 19 + arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi |7 + arch/arm/boot/dts/omap4-droid4-xt894.dts | 84 + sound/soc/codecs/Kconfig |5 + sound/soc/codecs/Makefile |2 + sound/soc/codecs/cpcap.c | 1607 sound/soc/soc-pcm.c|2 + 7 files changed, 1726 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/motorola,cpcap-audio-codec.txt create mode 100644 sound/soc/codecs/cpcap.c -- 2.13.2