public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* Memory and Cycles overhead in <snd_soc_init>
@ 2015-02-10 11:58 Bhaskara rao Budiredla
  2015-02-10 16:50 ` Lars-Peter Clausen
  0 siblings, 1 reply; 4+ messages in thread
From: Bhaskara rao Budiredla @ 2015-02-10 11:58 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai

Hi - May I know the purpose of the call to snd_soc_init( ) from kernel_init
thread? snd_soc_init( ) is trying to register a dummy platform device
"snd-soc-dummy" containing (dummy_codec/dummy_platform) and a sound card
device. Neither of those devices are added to platform bus before they are
making a call to platform_driver_register( ). Due to that platform_match(
) will fail and they will not be added to platform bus . Thus,
snd_soc_init( ) is not doing any useful task during kernel boot time.

Could someone help me if my understanding is correct? If I am correct,
shall we remove the call to snd_soc_init( ) in kernel_init thread to save
boot time and memory? Otherwise please suggest me where those dummy devices
and sound card gets added to platform bus and the purpose of creating them?

Thanks,
Bhaskara

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Memory and Cycles overhead in <snd_soc_init>
  2015-02-10 11:58 Memory and Cycles overhead in <snd_soc_init> Bhaskara rao Budiredla
@ 2015-02-10 16:50 ` Lars-Peter Clausen
  2015-02-11  9:40   ` Bhaskara rao Budiredla
  0 siblings, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2015-02-10 16:50 UTC (permalink / raw)
  To: Bhaskara rao Budiredla, alsa-devel; +Cc: tiwai

On 02/10/2015 12:58 PM, Bhaskara rao Budiredla wrote:
> Hi - May I know the purpose of the call to snd_soc_init( ) from kernel_init
> thread? snd_soc_init( ) is trying to register a dummy platform device
> "snd-soc-dummy" containing (dummy_codec/dummy_platform) and a sound card
> device. Neither of those devices are added to platform bus before they are
> making a call to platform_driver_register( ). Due to that platform_match(
> ) will fail and they will not be added to platform bus . Thus,
> snd_soc_init( ) is not doing any useful task during kernel boot time.
>
> Could someone help me if my understanding is correct? If I am correct,
> shall we remove the call to snd_soc_init( ) in kernel_init thread to save
> boot time and memory? Otherwise please suggest me where those dummy devices
> and sound card gets added to platform bus and the purpose of creating them?

All of the devices and driver registered in snd_soc_init() are used.

- Lars

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Memory and Cycles overhead in <snd_soc_init>
  2015-02-10 16:50 ` Lars-Peter Clausen
@ 2015-02-11  9:40   ` Bhaskara rao Budiredla
  2015-02-11 12:47     ` Lars-Peter Clausen
  0 siblings, 1 reply; 4+ messages in thread
From: Bhaskara rao Budiredla @ 2015-02-11  9:40 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: tiwai, alsa-devel

Thanks Lars for the help. Could you please tell me the use case for those
devices and drivers creation? Even pointing to the code snippet is helpful.

Thanks,
Bhaskara

On Tue, Feb 10, 2015 at 10:20 PM, Lars-Peter Clausen <lars@metafoo.de>
wrote:

> On 02/10/2015 12:58 PM, Bhaskara rao Budiredla wrote:
>
>> Hi - May I know the purpose of the call to snd_soc_init( ) from
>> kernel_init
>> thread? snd_soc_init( ) is trying to register a dummy platform device
>> "snd-soc-dummy" containing (dummy_codec/dummy_platform) and a sound card
>> device. Neither of those devices are added to platform bus before they are
>> making a call to platform_driver_register( ). Due to that platform_match(
>> ) will fail and they will not be added to platform bus . Thus,
>> snd_soc_init( ) is not doing any useful task during kernel boot time.
>>
>> Could someone help me if my understanding is correct? If I am correct,
>> shall we remove the call to snd_soc_init( ) in kernel_init thread to save
>> boot time and memory? Otherwise please suggest me where those dummy
>> devices
>> and sound card gets added to platform bus and the purpose of creating
>> them?
>>
>
> All of the devices and driver registered in snd_soc_init() are used.
>
> - Lars
>
>
.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Memory and Cycles overhead in <snd_soc_init>
  2015-02-11  9:40   ` Bhaskara rao Budiredla
@ 2015-02-11 12:47     ` Lars-Peter Clausen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2015-02-11 12:47 UTC (permalink / raw)
  To: Bhaskara rao Budiredla; +Cc: tiwai, alsa-devel

On 02/11/2015 10:40 AM, Bhaskara rao Budiredla wrote:
> Thanks Lars for the help. Could you please tell me the use case for those
> devices and drivers creation? Even pointing to the code snippet is helpful.

The soc-audio platform driver is used by some board drivers which register 
the matching platform device. Just grep for soc-audio. And both the 
snd-soc-dummy driver and device are registered in snd_soc_util_init(). So 
the device should actually bind immediately. Both the dummy codec and the 
dummy platform are sue by some DPCM platforms. Again just grep for them to 
find the examples.

I'm not sure what this discussion is about. Registering the devices and 
drivers should talk up a pretty much insignificant slice of the whole boot 
time, so I don't understand why you want to remove this.

- Lars

> Thanks,
> Bhaskara
> On Tue, Feb 10, 2015 at 10:20 PM, Lars-Peter Clausen <lars@metafoo.de
> <mailto:lars@metafoo.de>> wrote:
>
>     On 02/10/2015 12:58 PM, Bhaskara rao Budiredla wrote:
>
>         Hi - May I know the purpose of the call to snd_soc_init( ) from
>         kernel_init
>         thread? snd_soc_init( ) is trying to register a dummy platform device
>         "snd-soc-dummy" containing (dummy_codec/dummy_platform) and a sound card
>         device. Neither of those devices are added to platform bus before
>         they are
>         making a call to platform_driver_register( ). Due to that
>         platform_match(
>         ) will fail and they will not be added to platform bus . Thus,
>         snd_soc_init( ) is not doing any useful task during kernel boot time.
>
>         Could someone help me if my understanding is correct? If I am correct,
>         shall we remove the call to snd_soc_init( ) in kernel_init thread to
>         save
>         boot time and memory? Otherwise please suggest me where those dummy
>         devices
>         and sound card gets added to platform bus and the purpose of
>         creating them?
>
>
>     All of the devices and driver registered in snd_soc_init() are used.
>
>     - Lars
>
>
> .

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-11 12:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 11:58 Memory and Cycles overhead in <snd_soc_init> Bhaskara rao Budiredla
2015-02-10 16:50 ` Lars-Peter Clausen
2015-02-11  9:40   ` Bhaskara rao Budiredla
2015-02-11 12:47     ` Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox