]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/qcom', 'asoc/topic...
authorMark Brown <broonie@kernel.org>
Sun, 12 Apr 2015 18:49:11 +0000 (19:49 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 12 Apr 2015 18:49:11 +0000 (19:49 +0100)
1  2  3  4  5 
MAINTAINERS
sound/soc/codecs/rt286.c
sound/soc/omap/omap-hdmi-audio.c
sound/soc/sh/rcar/core.c

diff --cc MAINTAINERS
index 3a3c461e0787db9935f3332054c0b8b8a6077084,ddb9ac8d32b3eddc46d66bd408392ae09b637ea7,9514b794b74d7fb93072bbdbaefaaa79df38c5fd,ddc5a8cf9a8ac0078f8ca1bc99d9c48f8197214a,ddc5a8cf9a8ac0078f8ca1bc99d9c48f8197214a..080be6d19f786d1327fa2aba886c438815bd8638
@@@@@@ -1185,7 -1157,6 -1176,7 -1176,7 -1176,7 +1185,7 @@@@@@ M:        Sebastian Hesselbarth <sebastian.hes
     L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
     S: Maintained
     F: arch/arm/mach-mvebu/
  ---F: drivers/rtc/armada38x-rtc
 ++++F: drivers/rtc/rtc-armada38x.c
     
     ARM/Marvell Berlin SoC support
     M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
@@@@@@ -2379,11 -2343,9 -2369,10 -2369,10 -2369,10 +2379,11 @@@@@@ F:   arch/x86/include/asm/tce.
     
     CAN NETWORK LAYER
     M: Oliver Hartkopp <socketcan@hartkopp.net>
 ++++M: Marc Kleine-Budde <mkl@pengutronix.de>
     L: linux-can@vger.kernel.org
 ----W: http://gitorious.org/linux-can
 -   T: git git://gitorious.org/linux-can/linux-can-next.git
 ++++W: https://github.com/linux-can
 +   T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
 +   T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
     S: Maintained
     F: Documentation/networking/can.txt
     F: net/can/
@@@@@@ -2397,9 -2359,8 -2386,9 -2386,9 -2386,9 +2397,9 @@@@@@ CAN NETWORK DRIVER
     M: Wolfgang Grandegger <wg@grandegger.com>
     M: Marc Kleine-Budde <mkl@pengutronix.de>
     L: linux-can@vger.kernel.org
 ----W: http://gitorious.org/linux-can
 -   T: git git://gitorious.org/linux-can/linux-can-next.git
 ++++W: https://github.com/linux-can
 +   T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
 +   T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
     S: Maintained
     F: drivers/net/can/
     F: include/linux/can/dev.h
index 826037090c8385cf9a2ddaf255052051390f377d,2cd4fe463102d4532458e1ed3402abd276be8fc1,f374840a5a7ce376272d8f7e3290f91c099cb19f,f374840a5a7ce376272d8f7e3290f91c099cb19f,87af81b9e971f084a993562eb46472dd3665c0ab..0fcda35a3a93694fa5352d06144e934ee99b7583
@@@@@@ -395,20 -392,9 -395,9 -395,9 -395,20 +395,20 @@@@@@ int rt286_mic_detect(struct snd_soc_cod
     
        rt286->jack = jack;
     
 ---    /* Send an initial empty report */
 ---    snd_soc_jack_report(rt286->jack, 0,
 ---            SND_JACK_MICROPHONE | SND_JACK_HEADPHONE);
 +++    if (jack) {
 +++            /* enable IRQ */
-               if (rt286->jack->status | SND_JACK_HEADPHONE)
++++            if (rt286->jack->status & SND_JACK_HEADPHONE)
 +++                    snd_soc_dapm_force_enable_pin(&codec->dapm, "LDO1");
 +++            regmap_update_bits(rt286->regmap, RT286_IRQ_CTRL, 0x2, 0x2);
 +++            /* Send an initial empty report */
 +++            snd_soc_jack_report(rt286->jack, rt286->jack->status,
 +++                    SND_JACK_MICROPHONE | SND_JACK_HEADPHONE);
 +++    } else {
 +++            /* disable IRQ */
 +++            regmap_update_bits(rt286->regmap, RT286_IRQ_CTRL, 0x2, 0x0);
 +++            snd_soc_dapm_disable_pin(&codec->dapm, "LDO1");
 +++    }
 +++    snd_soc_dapm_sync(&codec->dapm);
     
        return 0;
     }
@@@@@@ -1204,17 -1216,6 -1193,17 -1193,17 -1203,17 +1203,17 @@@@@@ static struct dmi_system_id force_combo
        { }
     };
     
  ---                   DMI_MATCH(DMI_BOARD_NAME, "0144P8")
 +   static struct dmi_system_id dmi_dell_dino[] = {
 +      {
 +              .ident = "Dell Dino",
 +              .matches = {
 +                      DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
 ++++                   DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9343")
 +              }
 +      },
 +      { }
 +   };
 +   
     static int rt286_i2c_probe(struct i2c_client *i2c,
                           const struct i2c_device_id *id)
     {
                return ret;
        }
     
