<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.alsa.devel">
    <title>gmane.linux.alsa.devel</title>
    <link>http://blog.gmane.org/gmane.linux.alsa.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97884"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97883"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97882"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97881"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97880"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97879"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97878"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97877"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97876"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97875"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97874"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97873"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97872"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97871"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97870"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97868"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97867"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97866"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97865"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.alsa.devel/97864"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97884">
    <title>Re: [PATCH v5] sound/soc/lapis: add platform driver for ML7213</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97884</link>
    <description>&lt;pre&gt;First you should not be writing your own dma driver, it *needs* to use
dmaenegine. We already have bunch of driver supported, so there may be a
case that existing driver works straight or with little modifications.
Using your own dma driver is a dead road, so sooner you move over better
it is.

One you move then it would be easy for you to use soc-dmaengine. If your
driver doesn't support cyclic; nothing stops from you emulating that in
S/W. And given that you have already contributed to dmaengine subsystem,
it should be easy for you :)


&lt;/pre&gt;</description>
    <dc:creator>Vinod Koul</dc:creator>
    <dc:date>2012-05-25T10:20:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97883">
    <title>Re: [PATCH 2/4] ASoC: mmp: add audio dma support</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97883</link>
    <description>&lt;pre&gt;
This is where dealing with slave DMA channels in a virtualized setup
becomes a far better solution than trying to assign a particular
physical channel at request time.

What we may wish to think about is having a way for slave drivers to
assert to DMA engine the priority of a channel, which they can change
dynamically according to what they're doing.  Eg, an ALSA driver would
leave the channel low priority while it's not expecting to be used, but
as soon as we see the prepare call, set it to high priority.

The DMA engine driver could use that to decide to assign a physical
channel to the virtual channel, so that DMA can start as soon as
possible even with other activity on the DMA engine.

However, I've yet to see any setup where the number of physical DMA
channels available exceeds the number of actual _simultaneous_ users.
Even with the five channels on SA11x0 shared between 12? peripherals,
with my DMA engine driver I've only seen one or two physical channels
being used simultaneously.

&lt;/pre&gt;</description>
    <dc:creator>Russell King - ARM Linux</dc:creator>
    <dc:date>2012-05-25T09:42:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97882">
    <title>Re: [PATCH v5] sound/soc/lapis: add platform driverfor ML7213</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97882</link>
    <description>&lt;pre&gt;On Thu, May 24, 2012 at 7:07 PM, Mark Brown
&amp;lt;broonie&amp;lt; at &amp;gt;opensource.wolfsonmicro.com&amp;gt; wrote:

I'm not so familiar with Linux's DMA idea.
So we don't know whether non-cyclic dmaengine has problem or not.

Until now, we've developed device drivers use DMA driver like UART, SPI.
These drivers are  implemented using the same way, you called
"non-cyclic", and already applied.

As you said, common code for DMA code can be best solution.
However, currently, the code is nothing.
So, I want you to accept our driver as first step.
Because I think supporting new device is more important for linux than
dmaengine common.

thanks
&lt;/pre&gt;</description>
    <dc:creator>Tomoya MORINAGA</dc:creator>
    <dc:date>2012-05-25T09:30:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97881">
    <title>Re: [PATCH 2/4] ASoC: mmp: add audio dma support</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97881</link>
    <description>&lt;pre&gt;Thanks Russell and Vinod.

On Fri, May 25, 2012 at 4:05 PM, Russell King - ARM Linux &amp;lt;
linux&amp;lt; at &amp;gt;arm.linux.org.uk&amp;gt; wrote:

Will look into soc-dmaengine.



Do you mean at open time, like snd_dmaengine_pcm_open.
The channel resource is limited and better get dynamically.
As a  result the pcm_new and preallocate already called before.


&lt;/pre&gt;</description>
    <dc:creator>zhangfei gao</dc:creator>
    <dc:date>2012-05-25T08:47:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97880">
    <title>Re: [PATCH 2/4] ASoC: mmp: add audio dma support</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97880</link>
    <description>&lt;pre&gt;
Note also...


This should be done at probe time, so we know the struct device, so
that...


... this uses the right device, and...


... we don't need crap like this.

Because then we'll be allocating buffers against the _right_ struct device
which is the DMA engine struct device.
--
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Russell King - ARM Linux</dc:creator>
    <dc:date>2012-05-25T08:05:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97879">
    <title>Re: [PATCH 2/4] ASoC: mmp: add audio dma support</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97879</link>
    <description>&lt;pre&gt;Looks like this is *not* using soc-dmaengine library, why?


&lt;/pre&gt;</description>
    <dc:creator>Vinod Koul</dc:creator>
    <dc:date>2012-05-25T07:53:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97878">
    <title>Re: To disable dma_area caching (twice)</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97878</link>
    <description>&lt;pre&gt;At Fri, 18 May 2012 14:18:57 +0900,
MASAO TAKAHASHI wrote:

The "right" fix would be to implement a proper dma_mmap_coherent() for
SH architecture.  It's found for ARM and some PPC variants, but for
neither SH nor MIPS.


thanks,

Takashi
&lt;/pre&gt;</description>
    <dc:creator>Takashi Iwai</dc:creator>
    <dc:date>2012-05-25T07:28:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97877">
    <title>[PATCH] ASoC: fsi: use PIO handler if DMA handler wasinvalid</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97877</link>
    <description>&lt;pre&gt;PIO handler is not good performance, but works on all platform.
So, switch to PIO handler if DMA handler was invalid case.

Signed-off-by: Kuninori Morimoto &amp;lt;kuninori.morimoto.gx&amp;lt; at &amp;gt;renesas.com&amp;gt;
---
 sound/soc/sh/fsi.c |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 05582c1..0da021a 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -247,7 +247,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct fsi_priv {
 struct fsi_stream_handler {
 int (*init)(struct fsi_priv *fsi, struct fsi_stream *io);
 int (*quit)(struct fsi_priv *fsi, struct fsi_stream *io);
-int (*probe)(struct fsi_priv *fsi, struct fsi_stream *io);
+int (*probe)(struct fsi_priv *fsi, struct fsi_stream *io, struct device *dev);
 int (*transfer)(struct fsi_priv *fsi, struct fsi_stream *io);
 int (*remove)(struct fsi_priv *fsi, struct fsi_stream *io);
 void (*start_stop)(struct fsi_priv *fsi, struct fsi_stream *io,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -571,16 +571,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int fsi_stream_transfer(struct fsi_stream *io)
 #define fsi_stream_stop(fsi, io)\
 fsi_stream_handler_call(io, start_stop, fsi, io, 0)
 
-static int fsi_stream_probe(struct fsi_priv *fsi)
+static int fsi_stream_probe(struct fsi_priv *fsi, struct device *dev)
 {
 struct fsi_stream *io;
 int ret1, ret2;
 
 io = &amp;amp;fsi-&amp;gt;playback;
-ret1 = fsi_stream_handler_call(io, probe, fsi, io);
+ret1 = fsi_stream_handler_call(io, probe, fsi, io, dev);
 
 io = &amp;amp;fsi-&amp;gt;capture;
-ret2 = fsi_stream_handler_call(io, probe, fsi, io);
+ret2 = fsi_stream_handler_call(io, probe, fsi, io, dev);
 
 if (ret1 &amp;lt; 0)
 return ret1;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1182,7 +1182,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_stream *io,
 fsi_master_mask_set(master, CLK_RST, clk, (enable) ? clk : 0);
 }
 
-static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io)
+static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct device *dev)
 {
 dma_cap_mask_t mask;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1190,8 +1190,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io)
 dma_cap_set(DMA_SLAVE, mask);
 
 io-&amp;gt;chan = dma_request_channel(mask, fsi_dma_filter, &amp;amp;io-&amp;gt;slave);
-if (!io-&amp;gt;chan)
-return -EIO;
+if (!io-&amp;gt;chan) {
+
+/* switch to PIO handler */
+if (fsi_stream_is_play(fsi, io))
+fsi-&amp;gt;playback.handler= &amp;amp;fsi_pio_push_handler;
+else
+fsi-&amp;gt;capture.handler= &amp;amp;fsi_pio_pop_handler;
+
+dev_info(dev, "switch handler (dma =&amp;gt; pio)\n");
+
+/* probe again */
+return fsi_stream_probe(fsi, dev);
+}
 
 tasklet_init(&amp;amp;io-&amp;gt;tasklet, fsi_dma_do_tasklet, (unsigned long)io);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1681,7 +1692,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int fsi_probe(struct platform_device *pdev)
 master-&amp;gt;fsia.master= master;
 master-&amp;gt;fsia.info= &amp;amp;info-&amp;gt;port_a;
 fsi_handler_init(&amp;amp;master-&amp;gt;fsia);
-ret = fsi_stream_probe(&amp;amp;master-&amp;gt;fsia);
+ret = fsi_stream_probe(&amp;amp;master-&amp;gt;fsia, &amp;amp;pdev-&amp;gt;dev);
 if (ret &amp;lt; 0) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "FSIA stream probe failed\n");
 goto exit_iounmap;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1692,7 +1703,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int fsi_probe(struct platform_device *pdev)
 master-&amp;gt;fsib.master= master;
 master-&amp;gt;fsib.info= &amp;amp;info-&amp;gt;port_b;
 fsi_handler_init(&amp;amp;master-&amp;gt;fsib);
