* [PATCH] ARM: kirkwood: enable S/PDIF @ 2013-07-23 8:23 Jean-Francois Moine 2013-07-23 8:43 ` Russell King - ARM Linux 0 siblings, 1 reply; 13+ messages in thread From: Jean-Francois Moine @ 2013-07-23 8:23 UTC (permalink / raw) To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, Rob Herring, Russell King, alsa-devel, linux-kernel, devicetree-discuss This patch enables S/PDIF. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> --- sound/soc/kirkwood/kirkwood-i2s.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 4c9dad3..ad94c50 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -159,6 +159,7 @@ static int kirkwood_i2s_hw_params(struct snd_pcm_substream *substream, case SNDRV_PCM_FORMAT_S16_LE: i2s_value |= KIRKWOOD_I2S_CTL_SIZE_16; ctl_play = KIRKWOOD_PLAYCTL_SIZE_16_C | + KIRKWOOD_PLAYCTL_SPDIF_EN | KIRKWOOD_PLAYCTL_I2S_EN; ctl_rec = KIRKWOOD_RECCTL_SIZE_16_C | KIRKWOOD_RECCTL_I2S_EN; @@ -169,6 +170,7 @@ static int kirkwood_i2s_hw_params(struct snd_pcm_substream *substream, case SNDRV_PCM_FORMAT_S20_3LE: i2s_value |= KIRKWOOD_I2S_CTL_SIZE_20; ctl_play = KIRKWOOD_PLAYCTL_SIZE_20 | + KIRKWOOD_PLAYCTL_SPDIF_EN | KIRKWOOD_PLAYCTL_I2S_EN; ctl_rec = KIRKWOOD_RECCTL_SIZE_20 | KIRKWOOD_RECCTL_I2S_EN; @@ -177,6 +179,7 @@ static int kirkwood_i2s_hw_params(struct snd_pcm_substream *substream, case SNDRV_PCM_FORMAT_S24_LE: i2s_value |= KIRKWOOD_I2S_CTL_SIZE_24; ctl_play = KIRKWOOD_PLAYCTL_SIZE_24 | + KIRKWOOD_PLAYCTL_SPDIF_EN | KIRKWOOD_PLAYCTL_I2S_EN; ctl_rec = KIRKWOOD_RECCTL_SIZE_24 | KIRKWOOD_RECCTL_I2S_EN; -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF 2013-07-23 8:23 [PATCH] ARM: kirkwood: enable S/PDIF Jean-Francois Moine @ 2013-07-23 8:43 ` Russell King - ARM Linux 0 siblings, 0 replies; 13+ messages in thread From: Russell King - ARM Linux @ 2013-07-23 8:43 UTC (permalink / raw) To: Jean-Francois Moine Cc: alsa-devel, Takashi Iwai, linux-kernel, devicetree-discuss, Liam Girdwood, Rob Herring, Mark Brown On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: > This patch enables S/PDIF. > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> I'm not submitting my patch to do this because: (a) we don't know what effect this has on other hardware. (b) Mark suggested that we use the slave PCM stuff to deal with this. As yet, that's something which I haven't been able to get to grips with because ASoC is soo damned complicated and undocumented. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF @ 2013-07-23 8:43 ` Russell King - ARM Linux 0 siblings, 0 replies; 13+ messages in thread From: Russell King - ARM Linux @ 2013-07-23 8:43 UTC (permalink / raw) To: Jean-Francois Moine Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, Rob Herring, alsa-devel, linux-kernel, devicetree-discuss On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: > This patch enables S/PDIF. > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> I'm not submitting my patch to do this because: (a) we don't know what effect this has on other hardware. (b) Mark suggested that we use the slave PCM stuff to deal with this. As yet, that's something which I haven't been able to get to grips with because ASoC is soo damned complicated and undocumented. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF 2013-07-23 8:43 ` Russell King - ARM Linux @ 2013-07-23 13:06 ` Mark Brown -1 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2013-07-23 13:06 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Jean-Francois Moine, alsa-devel, Takashi Iwai, linux-kernel, devicetree-discuss, Liam Girdwood, Rob Herring [-- Attachment #1.1: Type: text/plain, Size: 569 bytes --] On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: > On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: > > This patch enables S/PDIF. > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > I'm not submitting my patch to do this because: > (a) we don't know what effect this has on other hardware. This patch will do absolutely nothing unless it's used in a machine driver which connects a S/PDIF CODEC to it. I see no reason not to apply it, someone with hardware with more complex needs can always build on it later. [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF @ 2013-07-23 13:06 ` Mark Brown 0 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2013-07-23 13:06 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Jean-Francois Moine, Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Rob Herring, alsa-devel, linux-kernel, devicetree-discuss [-- Attachment #1: Type: text/plain, Size: 569 bytes --] On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: > On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: > > This patch enables S/PDIF. > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > I'm not submitting my patch to do this because: > (a) we don't know what effect this has on other hardware. This patch will do absolutely nothing unless it's used in a machine driver which connects a S/PDIF CODEC to it. I see no reason not to apply it, someone with hardware with more complex needs can always build on it later. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF 2013-07-23 13:06 ` Mark Brown @ 2013-07-23 13:12 ` Sebastian Hesselbarth -1 siblings, 0 replies; 13+ messages in thread From: Sebastian Hesselbarth @ 2013-07-23 13:12 UTC (permalink / raw) To: Mark Brown Cc: Jean-Francois Moine, alsa-devel, Russell King - ARM Linux, Takashi Iwai, devicetree-discuss, linux-kernel, Rob Herring, Liam Girdwood On 07/23/13 15:06, Mark Brown wrote: > On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: >> On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: >>> This patch enables S/PDIF. > >>> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > >> I'm not submitting my patch to do this because: > >> (a) we don't know what effect this has on other hardware. > > This patch will do absolutely nothing unless it's used in a machine > driver which connects a S/PDIF CODEC to it. I see no reason not to > apply it, someone with hardware with more complex needs can always build > on it later. > Mark, the mask that is changed in the patch is what will be written into i2s controller's registers. So, if there is no S/PDIF in that specific controller that bit can possibly have a different meaning. Also, enabling both I2S playback and SPDIF playback can cause the controller to behave differently. I share Russell's concern about it and would rather like to use multiple codecs per DAI (DPCM) for that. I see Daniel Mack picked that up again, maybe he submits something soon. Sebastian ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [alsa-devel] [PATCH] ARM: kirkwood: enable S/PDIF @ 2013-07-23 13:12 ` Sebastian Hesselbarth 0 siblings, 0 replies; 13+ messages in thread From: Sebastian Hesselbarth @ 2013-07-23 13:12 UTC (permalink / raw) To: Mark Brown Cc: Russell King - ARM Linux, Jean-Francois Moine, alsa-devel, Takashi Iwai, linux-kernel, devicetree-discuss, Liam Girdwood, Rob Herring On 07/23/13 15:06, Mark Brown wrote: > On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: >> On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: >>> This patch enables S/PDIF. > >>> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > >> I'm not submitting my patch to do this because: > >> (a) we don't know what effect this has on other hardware. > > This patch will do absolutely nothing unless it's used in a machine > driver which connects a S/PDIF CODEC to it. I see no reason not to > apply it, someone with hardware with more complex needs can always build > on it later. > Mark, the mask that is changed in the patch is what will be written into i2s controller's registers. So, if there is no S/PDIF in that specific controller that bit can possibly have a different meaning. Also, enabling both I2S playback and SPDIF playback can cause the controller to behave differently. I share Russell's concern about it and would rather like to use multiple codecs per DAI (DPCM) for that. I see Daniel Mack picked that up again, maybe he submits something soon. Sebastian ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [alsa-devel] [PATCH] ARM: kirkwood: enable S/PDIF 2013-07-23 13:12 ` [alsa-devel] " Sebastian Hesselbarth (?) @ 2013-07-23 13:26 ` Mark Brown -1 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2013-07-23 13:26 UTC (permalink / raw) To: Sebastian Hesselbarth Cc: Russell King - ARM Linux, Jean-Francois Moine, alsa-devel, Takashi Iwai, linux-kernel, devicetree-discuss, Liam Girdwood, Rob Herring [-- Attachment #1: Type: text/plain, Size: 873 bytes --] On Tue, Jul 23, 2013 at 03:12:56PM +0200, Sebastian Hesselbarth wrote: > the mask that is changed in the patch is what will be written > into i2s controller's registers. So, if there is no S/PDIF in that > specific controller that bit can possibly have a different meaning. > Also, enabling both I2S playback and SPDIF playback can cause the > controller to behave differently. Oh, so it will - I glanced through it and misread, sorry. If it just makes the enabling of S/PDIF mode conditional on DAI format that'd cover it. > I share Russell's concern about it and would rather like to use > multiple codecs per DAI (DPCM) for that. I see Daniel Mack picked > that up again, maybe he submits something soon. Well, that'd be ideal and is going to be needed for any hardware which has both wired up in parallel but a simpler either/or thing doesn't seem like a problem. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF 2013-07-23 13:12 ` [alsa-devel] " Sebastian Hesselbarth @ 2013-07-23 13:36 ` Russell King - ARM Linux -1 siblings, 0 replies; 13+ messages in thread From: Russell King - ARM Linux @ 2013-07-23 13:36 UTC (permalink / raw) To: Sebastian Hesselbarth Cc: Jean-Francois Moine, alsa-devel, Takashi Iwai, devicetree-discuss, linux-kernel, Rob Herring, Liam Girdwood, Mark Brown On Tue, Jul 23, 2013 at 03:12:56PM +0200, Sebastian Hesselbarth wrote: > On 07/23/13 15:06, Mark Brown wrote: >> On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: >>> On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: >>>> This patch enables S/PDIF. >> >>>> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> >> >>> I'm not submitting my patch to do this because: >> >>> (a) we don't know what effect this has on other hardware. >> >> This patch will do absolutely nothing unless it's used in a machine >> driver which connects a S/PDIF CODEC to it. I see no reason not to >> apply it, someone with hardware with more complex needs can always build >> on it later. >> > > Mark, > > the mask that is changed in the patch is what will be written > into i2s controller's registers. So, if there is no S/PDIF in that > specific controller that bit can possibly have a different meaning. > Also, enabling both I2S playback and SPDIF playback can cause the > controller to behave differently. Right, so the SPDIF output on Dove isn't multiplexed, so I was wrong on that _for_ _dove_, but that may not necessarily be the case for the Kirkwood SoCs - the pin may be multiplexed there. However, Dove does have two I2S/SPDIF controllers which are otherwise identical, apart from one having SPDIF support and the other not. Setting the SPDIF enable bit on the one without is unspecified what the behaviour would be, so it should not be set. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [alsa-devel] [PATCH] ARM: kirkwood: enable S/PDIF @ 2013-07-23 13:36 ` Russell King - ARM Linux 0 siblings, 0 replies; 13+ messages in thread From: Russell King - ARM Linux @ 2013-07-23 13:36 UTC (permalink / raw) To: Sebastian Hesselbarth Cc: Mark Brown, Jean-Francois Moine, alsa-devel, Takashi Iwai, linux-kernel, devicetree-discuss, Liam Girdwood, Rob Herring On Tue, Jul 23, 2013 at 03:12:56PM +0200, Sebastian Hesselbarth wrote: > On 07/23/13 15:06, Mark Brown wrote: >> On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: >>> On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: >>>> This patch enables S/PDIF. >> >>>> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> >> >>> I'm not submitting my patch to do this because: >> >>> (a) we don't know what effect this has on other hardware. >> >> This patch will do absolutely nothing unless it's used in a machine >> driver which connects a S/PDIF CODEC to it. I see no reason not to >> apply it, someone with hardware with more complex needs can always build >> on it later. >> > > Mark, > > the mask that is changed in the patch is what will be written > into i2s controller's registers. So, if there is no S/PDIF in that > specific controller that bit can possibly have a different meaning. > Also, enabling both I2S playback and SPDIF playback can cause the > controller to behave differently. Right, so the SPDIF output on Dove isn't multiplexed, so I was wrong on that _for_ _dove_, but that may not necessarily be the case for the Kirkwood SoCs - the pin may be multiplexed there. However, Dove does have two I2S/SPDIF controllers which are otherwise identical, apart from one having SPDIF support and the other not. Setting the SPDIF enable bit on the one without is unspecified what the behaviour would be, so it should not be set. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF 2013-07-23 13:06 ` Mark Brown @ 2013-07-23 13:21 ` Russell King - ARM Linux -1 siblings, 0 replies; 13+ messages in thread From: Russell King - ARM Linux @ 2013-07-23 13:21 UTC (permalink / raw) To: Mark Brown Cc: Jean-Francois Moine, alsa-devel, Takashi Iwai, linux-kernel, devicetree-discuss, Liam Girdwood, Rob Herring On Tue, Jul 23, 2013 at 02:06:22PM +0100, Mark Brown wrote: > On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: > > On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: > > > This patch enables S/PDIF. > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > I'm not submitting my patch to do this because: > > > (a) we don't know what effect this has on other hardware. > > This patch will do absolutely nothing unless it's used in a machine > driver which connects a S/PDIF CODEC to it. I see no reason not to > apply it, someone with hardware with more complex needs can always build > on it later. So... what if setting this bit causes the SoC to start wiggling a pin with the SPDIF signal which has been used for a different purpose? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF @ 2013-07-23 13:21 ` Russell King - ARM Linux 0 siblings, 0 replies; 13+ messages in thread From: Russell King - ARM Linux @ 2013-07-23 13:21 UTC (permalink / raw) To: Mark Brown Cc: Jean-Francois Moine, Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Rob Herring, alsa-devel, linux-kernel, devicetree-discuss On Tue, Jul 23, 2013 at 02:06:22PM +0100, Mark Brown wrote: > On Tue, Jul 23, 2013 at 09:43:47AM +0100, Russell King - ARM Linux wrote: > > On Tue, Jul 23, 2013 at 10:23:20AM +0200, Jean-Francois Moine wrote: > > > This patch enables S/PDIF. > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > I'm not submitting my patch to do this because: > > > (a) we don't know what effect this has on other hardware. > > This patch will do absolutely nothing unless it's used in a machine > driver which connects a S/PDIF CODEC to it. I see no reason not to > apply it, someone with hardware with more complex needs can always build > on it later. So... what if setting this bit causes the SoC to start wiggling a pin with the SPDIF signal which has been used for a different purpose? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ARM: kirkwood: enable S/PDIF 2013-07-23 13:21 ` Russell King - ARM Linux (?) @ 2013-07-23 13:31 ` Mark Brown -1 siblings, 0 replies; 13+ messages in thread From: Mark Brown @ 2013-07-23 13:31 UTC (permalink / raw) To: Russell King - ARM Linux Cc: Jean-Francois Moine, Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Rob Herring, alsa-devel, linux-kernel, devicetree-discuss [-- Attachment #1: Type: text/plain, Size: 627 bytes --] On Tue, Jul 23, 2013 at 02:21:04PM +0100, Russell King - ARM Linux wrote: > On Tue, Jul 23, 2013 at 02:06:22PM +0100, Mark Brown wrote: > > This patch will do absolutely nothing unless it's used in a machine > > driver which connects a S/PDIF CODEC to it. I see no reason not to > > apply it, someone with hardware with more complex needs can always build > > on it later. > So... what if setting this bit causes the SoC to start wiggling a pin > with the SPDIF signal which has been used for a different purpose? Right, yup - didn't read it fully. Like I say doing it conditional on the DAI format should be fine though. [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-07-23 13:37 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-07-23 8:23 [PATCH] ARM: kirkwood: enable S/PDIF Jean-Francois Moine 2013-07-23 8:43 ` Russell King - ARM Linux 2013-07-23 8:43 ` Russell King - ARM Linux 2013-07-23 13:06 ` Mark Brown 2013-07-23 13:06 ` Mark Brown 2013-07-23 13:12 ` Sebastian Hesselbarth 2013-07-23 13:12 ` [alsa-devel] " Sebastian Hesselbarth 2013-07-23 13:26 ` Mark Brown 2013-07-23 13:36 ` Russell King - ARM Linux 2013-07-23 13:36 ` [alsa-devel] " Russell King - ARM Linux 2013-07-23 13:21 ` Russell King - ARM Linux 2013-07-23 13:21 ` Russell King - ARM Linux 2013-07-23 13:31 ` Mark Brown
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.