From: Robert Jarzmik <robert.jarzmik@free.fr> To: Arnd Bergmann <arnd@arndb.de> Cc: Daniel Mack <daniel@zonque.org>, Haojian Zhuang <haojian.zhuang@gmail.com>, Vinod Koul <vinod.koul@intel.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Linux ARM <linux-arm-kernel@lists.infradead.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, alsa-devel@alsa-project.org Subject: Re: [PATCH 14/15] ARM: pxa: change SSP devices allocation Date: Tue, 03 Apr 2018 17:32:58 +0200 [thread overview] Message-ID: <87lge4485x.fsf@belgarion.home> (raw) In-Reply-To: <CAK8P3a2hYWO2eweg3zpR7iJoqtH4uxJLAxJAno7L96G7nA2HxQ@mail.gmail.com> (Arnd Bergmann's message of "Tue, 3 Apr 2018 09:06:46 +0200") Arnd Bergmann <arnd@arndb.de> writes: chop chop ... removed several mail recipients to leave only the ASoC / PXA subset ... > On Mon, Apr 2, 2018 at 4:26 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote: > >> >> +static struct pxa_ssp_info pxa_ssp_infos[] = { >> + { .dma_chan_rx_name = "ssp1_rx", .dma_chan_tx_name = "ssp1_tx", }, >> + { .dma_chan_rx_name = "ssp1_rx", .dma_chan_tx_name = "ssp1_tx", }, >> + { .dma_chan_rx_name = "ssp2_rx", .dma_chan_tx_name = "ssp2_tx", }, >> + { .dma_chan_rx_name = "ssp2_rx", .dma_chan_tx_name = "ssp2_tx", }, >> + { .dma_chan_rx_name = "ssp3_rx", .dma_chan_tx_name = "ssp3_tx", }, >> + { .dma_chan_rx_name = "ssp3_rx", .dma_chan_tx_name = "ssp3_tx", }, >> + { .dma_chan_rx_name = "ssp4_rx", .dma_chan_tx_name = "ssp4_tx", }, >> + { .dma_chan_rx_name = "ssp4_rx", .dma_chan_tx_name = "ssp4_tx", }, >> +}; > > This part looks odd to me, you're adding an extra level of indirection to > do two stages of lookups in some form of platform data. That's unfortunately right. > Why can't you just always use "rx" and "tx" as the names here? Well I couldn't. I'll explain you why, and maybe you'll find a better solution. That all is related to how ASoC and SSP interact. If I remember correctly, here is how it works : - the DMA channel is requested in sound/arm/pxa2xx-pcm-lib.c:128 return snd_dmaengine_pcm_open( substream, dma_request_slave_channel(rtd->platform->dev, The trick is that the device here is _not_ the SSP one, it's if memory serves me well the pxa-pcm-audio one. As a consequence, the device cannot be used to differenciate which SSP exactly is providing the sound samples stream. This information is nevertheless required to choose the correct requestor line, which is a 1-to-1 match to the SSP port. The indirection in the channel name is used to choose the correct requestor line for a given SSP port providing the samples. It also must be underlined that this dma request serves both AC97 and SSP as sample providers. > (also, I don't see why each line is duplicated, but I'm sure there's > an easy answer for that). Ahh that is an unfortunate rebase most probably :) Cheers. -- Robert
WARNING: multiple messages have this Message-ID (diff)
From: robert.jarzmik@free.fr (Robert Jarzmik) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 14/15] ARM: pxa: change SSP devices allocation Date: Tue, 03 Apr 2018 17:32:58 +0200 [thread overview] Message-ID: <87lge4485x.fsf@belgarion.home> (raw) In-Reply-To: <CAK8P3a2hYWO2eweg3zpR7iJoqtH4uxJLAxJAno7L96G7nA2HxQ@mail.gmail.com> (Arnd Bergmann's message of "Tue, 3 Apr 2018 09:06:46 +0200") Arnd Bergmann <arnd@arndb.de> writes: chop chop ... removed several mail recipients to leave only the ASoC / PXA subset ... > On Mon, Apr 2, 2018 at 4:26 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote: > >> >> +static struct pxa_ssp_info pxa_ssp_infos[] = { >> + { .dma_chan_rx_name = "ssp1_rx", .dma_chan_tx_name = "ssp1_tx", }, >> + { .dma_chan_rx_name = "ssp1_rx", .dma_chan_tx_name = "ssp1_tx", }, >> + { .dma_chan_rx_name = "ssp2_rx", .dma_chan_tx_name = "ssp2_tx", }, >> + { .dma_chan_rx_name = "ssp2_rx", .dma_chan_tx_name = "ssp2_tx", }, >> + { .dma_chan_rx_name = "ssp3_rx", .dma_chan_tx_name = "ssp3_tx", }, >> + { .dma_chan_rx_name = "ssp3_rx", .dma_chan_tx_name = "ssp3_tx", }, >> + { .dma_chan_rx_name = "ssp4_rx", .dma_chan_tx_name = "ssp4_tx", }, >> + { .dma_chan_rx_name = "ssp4_rx", .dma_chan_tx_name = "ssp4_tx", }, >> +}; > > This part looks odd to me, you're adding an extra level of indirection to > do two stages of lookups in some form of platform data. That's unfortunately right. > Why can't you just always use "rx" and "tx" as the names here? Well I couldn't. I'll explain you why, and maybe you'll find a better solution. That all is related to how ASoC and SSP interact. If I remember correctly, here is how it works : - the DMA channel is requested in sound/arm/pxa2xx-pcm-lib.c:128 return snd_dmaengine_pcm_open( substream, dma_request_slave_channel(rtd->platform->dev, The trick is that the device here is _not_ the SSP one, it's if memory serves me well the pxa-pcm-audio one. As a consequence, the device cannot be used to differenciate which SSP exactly is providing the sound samples stream. This information is nevertheless required to choose the correct requestor line, which is a 1-to-1 match to the SSP port. The indirection in the channel name is used to choose the correct requestor line for a given SSP port providing the samples. It also must be underlined that this dma request serves both AC97 and SSP as sample providers. > (also, I don't see why each line is duplicated, but I'm sure there's > an easy answer for that). Ahh that is an unfortunate rebase most probably :) Cheers. -- Robert
next prev parent reply other threads:[~2018-04-03 15:33 UTC|newest] Thread overview: 218+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-02 14:26 [PATCH 00/15] ARM: pxa: switch to DMA slave maps Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` [01/15] dmaengine: pxa: use a dma slave map Robert Jarzmik 2018-04-02 14:26 ` [PATCH 01/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-21 19:23 ` Robert Jarzmik 2018-04-02 14:26 ` [04/15] media: pxa_camera: remove the dmaengine compat need Robert Jarzmik 2018-04-02 14:26 ` [PATCH 04/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-21 19:27 ` Robert Jarzmik 2018-04-21 19:27 ` Robert Jarzmik 2018-04-22 11:06 ` Hans Verkuil 2018-04-22 11:06 ` Hans Verkuil 2018-04-02 14:26 ` [05/15] mtd: nand: pxa3xx: " Robert Jarzmik 2018-04-02 14:26 ` [PATCH 05/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-03 7:33 ` Miquel Raynal 2018-04-03 15:19 ` Robert Jarzmik 2018-04-02 14:26 ` [09/15] net: irda: pxaficp_ir: " Robert Jarzmik 2018-04-02 14:26 ` [PATCH 09/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-21 19:30 ` Robert Jarzmik 2018-04-21 19:30 ` Robert Jarzmik 2018-04-02 14:26 ` [10/15] ata: pata_pxa: " Robert Jarzmik 2018-04-02 14:26 ` [PATCH 10/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-21 19:32 ` Robert Jarzmik 2018-04-21 19:32 ` Robert Jarzmik 2018-04-24 11:04 ` Bartlomiej Zolnierkiewicz 2018-04-24 11:04 ` Bartlomiej Zolnierkiewicz 2018-04-02 14:26 ` [14/15] ARM: pxa: change SSP devices allocation Robert Jarzmik 2018-04-02 14:26 ` [PATCH 14/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-03 7:06 ` [14/15] " Arnd Bergmann 2018-04-03 7:06 ` [PATCH 14/15] " Arnd Bergmann 2018-04-03 7:06 ` Arnd Bergmann 2018-04-03 7:06 ` Arnd Bergmann 2018-04-03 7:06 ` Arnd Bergmann 2018-04-03 7:06 ` Arnd Bergmann 2018-04-03 15:32 ` Robert Jarzmik [this message] 2018-04-03 15:32 ` Robert Jarzmik 2018-04-03 15:53 ` Arnd Bergmann 2018-04-03 15:53 ` Arnd Bergmann 2018-04-05 6:51 ` Robert Jarzmik 2018-04-05 6:51 ` Robert Jarzmik 2018-04-05 7:29 ` Arnd Bergmann 2018-04-05 7:29 ` Arnd Bergmann 2018-04-08 12:16 ` Robert Jarzmik 2018-04-08 12:16 ` Robert Jarzmik 2018-04-08 12:16 ` Robert Jarzmik 2018-04-03 7:15 ` [PATCH 00/15] ARM: pxa: switch to DMA slave maps Arnd Bergmann 2018-04-03 7:15 ` Arnd Bergmann 2018-04-03 7:15 ` Arnd Bergmann 2018-04-03 7:15 ` Arnd Bergmann 2018-04-03 7:15 ` Arnd Bergmann 2018-04-03 15:08 ` Ulf Hansson 2018-04-03 15:08 ` Ulf Hansson 2018-04-03 15:08 ` Ulf Hansson 2018-04-03 15:08 ` Ulf Hansson 2018-04-04 19:49 ` Robert Jarzmik 2018-04-04 19:49 ` Robert Jarzmik 2018-04-04 19:49 ` Robert Jarzmik 2018-04-04 19:49 ` Robert Jarzmik 2018-04-04 19:56 ` Boris Brezillon 2018-04-04 19:56 ` Boris Brezillon 2018-04-04 19:56 ` Boris Brezillon 2018-04-04 19:56 ` Boris Brezillon 2018-04-04 19:56 ` Boris Brezillon 2018-04-05 6:29 ` Ulf Hansson 2018-04-05 6:29 ` Ulf Hansson 2018-04-05 6:29 ` Ulf Hansson 2018-04-05 6:29 ` Ulf Hansson 2018-04-05 6:50 ` Arnd Bergmann 2018-04-05 6:50 ` Arnd Bergmann 2018-04-05 6:50 ` Arnd Bergmann 2018-04-05 6:50 ` Arnd Bergmann 2018-04-02 14:26 [02/15] ARM: pxa: add dma slave map Robert Jarzmik 2018-04-02 14:26 ` [PATCH 02/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [03/15] mmc: pxamci: remove the dmaengine compat need Robert Jarzmik 2018-04-02 14:26 ` [PATCH 03/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [06/15] net: smc911x: " Robert Jarzmik 2018-04-02 14:26 ` [PATCH 06/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [07/15] net: smc91x: " Robert Jarzmik 2018-04-02 14:26 ` [PATCH 07/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [08/15] ASoC: pxa: " Robert Jarzmik 2018-04-02 14:26 ` [PATCH 08/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [11/15] dmaengine: pxa: document pxad_param Robert Jarzmik 2018-04-02 14:26 ` [PATCH 11/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [12/15] dmaengine: pxa: make the filter function internal Robert Jarzmik 2018-04-02 14:26 ` [PATCH 12/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [13/15] ARM: pxa: remove the DMA IO resources Robert Jarzmik 2018-04-02 14:26 ` [PATCH 13/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 [15/15] ARM: pxa: change SSP DMA channels allocation Robert Jarzmik 2018-04-02 14:26 ` [PATCH 15/15] " Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 14:26 ` Robert Jarzmik 2018-04-02 16:25 [12/15] dmaengine: pxa: make the filter function internal kbuild test robot 2018-04-02 16:25 ` [PATCH 12/15] " kbuild test robot 2018-04-02 16:25 ` kbuild test robot 2018-04-02 16:25 ` kbuild test robot 2018-04-02 16:25 ` kbuild test robot 2018-04-02 16:35 [12/15] " kbuild test robot 2018-04-02 16:35 ` [PATCH 12/15] " kbuild test robot 2018-04-02 16:35 ` kbuild test robot 2018-04-02 16:35 ` kbuild test robot 2018-04-02 16:35 ` kbuild test robot 2018-04-02 16:35 ` kbuild test robot 2018-04-02 18:46 [15/15] ARM: pxa: change SSP DMA channels allocation kbuild test robot 2018-04-02 18:46 ` [PATCH 15/15] " kbuild test robot 2018-04-02 18:46 ` kbuild test robot 2018-04-02 18:46 ` kbuild test robot 2018-04-02 18:46 ` kbuild test robot 2018-04-03 6:51 [02/15] ARM: pxa: add dma slave map Arnd Bergmann 2018-04-03 6:51 ` [PATCH 02/15] " Arnd Bergmann 2018-04-03 6:51 ` Arnd Bergmann 2018-04-03 6:51 ` Arnd Bergmann 2018-04-03 6:51 ` Arnd Bergmann 2018-04-03 6:51 ` Arnd Bergmann 2018-04-03 7:13 [12/15] dmaengine: pxa: make the filter function internal Arnd Bergmann 2018-04-03 7:13 ` [PATCH 12/15] " Arnd Bergmann 2018-04-03 7:13 ` Arnd Bergmann 2018-04-03 7:13 ` Arnd Bergmann 2018-04-03 7:13 ` Arnd Bergmann 2018-04-03 7:13 ` Arnd Bergmann 2018-04-03 15:18 [02/15] ARM: pxa: add dma slave map Robert Jarzmik 2018-04-03 15:18 ` [PATCH 02/15] " Robert Jarzmik 2018-04-03 15:18 ` Robert Jarzmik 2018-04-03 15:18 ` Robert Jarzmik 2018-04-03 15:18 ` Robert Jarzmik 2018-04-03 15:39 [02/15] " Arnd Bergmann 2018-04-03 15:39 ` [PATCH 02/15] " Arnd Bergmann 2018-04-03 15:39 ` Arnd Bergmann 2018-04-03 15:39 ` Arnd Bergmann 2018-04-03 15:39 ` Arnd Bergmann 2018-04-03 15:39 ` Arnd Bergmann 2018-04-03 20:19 [02/15] " Robert Jarzmik 2018-04-03 20:19 ` [PATCH 02/15] " Robert Jarzmik 2018-04-03 20:19 ` Robert Jarzmik 2018-04-04 10:18 [02/15] " Arnd Bergmann 2018-04-04 10:18 ` [PATCH 02/15] " Arnd Bergmann 2018-04-04 10:18 ` Arnd Bergmann 2018-04-04 19:21 [02/15] " Robert Jarzmik 2018-04-04 19:21 ` [PATCH 02/15] " Robert Jarzmik 2018-04-04 19:21 ` Robert Jarzmik 2018-04-12 15:26 [08/15] ASoC: pxa: remove the dmaengine compat need Mark Brown 2018-04-12 15:26 ` [PATCH 08/15] " Mark Brown 2018-04-12 15:26 ` Mark Brown 2018-04-12 15:26 ` Mark Brown 2018-04-12 15:26 ` Mark Brown 2018-04-12 15:26 ` Mark Brown 2018-04-12 16:55 [08/15] " Robert Jarzmik 2018-04-12 16:55 ` [PATCH 08/15] " Robert Jarzmik 2018-04-12 16:55 ` Robert Jarzmik 2018-04-12 16:55 ` Robert Jarzmik 2018-04-12 16:55 ` Robert Jarzmik 2018-04-12 16:55 ` Robert Jarzmik 2018-04-22 6:13 [01/15] dmaengine: pxa: use a dma slave map Vinod Koul 2018-04-22 6:13 ` [PATCH 01/15] " Vinod Koul 2018-04-22 6:13 ` Vinod Koul 2018-04-22 11:06 [04/15] media: pxa_camera: remove the dmaengine compat need Hans Verkuil 2018-04-22 11:06 ` [PATCH 04/15] " Hans Verkuil 2018-04-22 11:06 ` Hans Verkuil 2018-04-22 11:06 ` Hans Verkuil 2018-04-23 8:37 [09/15] net: irda: pxaficp_ir: " Greg Kroah-Hartman 2018-04-23 8:37 ` [PATCH 09/15] " Greg Kroah-Hartman 2018-04-23 8:37 ` Greg Kroah-Hartman 2018-04-23 8:37 ` Greg Kroah-Hartman 2018-04-23 8:37 ` Greg Kroah-Hartman 2018-05-04 19:29 [04/15] media: pxa_camera: " Mauro Carvalho Chehab 2018-05-04 19:29 ` [PATCH 04/15] " Mauro Carvalho Chehab 2018-05-04 19:29 ` Mauro Carvalho Chehab 2018-05-04 19:29 ` Mauro Carvalho Chehab 2018-05-04 19:29 ` Mauro Carvalho Chehab 2018-05-18 21:31 [05/15] mtd: nand: pxa3xx: " Daniel Mack 2018-05-18 21:31 ` [PATCH 05/15] " Daniel Mack 2018-05-18 21:31 ` Daniel Mack 2018-05-18 21:31 ` Daniel Mack 2018-05-23 21:54 [05/15] " Daniel Mack 2018-05-23 21:54 ` [PATCH 05/15] " Daniel Mack 2018-05-23 21:54 ` Daniel Mack 2018-05-23 21:54 ` Daniel Mack
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=87lge4485x.fsf@belgarion.home \ --to=robert.jarzmik@free.fr \ --cc=alsa-devel@alsa-project.org \ --cc=arnd@arndb.de \ --cc=broonie@kernel.org \ --cc=daniel@zonque.org \ --cc=haojian.zhuang@gmail.com \ --cc=lgirdwood@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ --cc=vinod.koul@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.