-ret = fsi_stream_probe(&amp;amp;master-&amp;gt;fsib);
+ret = fsi_stream_probe(&amp;amp;master-&amp;gt;fsib, &amp;amp;pdev-&amp;gt;dev);
 if (ret &amp;lt; 0) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "FSIB stream probe failed\n");
 goto exit_fsia;
&lt;/pre&gt;</description>
    <dc:creator>Kuninori Morimoto</dc:creator>
    <dc:date>2012-05-25T06:56:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97876">
    <title>[PATCH] ASoC: fsi: bugfix: enable master clock controlon DMA stream</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97876</link>
    <description>&lt;pre&gt;DMA stream handler didn't care about master clock.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto &amp;lt;kuninori.morimoto.gx&amp;lt; at &amp;gt;renesas.com&amp;gt;
---
 sound/soc/sh/fsi.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 7cee225..05582c1 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1172,9 +1172,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io)
 static void fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_stream *io,
  int start)
 {
+struct fsi_master *master = fsi_get_master(fsi);
+u32 clk  = fsi_is_port_a(fsi) ? CRA  : CRB;
 u32 enable = start ? DMA_ON : 0;
 
 fsi_reg_mask_set(fsi, OUT_DMAC, DMA_ON, enable);
+
+if (fsi_is_clk_master(fsi))
+fsi_master_mask_set(master, CLK_RST, clk, (enable) ? clk : 0);
 }
 
 static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io)
&lt;/pre&gt;</description>
    <dc:creator>Kuninori Morimoto</dc:creator>
    <dc:date>2012-05-25T06:55:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97875">
    <title>Re: [PATCH 1/5] ALSA: pcm: Add debug-print helperfunction</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97875</link>
    <description>&lt;pre&gt;At Thu, 24 May 2012 15:26:03 +0200,
Ola Lilja wrote:

Reviewed-by: Takashi Iwai &amp;lt;tiwai&amp;lt; at &amp;gt;suse.de&amp;gt;

Mark, Liam, feel free to pick it through your tree.


thanks,

Takashi