----    regmap_read(rt286->regmap,
----            RT286_GET_PARAM(AC_NODE_ROOT, AC_PAR_VENDOR_ID), &ret);
- --    if (ret != RT286_VENDOR_ID && ret != RT288_VENDOR_ID) {
 -      if (ret != RT286_VENDOR_ID) {
++++    ret = regmap_read(rt286->regmap,
++++            RT286_GET_PARAM(AC_NODE_ROOT, AC_PAR_VENDOR_ID), &val);
++++    if (ret != 0) {
++++            dev_err(&i2c->dev, "I2C error %d\n", ret);
++++            return ret;
++++    }
++++    if (val != RT286_VENDOR_ID && val != RT288_VENDOR_ID) {
                dev_err(&i2c->dev,
----                    "Device with ID register %x is not rt286\n", ret);
++++                    "Device with ID register %x is not rt286\n", val);
                return -ENODEV;
        }
     
Simple merge
index 31202e95be1ee6dc5fde83e44ce955347bc8109c,75308bbc2ce896e4a266ca0830cde8f5c020a225,1b53605f7154394d1746cb0a692953e296848c2a,6f60149acdbffba1568243576bb069bad63c106d,1b53605f7154394d1746cb0a692953e296848c2a..9f48d75fa992351adffef3d834620e7d2682354e
@@@@@@ -138,264 -138,251 -138,251 -137,39 -138,251 +137,39 @@@@@@ char *rsnd_mod_name(struct rsnd_mod *mo
        return mod->ops->name;
     }
     
--- -char *rsnd_mod_dma_name(struct rsnd_mod *mod)
+++ +struct dma_chan *rsnd_mod_dma_req(struct rsnd_mod *mod)
     {
--- -   if (!mod || !mod->ops)
--- -           return "unknown";
--- -
--- -   if (!mod->ops->dma_name)
--- -           return mod->ops->name;
+++ +   if (!mod || !mod->ops || !mod->ops->dma_req)
+++ +           return NULL;
     
--- -   return mod->ops->dma_name(mod);
+++ +   return mod->ops->dma_req(mod);
     }
     
 -   void rsnd_mod_init(struct rsnd_priv *priv,
 -                 struct rsnd_mod *mod,
  - -void rsnd_mod_init(struct rsnd_mod *mod,
 ++ +int rsnd_mod_init(struct rsnd_mod *mod,
                   struct rsnd_mod_ops *ops,
 +                 struct clk *clk,
                   enum rsnd_mod_type type,
                   int id)
     {
 -      mod->priv       = priv;
 ++ +   int ret = clk_prepare(clk);
 ++ +
 ++ +   if (ret)
 ++ +           return ret;
 ++ +
        mod->id         = id;
        mod->ops        = ops;
        mod->type       = type;
 -   }
 -   
 -   /*
 -    * rsnd_dma functions
 -    */
 -   void rsnd_dma_stop(struct rsnd_dma *dma)
 -   {
 -      dmaengine_terminate_all(dma->chan);
 -   }
 -   
 -   static void rsnd_dma_complete(void *data)
 -   {
 -      struct rsnd_dma *dma = (struct rsnd_dma *)data;
 -      struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
 -      struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
 -   
 -      /*
 -       * Renesas sound Gen1 needs 1 DMAC,
 -       * Gen2 needs 2 DMAC.
 -       * In Gen2 case, it are Audio-DMAC, and Audio-DMAC-peri-peri.
 -       * But, Audio-DMAC-peri-peri doesn't have interrupt,
 -       * and this driver is assuming that here.
 -       *
 -       * If Audio-DMAC-peri-peri has interrpt,
 -       * rsnd_dai_pointer_update() will be called twice,
 -       * ant it will breaks io->byte_pos
 -       */
 -   
 -      rsnd_dai_pointer_update(io, io->byte_per_period);
 -   }
 -   
 -   void rsnd_dma_start(struct rsnd_dma *dma)
 -   {
 -      struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
 -      struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
 -      struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
 -      struct snd_pcm_substream *substream = io->substream;
 -      struct device *dev = rsnd_priv_to_dev(priv);
 -      struct dma_async_tx_descriptor *desc;
 -   
 -      desc = dmaengine_prep_dma_cyclic(dma->chan,
 -                                       (dma->addr) ? dma->addr :
 -                                       substream->runtime->dma_addr,
 -                                       snd_pcm_lib_buffer_bytes(substream),
 -                                       snd_pcm_lib_period_bytes(substream),
 -                                       dma->dir,
 -                                       DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
 -   
 -      if (!desc) {
 -              dev_err(dev, "dmaengine_prep_slave_sg() fail\n");
 -              return;
 -      }
 -   
 -      desc->callback          = rsnd_dma_complete;
 -      desc->callback_param    = dma;
 -   
 -      if (dmaengine_submit(desc) < 0) {
 -              dev_err(dev, "dmaengine_submit() fail\n");
 -              return;
 -      }
 -   
 -      dma_async_issue_pending(dma->chan);
 -   }
 -   
 -   int rsnd_dma_available(struct rsnd_dma *dma)
 -   {
 -      return !!dma->chan;
 -   }
 -   
 -   #define DMA_NAME_SIZE 16
 -   #define MOD_MAX 4 /* MEM/SSI/SRC/DVC */
 -   static int _rsnd_dma_of_name(char *dma_name, struct rsnd_mod *mod)
 -   {
 -      if (mod)
 -              return snprintf(dma_name, DMA_NAME_SIZE / 2, "%s%d",
 -                       rsnd_mod_dma_name(mod), rsnd_mod_id(mod));
 -      else
 -              return snprintf(dma_name, DMA_NAME_SIZE / 2, "mem");
 -   
 -   }
 -   
 -   static void rsnd_dma_of_name(struct rsnd_mod *mod_from,
 -                           struct rsnd_mod *mod_to,
 -                           char *dma_name)
 -   {
 -      int index = 0;
 -   
 -      index = _rsnd_dma_of_name(dma_name + index, mod_from);
 -      *(dma_name + index++) = '_';
 -      index = _rsnd_dma_of_name(dma_name + index, mod_to);
 -   }
 -   
 -   static void rsnd_dma_of_path(struct rsnd_dma *dma,
 -                           int is_play,
 -                           struct rsnd_mod **mod_from,
 -                           struct rsnd_mod **mod_to)
 -   {
 -      struct rsnd_mod *this = rsnd_dma_to_mod(dma);
 -      struct rsnd_dai_stream *io = rsnd_mod_to_io(this);
 -      struct rsnd_mod *ssi = rsnd_io_to_mod_ssi(io);
 -      struct rsnd_mod *src = rsnd_io_to_mod_src(io);
 -      struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io);
 -      struct rsnd_mod *mod[MOD_MAX];
 -      int i, index;
 -   
 -   
 -      for (i = 0; i < MOD_MAX; i++)
 -              mod[i] = NULL;
 -   
 -      /*
 -       * in play case...
 -       *
 -       * src -> dst
 -       *
 -       * mem -> SSI
 -       * mem -> SRC -> SSI
 -       * mem -> SRC -> DVC -> SSI
 -       */
 -      mod[0] = NULL; /* for "mem" */
 -      index = 1;
 -      for (i = 1; i < MOD_MAX; i++) {
 -              if (!src) {
 -                      mod[i] = ssi;
 -              } else if (!dvc) {
 -                      mod[i] = src;
 -                      src = NULL;
 -              } else {
 -                      if ((!is_play) && (this == src))
 -                              this = dvc;
 -   
 -                      mod[i] = (is_play) ? src : dvc;
 -                      i++;
 -                      mod[i] = (is_play) ? dvc : src;
 -                      src = NULL;
 -                      dvc = NULL;
 -              }
 -   
 -              if (mod[i] == this)
 -                      index = i;
 -   
 -              if (mod[i] == ssi)
 -                      break;
 -      }
 +      mod->clk        = clk;
  - -}
  - -
  - -/*
  - - * rsnd_dma functions
  - - */
  - -void rsnd_dma_stop(struct rsnd_dma *dma)
  - -{
  - -   dmaengine_terminate_all(dma->chan);
  - -}
  - -
  - -static void rsnd_dma_complete(void *data)
  - -{
  - -   struct rsnd_dma *dma = (struct rsnd_dma *)data;
  - -   struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
  - -   struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
  - -
  - -   /*
  - -    * Renesas sound Gen1 needs 1 DMAC,
  - -    * Gen2 needs 2 DMAC.
  - -    * In Gen2 case, it are Audio-DMAC, and Audio-DMAC-peri-peri.
  - -    * But, Audio-DMAC-peri-peri doesn't have interrupt,
  - -    * and this driver is assuming that here.
  - -    *
  - -    * If Audio-DMAC-peri-peri has interrpt,
  - -    * rsnd_dai_pointer_update() will be called twice,
  - -    * ant it will breaks io->byte_pos
  - -    */
  - -
  - -   rsnd_dai_pointer_update(io, io->byte_per_period);
  - -}
  - -
  - -void rsnd_dma_start(struct rsnd_dma *dma)
  - -{
  - -   struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
  - -   struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
  - -   struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
  - -   struct snd_pcm_substream *substream = io->substream;
  - -   struct device *dev = rsnd_priv_to_dev(priv);
  - -   struct dma_async_tx_descriptor *desc;
  - -
  - -   desc = dmaengine_prep_dma_cyclic(dma->chan,
  - -                                    (dma->addr) ? dma->addr :
  - -                                    substream->runtime->dma_addr,
  - -                                    snd_pcm_lib_buffer_bytes(substream),
  - -                                    snd_pcm_lib_period_bytes(substream),
  - -                                    dma->dir,
  - -                                    DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
  - -
  - -   if (!desc) {
  - -           dev_err(dev, "dmaengine_prep_slave_sg() fail\n");
  - -           return;
  - -   }
  - -
  - -   desc->callback          = rsnd_dma_complete;
  - -   desc->callback_param    = dma;
  - -
  - -   if (dmaengine_submit(desc) < 0) {
  - -           dev_err(dev, "dmaengine_submit() fail\n");
  - -           return;
  - -   }
  - -
  - -   dma_async_issue_pending(dma->chan);
  - -}
  - -
  - -int rsnd_dma_available(struct rsnd_dma *dma)
  - -{
  - -   return !!dma->chan;
  - -}
  - -
  - -#define DMA_NAME_SIZE 16
  - -#define MOD_MAX 4 /* MEM/SSI/SRC/DVC */
  - -static int _rsnd_dma_of_name(char *dma_name, struct rsnd_mod *mod)
  - -{
  - -   if (mod)
  - -           return snprintf(dma_name, DMA_NAME_SIZE / 2, "%s%d",
  - -                    rsnd_mod_dma_name(mod), rsnd_mod_id(mod));
  - -   else
  - -           return snprintf(dma_name, DMA_NAME_SIZE / 2, "mem");
  - -
  - -}
  - -
  - -static void rsnd_dma_of_name(struct rsnd_mod *mod_from,
  - -                        struct rsnd_mod *mod_to,
  - -                        char *dma_name)
  - -{
  - -   int index = 0;
  - -
  - -   index = _rsnd_dma_of_name(dma_name + index, mod_from);
  - -   *(dma_name + index++) = '_';
  - -   index = _rsnd_dma_of_name(dma_name + index, mod_to);
  - -}
  - -
  - -static void rsnd_dma_of_path(struct rsnd_dma *dma,
  - -                        int is_play,
  - -                        struct rsnd_mod **mod_from,
  - -                        struct rsnd_mod **mod_to)
  - -{
  - -   struct rsnd_mod *this = rsnd_dma_to_mod(dma);
  - -   struct rsnd_dai_stream *io = rsnd_mod_to_io(this);
  - -   struct rsnd_mod *ssi = rsnd_io_to_mod_ssi(io);
  - -   struct rsnd_mod *src = rsnd_io_to_mod_src(io);
  - -   struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io);
  - -   struct rsnd_mod *mod[MOD_MAX];
  - -   int i, index;
  - -
  - -
  - -   for (i = 0; i < MOD_MAX; i++)
  - -           mod[i] = NULL;
     
  - -   /*
  - -    * in play case...
  - -    *
  - -    * src -> dst
  - -    *
  - -    * mem -> SSI
  - -    * mem -> SRC -> SSI
  - -    * mem -> SRC -> DVC -> SSI
  - -    */
  - -   mod[0] = NULL; /* for "mem" */
  - -   index = 1;
  - -   for (i = 1; i < MOD_MAX; i++) {
  - -           if (!src) {
  - -                   mod[i] = ssi;
  - -           } else if (!dvc) {
  - -                   mod[i] = src;
  - -                   src = NULL;
  - -           } else {
  - -                   if ((!is_play) && (this == src))
  - -                           this = dvc;
  - -
  - -                   mod[i] = (is_play) ? src : dvc;
  - -                   i++;
  - -                   mod[i] = (is_play) ? dvc : src;
  - -                   src = NULL;
  - -                   dvc = NULL;
  - -           }
  - -
  - -           if (mod[i] == this)
  - -                   index = i;
  - -
  - -           if (mod[i] == ssi)
  - -                   break;
  - -   }
  - -
 -- -   if (is_play) {
 -- -           *mod_from = mod[index - 1];
 -- -           *mod_to   = mod[index];
 -- -   } else {
 -- -           *mod_from = mod[index];
 -- -           *mod_to   = mod[index - 1];
 -- -   }
 -- -}
 -- -
 -- -int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
 -- -             int is_play, int id)
 -- -{
 -- -   struct device *dev = rsnd_priv_to_dev(priv);
 -- -   struct dma_slave_config cfg;
 -- -   struct rsnd_mod *mod_from;
 -- -   struct rsnd_mod *mod_to;
 -- -   char dma_name[DMA_NAME_SIZE];
 -- -   dma_cap_mask_t mask;
 -- -   int ret;
 -- -
 -- -   if (dma->chan) {
 -- -           dev_err(dev, "it already has dma channel\n");
 -- -           return -EIO;
 -- -   }
 -- -
 -- -   dma_cap_zero(mask);
 -- -   dma_cap_set(DMA_SLAVE, mask);
 -- -
 -- -   rsnd_dma_of_path(dma, is_play, &mod_from, &mod_to);
 -- -   rsnd_dma_of_name(mod_from, mod_to, dma_name);
 -- -
 -- -   cfg.slave_id    = id;
 -- -   cfg.direction   = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
 -- -   cfg.src_addr    = rsnd_gen_dma_addr(priv, mod_from, is_play, 1);
 -- -   cfg.dst_addr    = rsnd_gen_dma_addr(priv, mod_to,   is_play, 0);
 -- -   cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 -- -   cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 -- -
 -- -   dev_dbg(dev, "dma : %s %pad -> %pad\n",
 -- -           dma_name, &cfg.src_addr, &cfg.dst_addr);
 -- -
 -- -   dma->chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
 -- -                                                (void *)id, dev,
 -- -                                                dma_name);
 -- -   if (!dma->chan) {
 -- -           dev_err(dev, "can't get dma channel\n");
 -- -           goto rsnd_dma_channel_err;
 -- -   }
 -- -
 -- -   ret = dmaengine_slave_config(dma->chan, &cfg);
 -- -   if (ret < 0)
 -- -           goto rsnd_dma_init_err;
 -- -
 -- -   dma->addr = is_play ? cfg.src_addr : cfg.dst_addr;
 -- -   dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
 -- -
 -- -   return 0;
 -- -
 -- -rsnd_dma_init_err:
 -- -   rsnd_dma_quit(priv, dma);
 -- -rsnd_dma_channel_err:
 -- -
 -- -   /*
 -- -    * DMA failed. try to PIO mode
 -- -    * see
 -- -    *      rsnd_ssi_fallback()
 -- -    *      rsnd_rdai_continuance_probe()
 -- -    */
 -- -   return -EAGAIN;
 ++ +   return ret;
     }
     
 -- -void  rsnd_dma_quit(struct rsnd_priv *priv,
 -- -               struct rsnd_dma *dma)
 ++ +void rsnd_mod_quit(struct rsnd_mod *mod)
     {
 -- -   if (dma->chan)
 -- -           dma_release_channel(dma->chan);
 -- -
 -- -   dma->chan = NULL;
 ++ +   if (mod->clk)
 ++ +           clk_unprepare(mod->clk);
     }
     
-    /*
-     * rsnd_dma functions
-     */
-    void rsnd_dma_stop(struct rsnd_dma *dma)
-    {
-       dmaengine_terminate_all(dma->chan);
-    }
-    
-    static void rsnd_dma_complete(void *data)
-    {
-       struct rsnd_dma *dma = (struct rsnd_dma *)data;
-       struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
-       struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-    
-       /*
-        * Renesas sound Gen1 needs 1 DMAC,
-        * Gen2 needs 2 DMAC.
-        * In Gen2 case, it are Audio-DMAC, and Audio-DMAC-peri-peri.
-        * But, Audio-DMAC-peri-peri doesn't have interrupt,
-        * and this driver is assuming that here.
-        *
-        * If Audio-DMAC-peri-peri has interrpt,
-        * rsnd_dai_pointer_update() will be called twice,
-        * ant it will breaks io->byte_pos
-        */
-    
-       rsnd_dai_pointer_update(io, io->byte_per_period);
-    }
-    
-    void rsnd_dma_start(struct rsnd_dma *dma)
-    {
-       struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
-       struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-       struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-       struct snd_pcm_substream *substream = io->substream;
-       struct device *dev = rsnd_priv_to_dev(priv);
-       struct dma_async_tx_descriptor *desc;
-    
-       desc = dmaengine_prep_dma_cyclic(dma->chan,
-                                        (dma->addr) ? dma->addr :
-                                        substream->runtime->dma_addr,
-                                        snd_pcm_lib_buffer_bytes(substream),
-                                        snd_pcm_lib_period_bytes(substream),
-                                        dma->dir,
-                                        DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-    
-       if (!desc) {
-               dev_err(dev, "dmaengine_prep_slave_sg() fail\n");
-               return;
-       }
-    
-       desc->callback          = rsnd_dma_complete;
-       desc->callback_param    = dma;
-    
-       if (dmaengine_submit(desc) < 0) {
-               dev_err(dev, "dmaengine_submit() fail\n");
-               return;
-       }
-    
-       dma_async_issue_pending(dma->chan);
-    }
-    
-    int rsnd_dma_available(struct rsnd_dma *dma)
-    {
-       return !!dma->chan;
-    }
-    
-    #define DMA_NAME_SIZE 16
-    #define MOD_MAX 4 /* MEM/SSI/SRC/DVC */
-    static int _rsnd_dma_of_name(char *dma_name, struct rsnd_mod *mod)
-    {
-       if (mod)
-               return snprintf(dma_name, DMA_NAME_SIZE / 2, "%s%d",
-                        rsnd_mod_dma_name(mod), rsnd_mod_id(mod));
-       else
-               return snprintf(dma_name, DMA_NAME_SIZE / 2, "mem");
-    
-    }
-    
-    static void rsnd_dma_of_name(struct rsnd_mod *mod_from,
-                            struct rsnd_mod *mod_to,
-                            char *dma_name)
-    {
-       int index = 0;
-    
-       index = _rsnd_dma_of_name(dma_name + index, mod_from);
-       *(dma_name + index++) = '_';
-       index = _rsnd_dma_of_name(dma_name + index, mod_to);
-    }
-    
-    static void rsnd_dma_of_path(struct rsnd_dma *dma,
-                            int is_play,
-                            struct rsnd_mod **mod_from,
-                            struct rsnd_mod **mod_to)
-    {
-       struct rsnd_mod *this = rsnd_dma_to_mod(dma);
-       struct rsnd_dai_stream *io = rsnd_mod_to_io(this);
-       struct rsnd_mod *ssi = rsnd_io_to_mod_ssi(io);
-       struct rsnd_mod *src = rsnd_io_to_mod_src(io);
-       struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io);
-       struct rsnd_mod *mod[MOD_MAX];
-       int i, index;
-    
-    
-       for (i = 0; i < MOD_MAX; i++)
-               mod[i] = NULL;
-    
-       /*
-        * in play case...
-        *
-        * src -> dst
-        *
-        * mem -> SSI
-        * mem -> SRC -> SSI
-        * mem -> SRC -> DVC -> SSI
-        */
-       mod[0] = NULL; /* for "mem" */
-       index = 1;
-       for (i = 1; i < MOD_MAX; i++) {
-               if (!src) {
-                       mod[i] = ssi;
-               } else if (!dvc) {
-                       mod[i] = src;
-                       src = NULL;
-               } else {
-                       if ((!is_play) && (this == src))
-                               this = dvc;
-    
-                       mod[i] = (is_play) ? src : dvc;
-                       i++;
-                       mod[i] = (is_play) ? dvc : src;
-                       src = NULL;
-                       dvc = NULL;
-               }
-    
-               if (mod[i] == this)
-                       index = i;
-    
-               if (mod[i] == ssi)
-                       break;
-       }
-    
-       if (is_play) {
-               *mod_from = mod[index - 1];
-               *mod_to   = mod[index];
-       } else {
-               *mod_from = mod[index];
-               *mod_to   = mod[index - 1];
-       }
-    }
-    
-    int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
-                 int is_play, int id)
-    {
-       struct device *dev = rsnd_priv_to_dev(priv);
-       struct dma_slave_config cfg;
-       struct rsnd_mod *mod_from;
-       struct rsnd_mod *mod_to;
-       char dma_name[DMA_NAME_SIZE];
-       dma_cap_mask_t mask;
-       int ret;
-    
-       if (dma->chan) {
-               dev_err(dev, "it already has dma channel\n");
-               return -EIO;
-       }
-    
-       dma_cap_zero(mask);
-       dma_cap_set(DMA_SLAVE, mask);
-    
-       rsnd_dma_of_path(dma, is_play, &mod_from, &mod_to);
-       rsnd_dma_of_name(mod_from, mod_to, dma_name);
-    
-       cfg.slave_id    = id;
-       cfg.direction   = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-       cfg.src_addr    = rsnd_gen_dma_addr(priv, mod_from, is_play, 1);
-       cfg.dst_addr    = rsnd_gen_dma_addr(priv, mod_to,   is_play, 0);
-       cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-       cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-    
-       dev_dbg(dev, "dma : %s %pad -> %pad\n",
-               dma_name, &cfg.src_addr, &cfg.dst_addr);
-    
-       dma->chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
-                                                    (void *)id, dev,
-                                                    dma_name);
-       if (!dma->chan) {
-               dev_err(dev, "can't get dma channel\n");
-               goto rsnd_dma_channel_err;
-       }
-    
-       ret = dmaengine_slave_config(dma->chan, &cfg);
-       if (ret < 0)
-               goto rsnd_dma_init_err;
-    
-       dma->addr = is_play ? cfg.src_addr : cfg.dst_addr;
-       dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-    
-       return 0;
-    
-    rsnd_dma_init_err:
-       rsnd_dma_quit(priv, dma);
-    rsnd_dma_channel_err:
-    
-       /*
-        * DMA failed. try to PIO mode
-        * see
-        *      rsnd_ssi_fallback()
-        *      rsnd_rdai_continuance_probe()
-        */
-       return -EAGAIN;
-    }
-    
-    void  rsnd_dma_quit(struct rsnd_priv *priv,
-                   struct rsnd_dma *dma)
-    {
-       if (dma->chan)
-               dma_release_channel(dma->chan);
-    
-       dma->chan = NULL;
-    }
-    
     /*
      * settting function
      */
