diff for duplicates of <1263899596.3089.81.camel@odin> diff --git a/a/1.txt b/N1/1.txt index b67c9e6..0ffe62c 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -534,8 +534,7 @@ What does the "was" value represent here ? > + > +static inline struct siu_port *siu_port_info(struct snd_pcm_substream *substream) > +{ -> + struct platform_device *pdev = -> + to_platform_device(substream->pcm->card->dev); +> + struct platform_device *pdev > + to_platform_device(substream->pcm->card->dev); > + return siu_ports[pdev->id]; > +} > + @@ -716,7 +715,7 @@ What does the "was" value represent here ? > + /* portA, portB, SIU operate */ > + siu_write32(base + SRCTL, 0x301); > + -> + /* portA=256fs, portB=256fs */ +> + /* portA%6fs, portB%6fs */ > + siu_write32(base + CKCTL, 0x40400000); > + > + /* portA's BRG does not divide SIUCKA */ @@ -814,7 +813,7 @@ What does the "was" value represent here ? > + srctl |= 0x200; > + ifctl &= ~0xc2; > + /* Mono mode is not used, instead, stereo is simulated */ -> + if (rt->channels == 1) +> + if (rt->channels = 1) > + ifctl |= 0x80; > + break; > + case SIU_PORTB: @@ -822,7 +821,7 @@ What does the "was" value represent here ? > + srctl |= 0x100; > + ifctl &= ~0x31; > + /* Mono mode is not used, instead, stereo is simulated */ -> + if (rt->channels == 1) +> + if (rt->channels = 1) > + ifctl |= 0x20; > + break; > + } @@ -1142,7 +1141,7 @@ used. > + dev_dbg(substream->pcm->card->dev, "%s: port=%d@%p\n", __func__, > + info->port_id, port_info); > + -> + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) +> + if (substream->stream = SNDRV_PCM_STREAM_PLAYBACK) > + port_info->play_cap &= ~PLAYBACK_ENABLED; > + else > + port_info->play_cap &= ~CAPTURE_ENABLED; @@ -1170,7 +1169,7 @@ used. > + "%s: port %d, active streams %lx, %d channels\n", > + __func__, info->port_id, port_info->play_cap, rt->channels); > + -> + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { +> + if (substream->stream = SNDRV_PCM_STREAM_PLAYBACK) { > + self = PLAYBACK_ENABLED; > + siu_stream = &port_info->playback; > + } else { @@ -1589,13 +1588,12 @@ siu_dai_open() > + if (!siu_stream->rw_flg) > + return; > + -> + if (substream->runtime->channels == 1 && -> + substream->stream == SNDRV_PCM_STREAM_CAPTURE) +> + if (substream->runtime->channels = 1 && +> + substream->stream = SNDRV_PCM_STREAM_CAPTURE) > + copy_capture_period(siu_stream); > + > + /* Update completed period count */ -> + if (++siu_stream->cur_period >= -> + GET_MAX_PERIODS(siu_stream->buf_bytes, +> + if (++siu_stream->cur_period >> + GET_MAX_PERIODS(siu_stream->buf_bytes, > + siu_stream->period_bytes)) > + siu_stream->cur_period = 0; > + @@ -1722,12 +1720,12 @@ siu_dai_open() > + return; > + } > + -> + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { +> + if (substream->stream = SNDRV_PCM_STREAM_CAPTURE) { > + dma_addr_t buff; > + size_t count; > + u8 *virt; > + -> + if (rt->channels == 1) { +> + if (rt->channels = 1) { > + buff = siu_stream->mono_dma; > + virt = siu_stream->mono_buf; > + count = siu_stream->mono_size; @@ -1745,7 +1743,7 @@ siu_dai_open() > + siu_pcm_rd_set(port_info, buff, count); > + } else { > + /* For mono streams we need to use the mono buffer */ -> + if (rt->channels == 1) { +> + if (rt->channels = 1) { > + copy_playback_period(siu_stream); > + siu_pcm_wr_set(port_info, > + siu_stream->mono_dma, siu_stream->mono_size); @@ -1834,7 +1832,7 @@ siu_dai_open() > + struct device *dev = ss->pcm->card->dev; > + struct siu_stream *siu_stream; > + -> + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) +> + if (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) > + siu_stream = &port_info->playback; > + else > + siu_stream = &port_info->capture; @@ -1842,7 +1840,7 @@ siu_dai_open() > + dev_dbg(dev, "%s: port=%d, mono %p\n", __func__, > + info->port_id, siu_stream->mono_buf); > + -> + if (siu_stream->mono_buf && ss->runtime->channels == 1) +> + if (siu_stream->mono_buf && ss->runtime->channels = 1) > + siu_pcm_mono_free(ss->pcm->card->dev, siu_stream); > + > + return snd_pcm_lib_free_pages(ss); @@ -1878,7 +1876,7 @@ siu_dai_open() > + > + dev_dbg(dev, "%s, port=%d@%p\n", __func__, port, port_info); > + -> + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) { +> + if (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) { > + siu_stream = &port_info->playback; > + param = &siu_stream->param; > + param->slave_id = port ? SHDMA_SLAVE_SIUB_TX : @@ -1912,7 +1910,7 @@ siu_dai_open() > + > + dev_dbg(dev, "%s: port=%d\n", __func__, info->port_id); > + -> + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) +> + if (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) > + siu_stream = &port_info->playback; > + else > + siu_stream = &port_info->capture; @@ -1939,8 +1937,7 @@ siu_dai_open() Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ? -> + if (siu_stream->mono_buf && siu_stream->mono_size != -> + siu_stream->period_bytes * 2) { +> + if (siu_stream->mono_buf && siu_stream->mono_size !> + siu_stream->period_bytes * 2) { > + dma_free_coherent(dev, siu_stream->mono_size, > + siu_stream->mono_buf, siu_stream->mono_dma); > + siu_stream->mono_buf = NULL; @@ -1972,7 +1969,7 @@ Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ? > + struct siu_stream *siu_stream; > + snd_pcm_sframes_t xfer_cnt; > + -> + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) +> + if (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) > + siu_stream = &port_info->playback; > + else > + siu_stream = &port_info->capture; @@ -1997,7 +1994,7 @@ Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ? > + if (!xfer_cnt || xfer_cnt > 0x1000000) > + return -EINVAL; > + -> + if (rt->channels == 1) { +> + if (rt->channels = 1) { > + int ret = siu_pcm_mono_alloc(ss->pcm->card->dev, > + siu_stream); > + if (ret < 0) @@ -2028,7 +2025,7 @@ Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ? > + > + switch (cmd) { > + case SNDRV_PCM_TRIGGER_START: -> + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) +> + if (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) > + ret = siu_pcm_stmwrite_start(port_info); > + else > + ret = siu_pcm_stmread_start(port_info); @@ -2039,7 +2036,7 @@ Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ? > + > + break; > + case SNDRV_PCM_TRIGGER_STOP: -> + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) +> + if (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) > + siu_pcm_stmwrite_stop(port_info); > + else > + siu_pcm_stmread_stop(port_info); @@ -2068,7 +2065,7 @@ Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ? > + size_t ptr; > + struct siu_stream *siu_stream; > + -> + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) +> + if (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) > + siu_stream = &port_info->playback; > + else > + siu_stream = &port_info->capture; @@ -2096,7 +2093,7 @@ Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ? > +static int siu_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, > + struct snd_pcm *pcm) > +{ -> + /* card->dev == socdev->dev, see snd_soc_new_pcms() */ +> + /* card->dev = socdev->dev, see snd_soc_new_pcms() */ > + struct siu_info *info = siu_i2s_dai.private_data; > + struct platform_device *pdev = to_platform_device(card->dev); > + int ret; diff --git a/a/content_digest b/N1/content_digest index a620939..28d5cad 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\0Pine.LNX.4.64.1001190839110.4607@axis700.grange\0" "ref\0Pine.LNX.4.64.1001190902000.4607@axis700.grange\0" "From\0Liam Girdwood <lrg@slimlogic.co.uk>\0" - "Subject\0Re: [alsa-devel] [PATCH 2/4] ASoC: add DAI and platform drivers for SH SIU and support for the Migo-R board\0" + "Subject\0Re: [alsa-devel] [PATCH 2/4] ASoC: add DAI and platform drivers\0" "Date\0Tue, 19 Jan 2010 11:13:16 +0000\0" "To\0Guennadi Liakhovetski <g.liakhovetski@gmx.de>\0" "Cc\0alsa-devel@alsa-project.org" @@ -547,8 +547,7 @@ "> +\n" "> +static inline struct siu_port *siu_port_info(struct snd_pcm_substream *substream)\n" "> +{\n" - "> +\tstruct platform_device *pdev =\n" - "> +\t\tto_platform_device(substream->pcm->card->dev);\n" + "> +\tstruct platform_device *pdev > +\t\tto_platform_device(substream->pcm->card->dev);\n" "> +\treturn siu_ports[pdev->id];\n" "> +}\n" "> +\n" @@ -729,7 +728,7 @@ "> +\t/* portA, portB, SIU operate */\n" "> +\tsiu_write32(base + SRCTL, 0x301);\n" "> +\n" - "> +\t/* portA=256fs, portB=256fs */\n" + "> +\t/* portA%6fs, portB%6fs */\n" "> +\tsiu_write32(base + CKCTL, 0x40400000);\n" "> +\n" "> +\t/* portA's BRG does not divide SIUCKA */\n" @@ -827,7 +826,7 @@ "> +\t\tsrctl |= 0x200;\n" "> +\t\tifctl &= ~0xc2;\n" "> +\t\t/* Mono mode is not used, instead, stereo is simulated */\n" - "> +\t\tif (rt->channels == 1)\n" + "> +\t\tif (rt->channels = 1)\n" "> +\t\t\tifctl |= 0x80;\n" "> +\t\tbreak;\n" "> +\tcase SIU_PORTB:\n" @@ -835,7 +834,7 @@ "> +\t\tsrctl |= 0x100;\n" "> +\t\tifctl &= ~0x31;\n" "> +\t\t/* Mono mode is not used, instead, stereo is simulated */\n" - "> +\t\tif (rt->channels == 1)\n" + "> +\t\tif (rt->channels = 1)\n" "> +\t\t\tifctl |= 0x20;\n" "> +\t\tbreak;\n" "> +\t}\n" @@ -1155,7 +1154,7 @@ "> +\tdev_dbg(substream->pcm->card->dev, \"%s: port=%d@%p\\n\", __func__,\n" "> +\t\tinfo->port_id, port_info);\n" "> +\n" - "> +\tif (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)\n" + "> +\tif (substream->stream = SNDRV_PCM_STREAM_PLAYBACK)\n" "> +\t\tport_info->play_cap &= ~PLAYBACK_ENABLED;\n" "> +\telse\n" "> +\t\tport_info->play_cap &= ~CAPTURE_ENABLED;\n" @@ -1183,7 +1182,7 @@ "> +\t\t\"%s: port %d, active streams %lx, %d channels\\n\",\n" "> +\t\t__func__, info->port_id, port_info->play_cap, rt->channels);\n" "> +\n" - "> +\tif (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {\n" + "> +\tif (substream->stream = SNDRV_PCM_STREAM_PLAYBACK) {\n" "> +\t\tself = PLAYBACK_ENABLED;\n" "> +\t\tsiu_stream = &port_info->playback;\n" "> +\t} else {\n" @@ -1602,13 +1601,12 @@ "> +\tif (!siu_stream->rw_flg)\n" "> +\t\treturn;\n" "> +\n" - "> +\tif (substream->runtime->channels == 1 &&\n" - "> +\t substream->stream == SNDRV_PCM_STREAM_CAPTURE)\n" + "> +\tif (substream->runtime->channels = 1 &&\n" + "> +\t substream->stream = SNDRV_PCM_STREAM_CAPTURE)\n" "> +\t\tcopy_capture_period(siu_stream);\n" "> +\n" "> +\t/* Update completed period count */\n" - "> +\tif (++siu_stream->cur_period >=\n" - "> +\t GET_MAX_PERIODS(siu_stream->buf_bytes,\n" + "> +\tif (++siu_stream->cur_period >> +\t GET_MAX_PERIODS(siu_stream->buf_bytes,\n" "> +\t\t\t siu_stream->period_bytes))\n" "> +\t\tsiu_stream->cur_period = 0;\n" "> +\n" @@ -1735,12 +1733,12 @@ "> +\t\treturn;\n" "> +\t}\n" "> +\n" - "> +\tif (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {\n" + "> +\tif (substream->stream = SNDRV_PCM_STREAM_CAPTURE) {\n" "> +\t\tdma_addr_t buff;\n" "> +\t\tsize_t count;\n" "> +\t\tu8 *virt;\n" "> +\n" - "> +\t\tif (rt->channels == 1) {\n" + "> +\t\tif (rt->channels = 1) {\n" "> +\t\t\tbuff = siu_stream->mono_dma;\n" "> +\t\t\tvirt = siu_stream->mono_buf;\n" "> +\t\t\tcount = siu_stream->mono_size;\n" @@ -1758,7 +1756,7 @@ "> +\t\tsiu_pcm_rd_set(port_info, buff, count);\n" "> +\t} else {\n" "> +\t\t/* For mono streams we need to use the mono buffer */\n" - "> +\t\tif (rt->channels == 1) {\n" + "> +\t\tif (rt->channels = 1) {\n" "> +\t\t\tcopy_playback_period(siu_stream);\n" "> +\t\t\tsiu_pcm_wr_set(port_info,\n" "> +\t\t\t\tsiu_stream->mono_dma, siu_stream->mono_size);\n" @@ -1847,7 +1845,7 @@ "> +\tstruct device *dev = ss->pcm->card->dev;\n" "> +\tstruct siu_stream *siu_stream;\n" "> +\n" - "> +\tif (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)\n" + "> +\tif (ss->stream = SNDRV_PCM_STREAM_PLAYBACK)\n" "> +\t\tsiu_stream = &port_info->playback;\n" "> +\telse\n" "> +\t\tsiu_stream = &port_info->capture;\n" @@ -1855,7 +1853,7 @@ "> +\tdev_dbg(dev, \"%s: port=%d, mono %p\\n\", __func__,\n" "> +\t\tinfo->port_id, siu_stream->mono_buf);\n" "> +\n" - "> +\tif (siu_stream->mono_buf && ss->runtime->channels == 1)\n" + "> +\tif (siu_stream->mono_buf && ss->runtime->channels = 1)\n" "> +\t\tsiu_pcm_mono_free(ss->pcm->card->dev, siu_stream);\n" "> +\n" "> +\treturn snd_pcm_lib_free_pages(ss);\n" @@ -1891,7 +1889,7 @@ "> +\n" "> +\tdev_dbg(dev, \"%s, port=%d@%p\\n\", __func__, port, port_info);\n" "> +\n" - "> +\tif (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) {\n" + "> +\tif (ss->stream = SNDRV_PCM_STREAM_PLAYBACK) {\n" "> +\t\tsiu_stream = &port_info->playback;\n" "> +\t\tparam = &siu_stream->param;\n" "> +\t\tparam->slave_id = port ? SHDMA_SLAVE_SIUB_TX :\n" @@ -1925,7 +1923,7 @@ "> +\n" "> +\tdev_dbg(dev, \"%s: port=%d\\n\", __func__, info->port_id);\n" "> +\n" - "> +\tif (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)\n" + "> +\tif (ss->stream = SNDRV_PCM_STREAM_PLAYBACK)\n" "> +\t\tsiu_stream = &port_info->playback;\n" "> +\telse\n" "> +\t\tsiu_stream = &port_info->capture;\n" @@ -1952,8 +1950,7 @@ "\n" "Shouldn't this be done by userspace. i.e. alsa plugin or pulseaudio ?\n" "\n" - "> +\tif (siu_stream->mono_buf && siu_stream->mono_size !=\n" - "> +\t siu_stream->period_bytes * 2) {\n" + "> +\tif (siu_stream->mono_buf && siu_stream->mono_size !> +\t siu_stream->period_bytes * 2) {\n" "> +\t\tdma_free_coherent(dev, siu_stream->mono_size,\n" "> +\t\t\t\t siu_stream->mono_buf, siu_stream->mono_dma);\n" "> +\t\tsiu_stream->mono_buf = NULL;\n" @@ -1985,7 +1982,7 @@ "> +\tstruct siu_stream *siu_stream;\n" "> +\tsnd_pcm_sframes_t xfer_cnt;\n" "> +\n" - "> +\tif (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)\n" + "> +\tif (ss->stream = SNDRV_PCM_STREAM_PLAYBACK)\n" "> +\t\tsiu_stream = &port_info->playback;\n" "> +\telse\n" "> +\t\tsiu_stream = &port_info->capture;\n" @@ -2010,7 +2007,7 @@ "> +\tif (!xfer_cnt || xfer_cnt > 0x1000000)\n" "> +\t\treturn -EINVAL;\n" "> +\n" - "> +\tif (rt->channels == 1) {\n" + "> +\tif (rt->channels = 1) {\n" "> +\t\tint ret = siu_pcm_mono_alloc(ss->pcm->card->dev,\n" "> +\t\t\t\t\t siu_stream);\n" "> +\t\tif (ret < 0)\n" @@ -2041,7 +2038,7 @@ "> +\n" "> +\tswitch (cmd) {\n" "> +\tcase SNDRV_PCM_TRIGGER_START:\n" - "> +\t\tif (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)\n" + "> +\t\tif (ss->stream = SNDRV_PCM_STREAM_PLAYBACK)\n" "> +\t\t\tret = siu_pcm_stmwrite_start(port_info);\n" "> +\t\telse\n" "> +\t\t\tret = siu_pcm_stmread_start(port_info);\n" @@ -2052,7 +2049,7 @@ "> +\n" "> +\t\tbreak;\n" "> +\tcase SNDRV_PCM_TRIGGER_STOP:\n" - "> +\t\tif (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)\n" + "> +\t\tif (ss->stream = SNDRV_PCM_STREAM_PLAYBACK)\n" "> +\t\t\tsiu_pcm_stmwrite_stop(port_info);\n" "> +\t\telse\n" "> +\t\t\tsiu_pcm_stmread_stop(port_info);\n" @@ -2081,7 +2078,7 @@ "> +\tsize_t ptr;\n" "> +\tstruct siu_stream *siu_stream;\n" "> +\n" - "> +\tif (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)\n" + "> +\tif (ss->stream = SNDRV_PCM_STREAM_PLAYBACK)\n" "> +\t\tsiu_stream = &port_info->playback;\n" "> +\telse\n" "> +\t\tsiu_stream = &port_info->capture;\n" @@ -2109,7 +2106,7 @@ "> +static int siu_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,\n" "> +\t\t struct snd_pcm *pcm)\n" "> +{\n" - "> +\t/* card->dev == socdev->dev, see snd_soc_new_pcms() */\n" + "> +\t/* card->dev = socdev->dev, see snd_soc_new_pcms() */\n" "> +\tstruct siu_info *info = siu_i2s_dai.private_data;\n" "> +\tstruct platform_device *pdev = to_platform_device(card->dev);\n" "> +\tint ret;\n" @@ -2193,4 +2190,4 @@ "> +};\n" > +EXPORT_SYMBOL_GPL(siu_platform); -f28486007c94c87285ae68e03d229441a7157fc57f3a55f9385db349bb4e98e3 +5e91ed2d96c4588975c307a309a48fb49d5418bef44a29482d492e7f77cce428
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.