&lt;/pre&gt;</description>
    <dc:creator>Takashi Iwai</dc:creator>
    <dc:date>2012-05-25T06:19:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97874">
    <title>Re: [PATCH] [emu10k1]: remove the kcallloc cast(reported from make coccicheck's drop_kmalloc_cast.cocci)</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97874</link>
    <description>&lt;pre&gt;At Thu, 24 May 2012 19:32:29 +0530,
Devendra Naga wrote:

I don't think removing it improves anything much.
It's cast to __user pointer, and this rather helps to catch the
caution.


thanks,

Takashi

&lt;/pre&gt;</description>
    <dc:creator>Takashi Iwai</dc:creator>
    <dc:date>2012-05-25T06:04:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97873">
    <title>Re: [PATCH 1/2] ALSA: update sync header when streamsare linked/unlinked</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97873</link>
    <description>&lt;pre&gt;At Wed, 23 May 2012 13:57:34 -0500,
Pierre-Louis Bossart wrote:

Yes, that sounds like a reasonable solution.


thanks,

Takashi
&lt;/pre&gt;</description>
    <dc:creator>Takashi Iwai</dc:creator>
    <dc:date>2012-05-25T05:54:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97872">
    <title>Re: [PATCH 2/2 V2] ASoC: fix pxa-ssp compiling issueunder mach-mmp</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97872</link>
    <description>&lt;pre&gt;
Part of job of #ifdef ... #endif, and cpu_is_pxa*() is to reduce code size when
the support for these SoCs are not compiled, but providing the overall
maintenance burden and ugliness, I'm fine with the changes here.

Acked-by: Eric Miao &amp;lt;eric.y.miao&amp;lt; at &amp;gt;gmail.com&amp;gt;

_______________________________________________
Alsa-devel mailing list
Alsa-devel&amp;lt; at &amp;gt;alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
&lt;/pre&gt;</description>
    <dc:creator>Eric Miao</dc:creator>
    <dc:date>2012-05-25T04:20:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97871">
    <title>emu10k1 (Audigy) FXBus routing query</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97871</link>
    <description>&lt;pre&gt;Dear all,

I am writing to ask how to route certain DSP 'outputs' from my Audigy 2 ZS
back into the equivalent 'ASIO inputs' for recording purposes.

Specifically, I'd like to route outputs from the Wavetable Synths on my
card to inputs that would go straight into a DAW (such as Ardour), so that
I can apply effects, record and mix-down as if they were external synth
signals.

I know that with the kX project drivers in Windows this is possible, by
routing the Synth outputs to FXBus outputs 16-63, leaving the ASIO inputs
as 0-15 for the audio input, and then patching which channels I require
from the Synth to those inputs (e.g. Synth Channel 1 -&amp;gt; FXBus out 16&amp;amp;17 -&amp;gt;
FXBus in 0&amp;amp;1).

After reading a thread that contained responses from Jaroslav, I believe
the answer is in emufx.c, but I'm unsure as to where to start as I need to
assign the outputs from the Synths correctly first.

Thanks in advance! Any help would be greatly appreciated!

Kind Regards,

Dan
&lt;/pre&gt;</description>
    <dc:creator>Dan Swain</dc:creator>
    <dc:date>2012-05-25T01:12:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97870">
    <title>runtime change in plugin behaviour</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97870</link>
    <description>&lt;pre&gt;Hi,

I have developed a plugin that implements a bi-quad filter. filter's 
parameters are given into asoundrc file.

Now I need to change those parameters during playback.
How can I do?
what help can gives alsalib to achieve this?

best regards

Max
&lt;/pre&gt;</description>
    <dc:creator>Massimiliano Cialdi</dc:creator>
    <dc:date>2012-05-24T14:58:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97868">
    <title>[PATCH 5/5] ASoC: Ux500: Add machine-driver</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97868</link>
    <description>&lt;pre&gt;Add machine-driver for ST-Ericsson U8500 platform, including
support for the AB8500-codec.

Signed-off-by: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;
---
 sound/soc/ux500/Kconfig         |   11 +
 sound/soc/ux500/Makefile        |    3 +
 sound/soc/ux500/mop500.c        |  117 +++++++++++
 sound/soc/ux500/mop500_ab8500.c |  441 +++++++++++++++++++++++++++++++++++++++
 sound/soc/ux500/mop500_ab8500.h |   22 ++
 5 files changed, 594 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/ux500/mop500.c
 create mode 100644 sound/soc/ux500/mop500_ab8500.c
 create mode 100644 sound/soc/ux500/mop500_ab8500.h

diff --git a/sound/soc/ux500/Kconfig b/sound/soc/ux500/Kconfig
index 1d38515..069330d 100644
--- a/sound/soc/ux500/Kconfig
+++ b/sound/soc/ux500/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -19,3 +19,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config SND_SOC_UX500_PLAT_DMA
 select SND_SOC_DMAENGINE_PCM
 help
 Say Y if you want to enable the Ux500 platform-driver.
+
++config SND_SOC_UX500_MACH_MOP500
++tristate "Machine - MOP500 (Ux500 + AB8500)"
+depends on AB8500_CORE &amp;amp;&amp;amp; AB8500_GPADC &amp;amp;&amp;amp; SND_SOC_UX500
+select SND_SOC_AB8500_CODEC
+select SND_SOC_UX500_PLAT_MSP_I2S
+select SND_SOC_UX500_PLAT_DMA
+help
+Select this to enable the MOP500 machine-driver.
+This will enable platform-drivers for: Ux500
+This will enable codec-drivers for: AB8500
diff --git a/sound/soc/ux500/Makefile b/sound/soc/ux500/Makefile
index 4634bf0..cce0c11 100644
--- a/sound/soc/ux500/Makefile
+++ b/sound/soc/ux500/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5,3 +5,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; obj-$(CONFIG_SND_SOC_UX500_PLAT_MSP_I2S) += snd-soc-ux500-plat-msp-i2s.o
 
 snd-soc-ux500-plat-dma-objs := ux500_pcm.o
 obj-$(CONFIG_SND_SOC_UX500_PLAT_DMA) += snd-soc-ux500-plat-dma.o
+
+snd-soc-ux500-mach-mop500-objs := mop500.o mop500_ab8500.o
+obj-$(CONFIG_SND_SOC_UX500_MACH_MOP500) += snd-soc-ux500-mach-mop500.o
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c
new file mode 100644
index 0000000..d9f4a6b
--- /dev/null
+++ b/sound/soc/ux500/mop500.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,117 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * Copyright (C) ST-Ericsson SA 2012
+ *
+ * Author: Ola Lilja (ola.o.lilja&amp;lt; at &amp;gt;stericsson.com)
+ *         for ST-Ericsson.
+ *
+ * License terms:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include &amp;lt;asm/mach-types.h&amp;gt;
+
+#include &amp;lt;linux/module.h&amp;gt;
+#include &amp;lt;linux/io.h&amp;gt;
+#include &amp;lt;linux/spi/spi.h&amp;gt;
+
+#include &amp;lt;mach/board-mop500-audio.h&amp;gt;
+
+#include &amp;lt;sound/soc.h&amp;gt;
+#include &amp;lt;sound/initval.h&amp;gt;
+
+#include "ux500_pcm.h"
+#include "ux500_msp_dai.h"
+
+#include &amp;lt;mop500_ab8500.h&amp;gt;
+
+/* Define the whole MOP500 soundcard, linking platform to the codec-drivers  */
+struct snd_soc_dai_link mop500_dai_links[] = {
+{
+.name = "ab8500_0",
+.stream_name = "ab8500_0",
+.cpu_dai_name = "ux500-msp-i2s.1",
+.codec_dai_name = "ab8500-codec-dai.0",
+.platform_name = "ux500-pcm.0",
+.codec_name = "ab8500-codec.0",
+.init = mop500_ab8500_machine_init,
+.ops = mop500_ab8500_ops,
+},
+{
+.name = "ab8500_1",
+.stream_name = "ab8500_1",
+.cpu_dai_name = "ux500-msp-i2s.3",
+.codec_dai_name = "ab8500-codec-dai.1",
+.platform_name = "ux500-pcm.0",
+.codec_name = "ab8500-codec.0",
+.init = NULL,
+.ops = mop500_ab8500_ops,
+},
+};
+
+static struct snd_soc_card mop500_card = {
+.name = "MOP500-card",
+.probe = NULL,
+.dai_link = mop500_dai_links,
+.num_links = ARRAY_SIZE(mop500_dai_links),
+};
+
+static int __devinit mop500_probe(struct platform_device *pdev)
+{
+int ret;
+
+pr_debug("%s: Enter.\n", __func__);
+
+dev_dbg(&amp;amp;pdev-&amp;gt;dev, "%s: Enter.\n", __func__);
+
+mop500_card.dev = &amp;amp;pdev-&amp;gt;dev;
+
+dev_dbg(&amp;amp;pdev-&amp;gt;dev, "%s: Card %s: Set platform drvdata.\n",
+__func__, mop500_card.name);
+platform_set_drvdata(pdev, &amp;amp;mop500_card);
+
+snd_soc_card_set_drvdata(&amp;amp;mop500_card, NULL);
+
+dev_dbg(&amp;amp;pdev-&amp;gt;dev, "%s: Card %s: num_links = %d\n",
+__func__, mop500_card.name, mop500_card.num_links);
+dev_dbg(&amp;amp;pdev-&amp;gt;dev, "%s: Card %s: DAI-link 0: name = %s\n",
+__func__, mop500_card.name, mop500_card.dai_link[0].name);
+dev_dbg(&amp;amp;pdev-&amp;gt;dev, "%s: Card %s: DAI-link 0: stream_name = %s\n",
+__func__, mop500_card.name,
+mop500_card.dai_link[0].stream_name);
+
+ret = snd_soc_register_card(&amp;amp;mop500_card);
+if (ret)
+dev_err(&amp;amp;pdev-&amp;gt;dev,
+"Error: snd_soc_register_card failed (%d)!\n",
+ret);
+
+return ret;
+}
+
+static int __devexit mop500_remove(struct platform_device *pdev)
+{
+struct snd_soc_card *mop500_card = platform_get_drvdata(pdev);
+
+pr_debug("%s: Enter.\n", __func__);
+
+mop500_ab8500_remove(mop500_card);
+
+snd_soc_unregister_card(mop500_card);
+platform_set_drvdata(pdev, NULL);
+
+return 0;
+}
+
+static struct platform_driver snd_soc_mop500_driver = {
+.driver = {
+.owner = THIS_MODULE,
+.name = "snd-soc-mop500",
+},
+.probe = mop500_probe,
+.remove = __devexit_p(mop500_remove),
+};
+
+module_platform_driver(snd_soc_mop500_driver);
diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c
new file mode 100644
index 0000000..32e0e34
--- /dev/null
+++ b/sound/soc/ux500/mop500_ab8500.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,441 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * Copyright (C) ST-Ericsson SA 2012
+ *
+ * Author: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;,
+ *         Kristoffer Karlsson &amp;lt;kristoffer.karlsson&amp;lt; at &amp;gt;stericsson.com&amp;gt;
+ *         for ST-Ericsson.
+ *
+ * License terms:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include &amp;lt;linux/module.h&amp;gt;
+#include &amp;lt;linux/device.h&amp;gt;
+#include &amp;lt;linux/io.h&amp;gt;
+#include &amp;lt;linux/clk.h&amp;gt;
+
+#include &amp;lt;mach/hardware.h&amp;gt;
+#include &amp;lt;mach/board-mop500-audio.h&amp;gt;
+
+#include &amp;lt;sound/soc.h&amp;gt;
+#include &amp;lt;sound/soc-dapm.h&amp;gt;
+#include &amp;lt;sound/pcm.h&amp;gt;
+#include &amp;lt;sound/pcm_params.h&amp;gt;
+
+#include "ux500_pcm.h"
+#include "ux500_msp_dai.h"
+#include "../codecs/ab8500-codec.h"
+
+#define TX_SLOT_MONO0x0008
+#define TX_SLOT_STEREO0x000a
+#define RX_SLOT_MONO0x0001
+#define RX_SLOT_STEREO0x0003
+#define TX_SLOT_8CH0x00FF
+#define RX_SLOT_8CH0x00FF
+
+#define DEF_TX_SLOTSTX_SLOT_STEREO
+#define DEF_RX_SLOTSRX_SLOT_MONO
+
+#define DRIVERMODE_NORMAL0
+#define DRIVERMODE_CODEC_ONLY1
+
+/* Slot configuration */
+static unsigned int tx_slots = DEF_TX_SLOTS;
+static unsigned int rx_slots = DEF_RX_SLOTS;
+
+/* Clocks */
+static const char * const enum_mclk[] = {
+"SYSCLK",
+"ULPCLK"
+};
+enum mclk {
+MCLK_SYSCLK,
+MCLK_ULPCLK,
+};
+
+static SOC_ENUM_SINGLE_EXT_DECL(soc_enum_mclk, enum_mclk);
+
+/* Private data for machine-part MOP500&amp;lt;-&amp;gt;AB8500 */
+struct mop500_ab8500_drvdata {
+/* Clocks */
+enum mclk mclk_sel;
+struct clk *clk_ptr_intclk;
+struct clk *clk_ptr_sysclk;
+struct clk *clk_ptr_ulpclk;
+};
+
+static inline const char *get_mclk_str(enum mclk mclk_sel)
+{
+switch (mclk_sel) {
+case MCLK_SYSCLK:
+return "MCLK_SYSCLK";
+case MCLK_ULPCLK:
+return "MCLK_ULPCLK";
+default:
+return "Unknown";
+}
+}
+
+static int mop500_ab8500_set_mclk(struct device *dev,
+struct mop500_ab8500_drvdata *drvdata)
+{
+int status;
+struct clk *clk_ptr;
+
+if (IS_ERR(drvdata-&amp;gt;clk_ptr_intclk)) {
+dev_err(dev,
+"%s: ERROR: intclk not initialized!\n", __func__);
+return -EIO;
+}
+
+switch (drvdata-&amp;gt;mclk_sel) {
+case MCLK_SYSCLK:
+clk_ptr = drvdata-&amp;gt;clk_ptr_sysclk;
+break;
+case MCLK_ULPCLK:
+clk_ptr = drvdata-&amp;gt;clk_ptr_ulpclk;
+break;
+default:
+return -EINVAL;
+}
+
+if (IS_ERR(clk_ptr)) {
+dev_err(dev, "%s: ERROR: %s not initialized!\n", __func__,
+get_mclk_str(drvdata-&amp;gt;mclk_sel));
+return -EIO;
+}
+
+status = clk_set_parent(drvdata-&amp;gt;clk_ptr_intclk, clk_ptr);
+if (status)
+dev_err(dev,
+"%s: ERROR: Setting intclk parent to %s failed (ret = %d)!",
+__func__, get_mclk_str(drvdata-&amp;gt;mclk_sel), status);
+else
+dev_dbg(dev,
+"%s: intclk parent changed to %s.\n",
+__func__, get_mclk_str(drvdata-&amp;gt;mclk_sel));
+
+return status;
+}
+
+/*
+ * Control-events
+ */
+
+static int mclk_input_control_get(struct snd_kcontrol *kcontrol,
+struct snd_ctl_elem_value *ucontrol)
+{
+struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+struct mop500_ab8500_drvdata *drvdata =
+snd_soc_card_get_drvdata(codec-&amp;gt;card);
+
+ucontrol-&amp;gt;value.enumerated.item[0] = drvdata-&amp;gt;mclk_sel;
+
+return 0;
+}
+
+static int mclk_input_control_put(struct snd_kcontrol *kcontrol,
+struct snd_ctl_elem_value *ucontrol)
+{
+struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+struct mop500_ab8500_drvdata *drvdata =
+snd_soc_card_get_drvdata(codec-&amp;gt;card);
+unsigned int val;
+
+val = (ucontrol-&amp;gt;value.enumerated.item[0] != 0);
+if (drvdata-&amp;gt;mclk_sel == val)
+return 0;
+
+drvdata-&amp;gt;mclk_sel = val;
+
+return 1;
+}
+
+/*
+ * Controls
+ */
+
+static struct snd_kcontrol_new mop500_ab8500_ctrls[] = {
+SOC_ENUM_EXT("Master Clock Select",
+soc_enum_mclk,
+mclk_input_control_get, mclk_input_control_put),
+/* Digital interface - Clocks */
+SOC_SINGLE("Digital Interface Master Generator Switch",
+AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENMASTGEN,
+1, 0),
+SOC_SINGLE("Digital Interface 0 Bit-clock Switch",
+AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENFSBITCLK0,
+1, 0),
+SOC_SINGLE("Digital Interface 1 Bit-clock Switch",
+AB8500_DIGIFCONF1, AB8500_DIGIFCONF1_ENFSBITCLK1,
+1, 0),
+SOC_DAPM_PIN_SWITCH("Headset Left"),
+SOC_DAPM_PIN_SWITCH("Headset Right"),
+SOC_DAPM_PIN_SWITCH("Earpiece"),
+SOC_DAPM_PIN_SWITCH("Speaker Left"),
+SOC_DAPM_PIN_SWITCH("Speaker Right"),
+SOC_DAPM_PIN_SWITCH("LineOut Left"),
+SOC_DAPM_PIN_SWITCH("LineOut Right"),
+SOC_DAPM_PIN_SWITCH("Vibra 1"),
+SOC_DAPM_PIN_SWITCH("Vibra 2"),
+SOC_DAPM_PIN_SWITCH("Mic 1"),
+SOC_DAPM_PIN_SWITCH("Mic 2"),
+SOC_DAPM_PIN_SWITCH("LineIn Left"),
+SOC_DAPM_PIN_SWITCH("LineIn Right"),
+SOC_DAPM_PIN_SWITCH("DMic 1"),
+SOC_DAPM_PIN_SWITCH("DMic 2"),
+SOC_DAPM_PIN_SWITCH("DMic 3"),
+SOC_DAPM_PIN_SWITCH("DMic 4"),
+SOC_DAPM_PIN_SWITCH("DMic 5"),
+SOC_DAPM_PIN_SWITCH("DMic 6"),
+};
+
+/* ASoC */
+
+int mop500_ab8500_startup(struct snd_pcm_substream *substream)
+{
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+
+/* Set audio-clock source */
+return mop500_ab8500_set_mclk(rtd-&amp;gt;card-&amp;gt;dev,
+snd_soc_card_get_drvdata(rtd-&amp;gt;card));
+}
+
+void mop500_ab8500_shutdown(struct snd_pcm_substream *substream)
+{
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+struct device *dev = rtd-&amp;gt;card-&amp;gt;dev;
+
+dev_dbg(dev, "%s: Enter\n", __func__);
+
+/* Reset slots configuration to default(s) */
+if (substream-&amp;gt;stream == SNDRV_PCM_STREAM_PLAYBACK)
+tx_slots = DEF_TX_SLOTS;
+else
+rx_slots = DEF_RX_SLOTS;
+}
+
+int mop500_ab8500_hw_params(struct snd_pcm_substream *substream,
+struct snd_pcm_hw_params *params)
+{
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+struct snd_soc_dai *codec_dai = rtd-&amp;gt;codec_dai;
+struct snd_soc_dai *cpu_dai = rtd-&amp;gt;cpu_dai;
+struct device *dev = rtd-&amp;gt;card-&amp;gt;dev;
+unsigned int fmt;
+int channels, ret = 0, driver_mode, slots;
+unsigned int sw_codec, sw_cpu;
+bool is_playback;
+
+dev_dbg(dev, "%s: Enter\n", __func__);
+
+dev_dbg(dev, "%s: substream-&amp;gt;pcm-&amp;gt;name = %s\n"
+"substream-&amp;gt;pcm-&amp;gt;id = %s.\n"
+"substream-&amp;gt;name = %s.\n"
+"substream-&amp;gt;number = %d.\n",
+__func__,
+substream-&amp;gt;pcm-&amp;gt;name,
+substream-&amp;gt;pcm-&amp;gt;id,
+substream-&amp;gt;name,
+substream-&amp;gt;number);
+
+channels = params_channels(params);
+
+switch (params_format(params)) {
+case SNDRV_PCM_FORMAT_S32_LE:
+sw_cpu = 32;
+break;
+
+case SNDRV_PCM_FORMAT_S16_LE:
+sw_cpu = 16;
+break;
+
+default:
+return -EINVAL;
+}
+
+/* Setup codec depending on driver-mode */
+driver_mode = (channels == 8) ?
+DRIVERMODE_CODEC_ONLY : DRIVERMODE_NORMAL;
+dev_dbg(dev, "%s: Driver-mode: %s.\n", __func__,
+(driver_mode == DRIVERMODE_NORMAL) ? "NORMAL" : "CODEC_ONLY");
+
+/* Setup format */
+
+if (driver_mode == DRIVERMODE_NORMAL) {
+fmt = SND_SOC_DAIFMT_DSP_A |
+SND_SOC_DAIFMT_CBM_CFM |
+SND_SOC_DAIFMT_NB_NF |
+SND_SOC_DAIFMT_CONT;
+} else {
+fmt = SND_SOC_DAIFMT_DSP_A |
+SND_SOC_DAIFMT_CBM_CFM |
+SND_SOC_DAIFMT_NB_NF |
+SND_SOC_DAIFMT_GATED;
+}
+
+ret = snd_soc_dai_set_fmt(codec_dai, fmt);
+if (ret &amp;lt; 0) {
+dev_err(dev,
+"%s: ERROR: snd_soc_dai_set_fmt failed for codec_dai (ret = %d)!\n",
+__func__, ret);
+return ret;
+}
+
+ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
+if (ret &amp;lt; 0) {
+dev_err(dev,
+"%s: ERROR: snd_soc_dai_set_fmt failed for cpu_dai (ret = %d)!\n",
+__func__, ret);
+return ret;
+}
+
+/* Setup TDM-slots */
+
+is_playback = (substream-&amp;gt;stream == SNDRV_PCM_STREAM_PLAYBACK);
+switch (channels) {
+case 1:
+slots = 16;
+tx_slots = (is_playback) ? TX_SLOT_MONO : 0;
+rx_slots = (is_playback) ? 0 : RX_SLOT_MONO;
+break;
+case 2:
+slots = 16;
+tx_slots = (is_playback) ? TX_SLOT_STEREO : 0;
+rx_slots = (is_playback) ? 0 : RX_SLOT_STEREO;
+break;
+case 8:
+slots = 16;
+tx_slots = (is_playback) ? TX_SLOT_8CH : 0;
+rx_slots = (is_playback) ? 0 : RX_SLOT_8CH;
+break;
+default:
+return -EINVAL;
+}
+
+sw_codec = (driver_mode == DRIVERMODE_NORMAL) ? sw_cpu : 20;
+
+dev_dbg(dev, "%s: CPU-DAI TDM: TX=0x%04X RX=0x%04x\n", __func__,
+tx_slots, rx_slots);
+ret = snd_soc_dai_set_tdm_slot(cpu_dai, tx_slots, rx_slots, slots,
+sw_cpu);
+if (ret)
+return ret;
+
+dev_dbg(dev, "%s: CODEC-DAI TDM: TX=0x%04X RX=0x%04x\n", __func__,
+tx_slots, rx_slots);
+ret = snd_soc_dai_set_tdm_slot(codec_dai, tx_slots, rx_slots, slots,
+sw_codec);
+if (ret)
+return ret;
+
+return 0;
+}
+
+struct snd_soc_ops mop500_ab8500_ops[] = {
+{
+.hw_params = mop500_ab8500_hw_params,
+.startup = mop500_ab8500_startup,
+.shutdown = mop500_ab8500_shutdown,
+}
+};
+
+int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
+{
+struct snd_soc_codec *codec = rtd-&amp;gt;codec;
+struct device *dev = rtd-&amp;gt;card-&amp;gt;dev;
+struct mop500_audio_platform_data *pdata;
+struct mop500_ab8500_drvdata *drvdata;
+int ret;
+
+dev_dbg(dev, "%s Enter.\n", __func__);
+
+/* Create driver private-data struct */
+drvdata = devm_kzalloc(dev, sizeof(struct mop500_ab8500_drvdata),
+GFP_KERNEL);
+snd_soc_card_set_drvdata(rtd-&amp;gt;card, drvdata);
+
+/* Setup clocks */
+
+drvdata-&amp;gt;clk_ptr_sysclk = clk_get(dev, "sysclk");
+if (IS_ERR(drvdata-&amp;gt;clk_ptr_sysclk))
+dev_warn(dev, "%s: WARNING: clk_get failed for 'sysclk'!\n",
+__func__);
+drvdata-&amp;gt;clk_ptr_ulpclk = clk_get(dev, "ulpclk");
+if (IS_ERR(drvdata-&amp;gt;clk_ptr_ulpclk))
+dev_warn(dev, "%s: WARNING: clk_get failed for 'ulpclk'!\n",
+__func__);
+drvdata-&amp;gt;clk_ptr_intclk = clk_get(dev, "intclk");
+if (IS_ERR(drvdata-&amp;gt;clk_ptr_intclk))
+dev_warn(dev, "%s: WARNING: clk_get failed for 'intclk'!\n",
+__func__);
+
+/* Set intclk default parent to ulpclk */
+drvdata-&amp;gt;mclk_sel = MCLK_ULPCLK;
+ret = mop500_ab8500_set_mclk(dev, drvdata);
+if (ret &amp;lt; 0)
+dev_warn(dev, "%s: WARNING: mop500_ab8500_set_mclk!\n",
+__func__);
+
+drvdata-&amp;gt;mclk_sel = MCLK_ULPCLK;
+
+/* Add controls */
+ret = snd_soc_add_codec_controls(codec, mop500_ab8500_ctrls,
+ARRAY_SIZE(mop500_ab8500_ctrls));
+if (ret &amp;lt; 0) {
+pr_err("%s: Failed to add machine-controls (%d)!\n",
+__func__, ret);
+return ret;
+}
+
+/* Setup AB8500 according to board-settings */
+pdata = (struct mop500_audio_platform_data *)dev_get_platdata(dev);
+ret = ab8500_audio_setup_mics(codec, &amp;amp;pdata-&amp;gt;amics);
+if (ret &amp;lt; 0) {
+pr_err("%s: Failed to setup mics (%d)!\n", __func__, ret);
+return ret;
+}
+ret = ab8500_audio_set_ear_cmv(codec, pdata-&amp;gt;ear_cmv);
+if (ret &amp;lt; 0) {
+pr_err("%s: Failed to set earpiece CM-voltage (%d)!\n",
+__func__, ret);
+return ret;
+}
+
+ret = snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "Earpiece");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "Speaker Left");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "Speaker Right");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "LineOut Left");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "LineOut Right");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "Vibra 1");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "Vibra 2");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "Mic 1");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "Mic 2");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "LineIn Left");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "LineIn Right");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "DMic 1");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "DMic 2");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "DMic 3");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "DMic 4");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "DMic 5");
+ret |= snd_soc_dapm_disable_pin(&amp;amp;codec-&amp;gt;dapm, "DMic 6");
+
+return ret;
+}
+
+void mop500_ab8500_remove(struct snd_soc_card *card)
+{
+struct mop500_ab8500_drvdata *drvdata = snd_soc_card_get_drvdata(card);
+
+if (drvdata-&amp;gt;clk_ptr_sysclk != NULL)
+clk_put(drvdata-&amp;gt;clk_ptr_sysclk);
+if (drvdata-&amp;gt;clk_ptr_ulpclk != NULL)
+clk_put(drvdata-&amp;gt;clk_ptr_ulpclk);
+if (drvdata-&amp;gt;clk_ptr_intclk != NULL)
+clk_put(drvdata-&amp;gt;clk_ptr_intclk);
+
+snd_soc_card_set_drvdata(card, drvdata);
+}
diff --git a/sound/soc/ux500/mop500_ab8500.h b/sound/soc/ux500/mop500_ab8500.h
new file mode 100644
index 0000000..cca5b33
--- /dev/null
+++ b/sound/soc/ux500/mop500_ab8500.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,22 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * Copyright (C) ST-Ericsson SA 2012
+ *
+ * Author: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;
+ *         for ST-Ericsson.
+ *
+ * License terms:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#ifndef MOP500_AB8500_H
+#define MOP500_AB8500_H
+
+extern struct snd_soc_ops mop500_ab8500_ops[];
+
+int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *runtime);
+void mop500_ab8500_remove(struct snd_soc_card *card);
+
+#endif
&lt;/pre&gt;</description>
    <dc:creator>Ola Lilja</dc:creator>
    <dc:date>2012-05-24T13:26:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97867">
    <title>[PATCH 3/5] ASoC: Ux500: Add platform-driver</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97867</link>
    <description>&lt;pre&gt;Add platform-driver handling all DMA-activities.

