All of lore.kernel.org
 help / color / mirror / Atom feed
* Alsa Soc details
@ 2016-07-14 13:07 Chemsi Mehdi
  2016-07-19  3:54 ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Chemsi Mehdi @ 2016-07-14 13:07 UTC (permalink / raw)
  To: alsa-devel

Dear expert,



I have some ALSA questions please:



   -

   Why codec driver of ASOC are always I2C based ?, is codec driver role is
   only control of audio hardware(set/reset registers only)?
   -

   There should be three drivers : machine driver, platform driver and
   codec driver , all of them have .probe and . remove , what is relation
   between all the probes? removes ?
   -

   As far I know McBSP is source of audio coming from host and I2C/ McBSP
   have no direct relation so why we connect platform driver (McBSP) with
   codec driver(I2C) Via DAI ?
   -

   When calling snd_pcm_open from userspace which kernel API is called ?
   snd_pcm_lib_ioctl or  snd_stm_spdif_player_open ? if
   snd_stm_spdif_player_open so when called snd_pcm_lib_ioctl ?
   -

   How ALSA KERNELAPI is connected to ALSA SOC CORE, via which
   calls/mechanism ?





Thanks q lot for your great help



LINI

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

* Re: Alsa Soc details
  2016-07-14 13:07 Alsa Soc details Chemsi Mehdi
@ 2016-07-19  3:54 ` Vinod Koul
  2016-07-19  8:02   ` Chemsi Mehdi
  0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2016-07-19  3:54 UTC (permalink / raw)
  To: Chemsi Mehdi; +Cc: alsa-devel

On Thu, Jul 14, 2016 at 03:07:20PM +0200, Chemsi Mehdi wrote:
> 
>    Why codec driver of ASOC are always I2C based ?, is codec driver role is
>    only control of audio hardware(set/reset registers only)?

That is not true, there are few SPI based and one i wrote which was a
different method altogether. Mostly the audio embedded industry uses I2C
codecs so they are very common

>    There should be three drivers : machine driver, platform driver and
>    codec driver , all of them have .probe and . remove , what is relation
>    between all the probes? removes ?

All of these have two probes :)

First one in hardware probe. Nothing unusual here.
Second is the ASoC probe. Each of these registers a component. The ASoC core
will create the sound card only when all of these components are present. At
that time the ASoC probe in invoked signalling card creation to driver


>    As far I know McBSP is source of audio coming from host and I2C/ McBSP
>    have no direct relation so why we connect platform driver (McBSP) with
>    codec driver(I2C) Via DAI ?

You will have to ask driver authors that, pls cc them


>    When calling snd_pcm_open from userspace which kernel API is called ?
>    snd_pcm_lib_ioctl or  snd_stm_spdif_player_open ? if
>    snd_stm_spdif_player_open so when called snd_pcm_lib_ioctl ?

system call open()

>    How ALSA KERNELAPI is connected to ALSA SOC CORE, via which
>    calls/mechanism ?

The alsa provides driver callbacks. See struct snd_pcm_ops. ASoC provides
the same to asoc driver as well! Additionally we have dai_ops as well.

ASoC has its own ops for card and then it invokes platform, codec pcm and
dai_ops. See sound/soc/soc-pcm.c

-- 
~Vinod

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

* Re: Alsa Soc details
  2016-07-19  3:54 ` Vinod Koul
@ 2016-07-19  8:02   ` Chemsi Mehdi
  0 siblings, 0 replies; 3+ messages in thread
From: Chemsi Mehdi @ 2016-07-19  8:02 UTC (permalink / raw)
  To: Vinod Koul; +Cc: alsa-devel

Great thanks Vinod for your reactivity.
Always helpful

2016-07-19 5:54 GMT+02:00 Vinod Koul <vinod.koul@intel.com>:

> On Thu, Jul 14, 2016 at 03:07:20PM +0200, Chemsi Mehdi wrote:
> >
> >    Why codec driver of ASOC are always I2C based ?, is codec driver role
> is
> >    only control of audio hardware(set/reset registers only)?
>
> That is not true, there are few SPI based and one i wrote which was a
> different method altogether. Mostly the audio embedded industry uses I2C
> codecs so they are very common
>
> >    There should be three drivers : machine driver, platform driver and
> >    codec driver , all of them have .probe and . remove , what is relation
> >    between all the probes? removes ?
>
> All of these have two probes :)
>
> First one in hardware probe. Nothing unusual here.
> Second is the ASoC probe. Each of these registers a component. The ASoC
> core
> will create the sound card only when all of these components are present.
> At
> that time the ASoC probe in invoked signalling card creation to driver
>
>
> >    As far I know McBSP is source of audio coming from host and I2C/ McBSP
> >    have no direct relation so why we connect platform driver (McBSP) with
> >    codec driver(I2C) Via DAI ?
>
> You will have to ask driver authors that, pls cc them
>
>
> >    When calling snd_pcm_open from userspace which kernel API is called ?
> >    snd_pcm_lib_ioctl or  snd_stm_spdif_player_open ? if
> >    snd_stm_spdif_player_open so when called snd_pcm_lib_ioctl ?
>
> system call open()
>
> >    How ALSA KERNELAPI is connected to ALSA SOC CORE, via which
> >    calls/mechanism ?
>
> The alsa provides driver callbacks. See struct snd_pcm_ops. ASoC provides
> the same to asoc driver as well! Additionally we have dai_ops as well.
>
> ASoC has its own ops for card and then it invokes platform, codec pcm and
> dai_ops. See sound/soc/soc-pcm.c
>
> --
> ~Vinod
>

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

end of thread, other threads:[~2016-07-19  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-14 13:07 Alsa Soc details Chemsi Mehdi
2016-07-19  3:54 ` Vinod Koul
2016-07-19  8:02   ` Chemsi Mehdi

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.