@@@@@@ -891,9 -893,8 -878,9 -668,10 -878,9 +668,10 @@@@@@ static int rsnd_dai_probe(struct platfo
                        drv[i].playback.formats         = RSND_FMTS;
                        drv[i].playback.channels_min    = 2;
                        drv[i].playback.channels_max    = 2;
+++ +                   drv[i].playback.stream_name     = rdai[i].playback.name;
     
                        rdai[i].playback.info = &info->dai_info[i].playback;
 +                      rdai[i].playback.rdai = rdai + i;
                        rsnd_path_init(priv, &rdai[i], &rdai[i].playback);
                }
                if (cmod) {
                        drv[i].capture.formats          = RSND_FMTS;
                        drv[i].capture.channels_min     = 2;
                        drv[i].capture.channels_max     = 2;
+++ +                   drv[i].capture.stream_name      = rdai[i].capture.name;
     
                        rdai[i].capture.info = &info->dai_info[i].capture;
 +                      rdai[i].capture.rdai = rdai + i;
                        rsnd_path_init(priv, &rdai[i], &rdai[i].capture);
                }
     
@@@@@@ -1314,16 -1311,10 -1295,13 -1106,16 -1295,13 +1106,16 @@@@@@ static int rsnd_remove(struct platform_
        pm_runtime_disable(&pdev->dev);
     
        for_each_rsnd_dai(rdai, priv, i) {
 -              ret |= rsnd_dai_call(remove, &rdai->playback, rdai);
 -              ret |= rsnd_dai_call(remove, &rdai->capture, rdai);
 +              ret |= rsnd_dai_call(remove, &rdai->playback, priv);
 +              ret |= rsnd_dai_call(remove, &rdai->capture, priv);
        }
     
 ++ +   for (i = 0; i < ARRAY_SIZE(remove_func); i++)
 ++ +           remove_func[i](pdev, priv);
 ++ +
 +      snd_soc_unregister_component(&pdev->dev);
 +      snd_soc_unregister_platform(&pdev->dev);
 +   
        return ret;
     }