Signed-off-by: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;
---
 sound/soc/ux500/Kconfig     |    7 +
 sound/soc/ux500/Makefile    |    3 +
 sound/soc/ux500/ux500_pcm.c |  318 +++++++++++++++++++++++++++++++++++++++++++
 sound/soc/ux500/ux500_pcm.h |   35 +++++
 4 files changed, 363 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/ux500/ux500_pcm.c
 create mode 100644 sound/soc/ux500/ux500_pcm.h

diff --git a/sound/soc/ux500/Kconfig b/sound/soc/ux500/Kconfig
index 44cf434..1d38515 100644
--- a/sound/soc/ux500/Kconfig
+++ b/sound/soc/ux500/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -12,3 +12,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; menuconfig SND_SOC_UX500
 config SND_SOC_UX500_PLAT_MSP_I2S
 tristate
 depends on SND_SOC_UX500
+
+config SND_SOC_UX500_PLAT_DMA
+tristate "Platform - DB8500 (DMA)"
+depends on SND_SOC_UX500
+select SND_SOC_DMAENGINE_PCM
+help
+Say Y if you want to enable the Ux500 platform-driver.
diff --git a/sound/soc/ux500/Makefile b/sound/soc/ux500/Makefile
index 19974c5..4634bf0 100644
--- a/sound/soc/ux500/Makefile
+++ b/sound/soc/ux500/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2,3 +2,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 snd-soc-ux500-plat-msp-i2s-objs := ux500_msp_dai.o ux500_msp_i2s.o
 obj-$(CONFIG_SND_SOC_UX500_PLAT_MSP_I2S) += snd-soc-ux500-plat-msp-i2s.o
+
+snd-soc-ux500-plat-dma-objs := ux500_pcm.o
+obj-$(CONFIG_SND_SOC_UX500_PLAT_DMA) += snd-soc-ux500-plat-dma.o
diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c
new file mode 100644
index 0000000..66b080e
--- /dev/null
+++ b/sound/soc/ux500/ux500_pcm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,318 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * Copyright (C) ST-Ericsson SA 2012
+ *
+ * Author: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;,
+ *         Roger Nilsson &amp;lt;roger.xr.nilsson&amp;lt; at &amp;gt;stericsson.com&amp;gt;
+ *         for ST-Ericsson.
+ *
+ * License terms:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include &amp;lt;asm/page.h&amp;gt;
+
+#include &amp;lt;linux/module.h&amp;gt;
+#include &amp;lt;linux/dma-mapping.h&amp;gt;
+#include &amp;lt;linux/dmaengine.h&amp;gt;
+#include &amp;lt;linux/slab.h&amp;gt;
+
+#include &amp;lt;plat/ste_dma40.h&amp;gt;
+
+#include &amp;lt;sound/pcm.h&amp;gt;
+#include &amp;lt;sound/pcm_params.h&amp;gt;
+#include &amp;lt;sound/soc.h&amp;gt;
+#include &amp;lt;sound/dmaengine_pcm.h&amp;gt;
+
+#include "ux500_msp_i2s.h"
+#include "ux500_pcm.h"
+
+static struct snd_pcm_hardware ux500_pcm_hw_playback = {
+.info = SNDRV_PCM_INFO_INTERLEAVED |
+SNDRV_PCM_INFO_MMAP |
+SNDRV_PCM_INFO_RESUME |
+SNDRV_PCM_INFO_PAUSE,
+.formats = SNDRV_PCM_FMTBIT_S16_LE |
+SNDRV_PCM_FMTBIT_U16_LE |
+SNDRV_PCM_FMTBIT_S16_BE |
+SNDRV_PCM_FMTBIT_U16_BE,
+.rates = SNDRV_PCM_RATE_KNOT,
+.rate_min = UX500_PLATFORM_MIN_RATE_PLAYBACK,
+.rate_max = UX500_PLATFORM_MAX_RATE_PLAYBACK,
+.channels_min = UX500_PLATFORM_MIN_CHANNELS,
+.channels_max = UX500_PLATFORM_MAX_CHANNELS,
+.buffer_bytes_max = UX500_PLATFORM_BUFFER_BYTES_MAX,
+.period_bytes_min = UX500_PLATFORM_PERIODS_BYTES_MIN,
+.period_bytes_max = UX500_PLATFORM_PERIODS_BYTES_MAX,
+.periods_min = UX500_PLATFORM_PERIODS_MIN,
+.periods_max = UX500_PLATFORM_PERIODS_MAX,
+};
+
+static struct snd_pcm_hardware ux500_pcm_hw_capture = {
+.info = SNDRV_PCM_INFO_INTERLEAVED |
+SNDRV_PCM_INFO_MMAP |
+SNDRV_PCM_INFO_RESUME |
+SNDRV_PCM_INFO_PAUSE,
+.formats = SNDRV_PCM_FMTBIT_S16_LE |
+SNDRV_PCM_FMTBIT_U16_LE |
+SNDRV_PCM_FMTBIT_S16_BE |
+SNDRV_PCM_FMTBIT_U16_BE,
+.rates = SNDRV_PCM_RATE_KNOT,
+.rate_min = UX500_PLATFORM_MIN_RATE_CAPTURE,
+.rate_max = UX500_PLATFORM_MAX_RATE_CAPTURE,
+.channels_min = UX500_PLATFORM_MIN_CHANNELS,
+.channels_max = UX500_PLATFORM_MAX_CHANNELS,
+.buffer_bytes_max = UX500_PLATFORM_BUFFER_BYTES_MAX,
+.period_bytes_min = UX500_PLATFORM_PERIODS_BYTES_MIN,
+.period_bytes_max = UX500_PLATFORM_PERIODS_BYTES_MAX,
+.periods_min = UX500_PLATFORM_PERIODS_MIN,
+.periods_max = UX500_PLATFORM_PERIODS_MAX,
+};
+
+static void ux500_pcm_dma_hw_free(struct device *dev,
+struct snd_pcm_substream *substream)
+{
+struct snd_pcm_runtime *runtime = substream-&amp;gt;runtime;
+struct snd_dma_buffer *buf = runtime-&amp;gt;dma_buffer_p;
+
+if (runtime-&amp;gt;dma_area == NULL)
+return;
+
+if (buf != &amp;amp;substream-&amp;gt;dma_buffer) {
+dma_free_coherent(buf-&amp;gt;dev.dev, buf-&amp;gt;bytes, buf-&amp;gt;area,
+buf-&amp;gt;addr);
+kfree(runtime-&amp;gt;dma_buffer_p);
+}
+
+snd_pcm_set_runtime_buffer(substream, NULL);
+}
+
+static int ux500_pcm_open(struct snd_pcm_substream *substream)
+{
+int stream_id = substream-&amp;gt;pstr-&amp;gt;stream;
+struct snd_pcm_runtime *runtime = substream-&amp;gt;runtime;
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+struct snd_soc_dai *dai = rtd-&amp;gt;cpu_dai;
+struct device *dev = dai-&amp;gt;dev;
+int ret;
+struct ux500_msp_dma_params *dma_params;
+u16 per_data_width, mem_data_width;
+struct stedma40_chan_cfg *dma_cfg;
+
+dev_dbg(dev, "%s: MSP %d (%s): Enter.\n", __func__, dai-&amp;gt;id,
+snd_pcm_stream_str(substream));
+
+dev_dbg(dev, "%s: Set runtime hwparams.\n", __func__);
+if (stream_id == SNDRV_PCM_STREAM_PLAYBACK)
+snd_soc_set_runtime_hwparams(substream,
+&amp;amp;ux500_pcm_hw_playback);
+else
+snd_soc_set_runtime_hwparams(substream,
+&amp;amp;ux500_pcm_hw_capture);
+
+/* ensure that buffer size is a multiple of period size */
+ret = snd_pcm_hw_constraint_integer(runtime,
+SNDRV_PCM_HW_PARAM_PERIODS);
+if (ret &amp;lt; 0) {
+dev_err(dev, "%s: Error: snd_pcm_hw_constraints failed (%d)\n",
+__func__, ret);
+return ret;
+}
+
+dev_dbg(dev, "%s: Set hw-struct for %s.\n", __func__,
+snd_pcm_stream_str(substream));
+runtime-&amp;gt;hw = (stream_id == SNDRV_PCM_STREAM_PLAYBACK) ?
+ux500_pcm_hw_playback : ux500_pcm_hw_capture;
+
+mem_data_width = STEDMA40_HALFWORD_WIDTH;
+
+dma_params = snd_soc_dai_get_dma_data(dai, substream);
+switch (dma_params-&amp;gt;data_size) {
+case 32:
+per_data_width = STEDMA40_WORD_WIDTH;
+break;
+case 16:
+per_data_width = STEDMA40_HALFWORD_WIDTH;
+break;
+case 8:
+per_data_width = STEDMA40_BYTE_WIDTH;
+break;
+default:
+per_data_width = STEDMA40_WORD_WIDTH;
+dev_warn(rtd-&amp;gt;platform-&amp;gt;dev,
+"%s: Unknown data-size (%d)! Assuming 32 bits.\n",
+__func__, dma_params-&amp;gt;data_size);
+}
+
+dma_cfg = dma_params-&amp;gt;dma_cfg;
+
+if (substream-&amp;gt;stream == SNDRV_PCM_STREAM_PLAYBACK) {
+dma_cfg-&amp;gt;src_info.data_width = mem_data_width;
+dma_cfg-&amp;gt;dst_info.data_width = per_data_width;
+} else {
+dma_cfg-&amp;gt;src_info.data_width = per_data_width;
+dma_cfg-&amp;gt;dst_info.data_width = mem_data_width;
+}
+
+
+ret = snd_dmaengine_pcm_open(substream, stedma40_filter, dma_cfg);
+if (ret) {
+dev_dbg(dai-&amp;gt;dev,
+"%s: ERROR: snd_dmaengine_pcm_open failed (%d)!\n",
+__func__, ret);
+return ret;
+}
+
+snd_dmaengine_pcm_set_data(substream, dma_cfg);
+
+return 0;
+}
+
+static int ux500_pcm_close(struct snd_pcm_substream *substream)
+{
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+struct snd_soc_dai *dai = rtd-&amp;gt;cpu_dai;
+
+dev_dbg(dai-&amp;gt;dev, "%s: Enter\n", __func__);
+
+snd_dmaengine_pcm_close(substream);
+
+return 0;
+}
+
+static int ux500_pcm_hw_params(struct snd_pcm_substream *substream,
+struct snd_pcm_hw_params *hw_params)
+{
+struct snd_pcm_runtime *runtime = substream-&amp;gt;runtime;
+struct snd_dma_buffer *buf = runtime-&amp;gt;dma_buffer_p;
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+int ret = 0;
+int size;
+
+dev_dbg(rtd-&amp;gt;platform-&amp;gt;dev, "%s: Enter\n", __func__);
+
+size = params_buffer_bytes(hw_params);
+
+if (buf) {
+if (buf-&amp;gt;bytes &amp;gt;= size)
+goto out;
+ux500_pcm_dma_hw_free(NULL, substream);
+}
+
+if (substream-&amp;gt;dma_buffer.area != NULL &amp;amp;&amp;amp;
+substream-&amp;gt;dma_buffer.bytes &amp;gt;= size) {
+buf = &amp;amp;substream-&amp;gt;dma_buffer;
+} else {
+buf = kmalloc(sizeof(struct snd_dma_buffer), GFP_KERNEL);
+if (!buf)
+goto nomem;
+
+buf-&amp;gt;dev.type = SNDRV_DMA_TYPE_DEV;
+buf-&amp;gt;dev.dev = NULL;
+buf-&amp;gt;area = dma_alloc_coherent(NULL, size, &amp;amp;buf-&amp;gt;addr,
+GFP_KERNEL);
+buf-&amp;gt;bytes = size;
+buf-&amp;gt;private_data = NULL;
+
+if (!buf-&amp;gt;area)
+goto free;
+}
+snd_pcm_set_runtime_buffer(substream, buf);
+ret = 1;
+ out:
+runtime-&amp;gt;dma_bytes = size;
+return ret;
+
+ free:
+kfree(buf);
+ nomem:
+return -ENOMEM;
+}
+
+static int ux500_pcm_hw_free(struct snd_pcm_substream *substream)
+{
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+
+dev_dbg(rtd-&amp;gt;platform-&amp;gt;dev, "%s: Enter\n", __func__);
+
+ux500_pcm_dma_hw_free(NULL, substream);
+
+return 0;
+}
+
+static int ux500_pcm_mmap(struct snd_pcm_substream *substream,
+struct vm_area_struct *vma)
+{
+struct snd_pcm_runtime *runtime = substream-&amp;gt;runtime;
+struct snd_soc_pcm_runtime *rtd = substream-&amp;gt;private_data;
+
+dev_dbg(rtd-&amp;gt;platform-&amp;gt;dev, "%s: Enter.\n", __func__);
+
+return dma_mmap_coherent(NULL, vma, runtime-&amp;gt;dma_area,
+runtime-&amp;gt;dma_addr, runtime-&amp;gt;dma_bytes);
+}
+
+static struct snd_pcm_ops ux500_pcm_ops = {
+.open= ux500_pcm_open,
+.close= ux500_pcm_close,
+.ioctl= snd_pcm_lib_ioctl,
+.hw_params= ux500_pcm_hw_params,
+.hw_free= ux500_pcm_hw_free,
+.trigger= snd_dmaengine_pcm_trigger,
+.pointer= snd_dmaengine_pcm_pointer,
+.mmap= ux500_pcm_mmap
+};
+
+int ux500_pcm_new(struct snd_soc_pcm_runtime *rtd)
+{
+struct snd_pcm *pcm = rtd-&amp;gt;pcm;
+
+dev_dbg(rtd-&amp;gt;platform-&amp;gt;dev, "%s: Enter (id = '%s').\n", __func__,
+pcm-&amp;gt;id);
+
+pcm-&amp;gt;info_flags = 0;
+
+return 0;
+}
+
+static struct snd_soc_platform_driver ux500_pcm_soc_drv = {
+.ops= &amp;amp;ux500_pcm_ops,
+.pcm_new        = ux500_pcm_new,
+};
+
+static int __devexit ux500_pcm_drv_probe(struct platform_device *pdev)
+{
+int ret;
+
+ret = snd_soc_register_platform(&amp;amp;pdev-&amp;gt;dev, &amp;amp;ux500_pcm_soc_drv);
+if (ret &amp;lt; 0) {
+dev_err(&amp;amp;pdev-&amp;gt;dev,
+"%s: ERROR: Failed to register platform '%s' (%d)!\n",
+__func__, pdev-&amp;gt;name, ret);
+return ret;
+}
+
+return 0;
+}
+
+static int __devinit ux500_pcm_drv_remove(struct platform_device *pdev)
+{
+snd_soc_unregister_platform(&amp;amp;pdev-&amp;gt;dev);
+
+return 0;
+}
+
+static struct platform_driver ux500_pcm_driver = {
+.driver = {
+.name = "ux500-pcm",
+.owner = THIS_MODULE,
+},
+
+.probe = ux500_pcm_drv_probe,
+.remove = __devexit_p(ux500_pcm_drv_remove),
+};
+module_platform_driver(ux500_pcm_driver);
+
+MODULE_LICENSE("GPLv2");
diff --git a/sound/soc/ux500/ux500_pcm.h b/sound/soc/ux500/ux500_pcm.h
new file mode 100644
index 0000000..77ed44d
--- /dev/null
+++ b/sound/soc/ux500/ux500_pcm.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,35 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * Copyright (C) ST-Ericsson SA 2012
+ *
+ * Author: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;,
+ *         Roger Nilsson &amp;lt;roger.xr.nilsson&amp;lt; at &amp;gt;stericsson.com&amp;gt;
+ *         for ST-Ericsson.
+ *
+ * License terms:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+#ifndef UX500_PCM_H
+#define UX500_PCM_H
+
+#include &amp;lt;asm/page.h&amp;gt;
+
+#include &amp;lt;linux/workqueue.h&amp;gt;
+
+#define UX500_PLATFORM_MIN_RATE_PLAYBACK 8000
+#define UX500_PLATFORM_MAX_RATE_PLAYBACK 48000
+#define UX500_PLATFORM_MIN_RATE_CAPTURE8000
+#define UX500_PLATFORM_MAX_RATE_CAPTURE48000
+
+#define UX500_PLATFORM_MIN_CHANNELS 1
+#define UX500_PLATFORM_MAX_CHANNELS 8
+
+#define UX500_PLATFORM_PERIODS_BYTES_MIN128
+#define UX500_PLATFORM_PERIODS_BYTES_MAX(64 * PAGE_SIZE)
+#define UX500_PLATFORM_PERIODS_MIN2
+#define UX500_PLATFORM_PERIODS_MAX48
+#define UX500_PLATFORM_BUFFER_BYTES_MAX(2048 * PAGE_SIZE)
+
+#endif
&lt;/pre&gt;</description>
    <dc:creator>Ola Lilja</dc:creator>
    <dc:date>2012-05-24T13:26:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97866">
    <title>[PATCH 2/5] ASoC: core: Add widgetSND_SOC_DAPM_CLOCK_SUPPLY</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97866</link>
    <description>&lt;pre&gt;Adds a supply-widget variant for connection to the clock-framework.
This widget-type corresponds to the variant for regulators.

Signed-off-by: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;
---
 include/sound/soc-dapm.h |   10 ++++++++++
 sound/soc/soc-dapm.c     |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index e3833d9..05559e5 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -229,6 +229,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct device;
 {.id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \
 .shift = wshift, .invert = winvert, \
 .event = wevent, .event_flags = wflags}
+#define SND_SOC_DAPM_CLOCK_SUPPLY(wname) \
+{.id = snd_soc_dapm_clock_supply, .name = wname, \
+.reg = SND_SOC_NOPM, .event = dapm_clock_event, \
+.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }
 
 /* generic widgets */
 #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -245,6 +249,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct device;
 .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \
 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }
 
+
 /* dapm kcontrol types */
 #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \
 {.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -327,6 +332,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int dapm_reg_event(struct snd_soc_dapm_widget *w,
    struct snd_kcontrol *kcontrol, int event);
 int dapm_regulator_event(struct snd_soc_dapm_widget *w,
  struct snd_kcontrol *kcontrol, int event);
+int dapm_clock_event(struct snd_soc_dapm_widget *w,
+ struct snd_kcontrol *kcontrol, int event);
 
 /* dapm controls */
 int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -432,6 +439,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum snd_soc_dapm_type {
 snd_soc_dapm_post,/* machine specific post widget - exec last */
 snd_soc_dapm_supply,/* power/clock supply */
 snd_soc_dapm_regulator_supply,/* external regulator */
+snd_soc_dapm_clock_supply,/* external clock */
 snd_soc_dapm_aif_in,/* audio interface input */
 snd_soc_dapm_aif_out,/* audio interface output */
 snd_soc_dapm_siggen,/* signal generator */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -537,6 +545,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct snd_soc_dapm_widget {
 struct list_head dirty;
 int inputs;
 int outputs;
+
+struct clk *clk;
 };
 
 struct snd_soc_dapm_update {
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 90ee77d..3bb7a6f 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,6 +35,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/debugfs.h&amp;gt;
 #include &amp;lt;linux/pm_runtime.h&amp;gt;
 #include &amp;lt;linux/regulator/consumer.h&amp;gt;
+#include &amp;lt;linux/clk.h&amp;gt;
 #include &amp;lt;linux/slab.h&amp;gt;
 #include &amp;lt;sound/core.h&amp;gt;
 #include &amp;lt;sound/pcm.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,6 +52,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int dapm_up_seq[] = {
 [snd_soc_dapm_pre] = 0,
 [snd_soc_dapm_supply] = 1,
 [snd_soc_dapm_regulator_supply] = 1,
+[snd_soc_dapm_clock_supply] = 1,
 [snd_soc_dapm_micbias] = 2,
 [snd_soc_dapm_dai_link] = 2,
 [snd_soc_dapm_dai] = 3,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -92,6 +94,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int dapm_down_seq[] = {
 [snd_soc_dapm_aif_out] = 10,
 [snd_soc_dapm_dai] = 10,
 [snd_soc_dapm_dai_link] = 11,
+[snd_soc_dapm_clock_supply] = 12,
 [snd_soc_dapm_regulator_supply] = 12,
 [snd_soc_dapm_supply] = 12,
 [snd_soc_dapm_post] = 13,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -391,6 +394,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void dapm_set_path_status(struct snd_soc_dapm_widget *w,
 case snd_soc_dapm_vmid:
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 case snd_soc_dapm_aif_in:
 case snd_soc_dapm_aif_out:
 case snd_soc_dapm_dai:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -764,6 +768,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int is_connected_output_ep(struct snd_soc_dapm_widget *widget,
 switch (widget-&amp;gt;id) {
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 return 0;
 default:
 break;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -850,6 +855,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int is_connected_input_ep(struct snd_soc_dapm_widget *widget,
 switch (widget-&amp;gt;id) {
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 return 0;
 default:
 break;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -996,6 +1002,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int dapm_regulator_event(struct snd_soc_dapm_widget *w,
 }
 EXPORT_SYMBOL_GPL(dapm_regulator_event);
 
+/*
+ * Handler for clock supply widget.
+ */
+int dapm_clock_event(struct snd_soc_dapm_widget *w,
+   struct snd_kcontrol *kcontrol, int event)
+{
+if (!w-&amp;gt;clk)
+return -EIO;
+
+if (SND_SOC_DAPM_EVENT_ON(event)) {
+return clk_enable(w-&amp;gt;clk);
+} else {
+clk_disable(w-&amp;gt;clk);
+return 0;
+}
+}
+EXPORT_SYMBOL_GPL(dapm_clock_event);
+
 static int dapm_widget_power_check(struct snd_soc_dapm_widget *w)
 {
 if (w-&amp;gt;power_checked)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1487,6 +1511,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void dapm_widget_set_power(struct snd_soc_dapm_widget *w, bool power,
 switch (w-&amp;gt;id) {
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 /* Supplies can't affect their outputs, only their inputs */
 break;
 default:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1587,6 +1612,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
 break;
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 case snd_soc_dapm_micbias:
 if (d-&amp;gt;target_bias_level &amp;lt; SND_SOC_BIAS_STANDBY)
 d-&amp;gt;target_bias_level = SND_SOC_BIAS_STANDBY;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1941,6 +1967,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static ssize_t dapm_widget_show(struct device *dev,
 case snd_soc_dapm_mixer_named_ctl:
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 if (w-&amp;gt;name)
 count += sprintf(buf + count, "%s: %s\n",
 w-&amp;gt;name, w-&amp;gt;power ? "On":"Off");
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2187,6 +2214,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
 case snd_soc_dapm_post:
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 case snd_soc_dapm_aif_in:
 case snd_soc_dapm_aif_out:
 case snd_soc_dapm_dai:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2873,6 +2901,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
 return NULL;
 }
 break;
+case snd_soc_dapm_clock_supply:
+w-&amp;gt;clk = clk_get(dapm-&amp;gt;dev, w-&amp;gt;name);
+if (IS_ERR(w-&amp;gt;clk)) {
+ret = PTR_ERR(w-&amp;gt;clk);
+dev_err(dapm-&amp;gt;dev, "Failed to request %s: %d\n",
+w-&amp;gt;name, ret);
+return NULL;
+}
+break;
 default:
 break;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2924,6 +2961,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
 break;
 case snd_soc_dapm_supply:
 case snd_soc_dapm_regulator_supply:
+case snd_soc_dapm_clock_supply:
 w-&amp;gt;power_check = dapm_supply_check_power;
 break;
 case snd_soc_dapm_dai:
&lt;/pre&gt;</description>
    <dc:creator>Ola Lilja</dc:creator>
    <dc:date>2012-05-24T13:26:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97865">
    <title>[PATCH 1/5] ALSA: pcm: Add debug-print helper function</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97865</link>
    <description>&lt;pre&gt;Adds a function getting the stream-name as a string for
a specific stream.

Signed-off-by: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;
---
 include/sound/pcm.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0d11128..a55d5db 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1073,4 +1073,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
 
 const char *snd_pcm_format_name(snd_pcm_format_t format);
 
+/**
+ * Get a string naming the direction of a stream
+ */
+static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
+{
+if (substream-&amp;gt;stream == SNDRV_PCM_STREAM_PLAYBACK)
+return "Playback";
+else
+return "Capture";
+}
+
 #endif /* __SOUND_PCM_H */
&lt;/pre&gt;</description>
    <dc:creator>Ola Lilja</dc:creator>
    <dc:date>2012-05-24T13:26:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97864">
    <title>[PATCH 1/5] ALSA: pcm: Add debug-print helper function</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97864</link>
    <description>&lt;pre&gt;Adds a function getting the stream-name as a string for
a specific stream.

Signed-off-by: Ola Lilja &amp;lt;ola.o.lilja&amp;lt; at &amp;gt;stericsson.com&amp;gt;
---
 include/sound/pcm.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0d11128..a55d5db 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1073,4 +1073,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
 
 const char *snd_pcm_format_name(snd_pcm_format_t format);
 
+/**
+ * Get a string naming the direction of a stream
+ */
+static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
+{
+if (substream-&amp;gt;stream == SNDRV_PCM_STREAM_PLAYBACK)
+return "Playback";
+else
+return "Capture";
+}
+
 #endif /* __SOUND_PCM_H */
&lt;/pre&gt;</description>
    <dc:creator>Ola Lilja</dc:creator>
    <dc:date>2012-05-24T13:24:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.alsa.devel/97863">
    <title>[PATCH 0/5] Version 5</title>
    <link>http://permalink.gmane.org/gmane.linux.alsa.devel/97863</link>
    <description>&lt;pre&gt;*) ALSA-core helper function made static inline
*) Removed debug-functions from the core-patch
*) Bug-fixes in codec-file
*) Controversial controls (clock-stuff) moved to machine-file
*) Removed custom functions for second codec-interface
*) Streams moved to separete DAPM-widgets

Ola Lilja (5):
  ALSA: pcm: Add debug-print helper function
  ASoC: core: Add widget SND_SOC_DAPM_CLOCK_SUPPLY
  ASoC: Ux500: Add platform-driver
  ASoC: codecs: Add AB8500 codec-driver
  ASoC: Ux500: Add machine-driver

 include/sound/pcm.h             |   11 +
 include/sound/soc-dapm.h        |   10 +
 sound/soc/codecs/Kconfig        |    4 +
 sound/soc/codecs/Makefile       |    2 +
 sound/soc/codecs/ab8500-codec.c | 2569 +++++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/ab8500-codec.h |  606 +++++++++
 sound/soc/soc-dapm.c            |   38 +
 sound/soc/ux500/Kconfig         |   18 +
 sound/soc/ux500/Makefile        |    6 +
 sound/soc/ux500/mop500.c        |  117 ++
 sound/soc/ux500/mop500_ab8500.c |  441 +++++++
 sound/soc/ux500/mop500_ab8500.h |   22 +
 sound/soc/ux500/ux500_pcm.c     |  318 +++++
 sound/soc/ux500/ux500_pcm.h     |   35 +
 14 files changed, 4197 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/codecs/ab8500-codec.c
 create mode 100644 sound/soc/codecs/ab8500-codec.h
 create mode 100644 sound/soc/ux500/mop500.c
 create mode 100644 sound/soc/ux500/mop500_ab8500.c
 create mode 100644 sound/soc/ux500/mop500_ab8500.h
 create mode 100644 sound/soc/ux500/ux500_pcm.c
 create mode 100644 sound/soc/ux500/ux500_pcm.h

&lt;/pre&gt;</description>
    <dc:creator>Ola Lilja</dc:creator>
    <dc:date>2012-05-24T13:24:45</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.alsa.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.alsa.devel</link>
  </textinput>
</rdf:RDF>

