ARM: kirkwood: enable S/PDIF
PATCH 1/1 ARM: kirkwood: enable S/PDIF
This patch enables S/PDIF.
--- sound/soc/kirkwood/kirkwood-i2s.c | 3 +++ 1 file changed, 3 insertions(+)
sound/soc/kirkwood/kirkwood-i2s.c +3 -0
@@ -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 ;
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
Quoted 3 lines · Jean-Francois Moine
This patch enables S/PDIF.
Signed-off-by Jean-Francois Moine <[email protected]>
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.
Mark Brown
maintainerQuoted 8 lines · Russell King - ARM Linux
Quoted 3 lines · Jean-Francois Moine
This patch enables S/PDIF.
Signed-off-by Jean-Francois Moine <[email protected]>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.
Quoted 6 lines · Mark Brown
Quoted 4 lines · Russell King - ARM Linux
Quoted 3 lines · Jean-Francois Moine
This patch enables S/PDIF.
Signed-off-by Jean-Francois Moine <[email protected]>
Quoted 9 lines
Quoted 3 lines
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
Mark Brown
maintainerQuoted 5 lines · Sebastian Hesselbarth
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.
Quoted 3 lines
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.
Quoted 17 lines · Sebastian Hesselbarth
Quoted 6 lines · Mark Brown
Quoted 4 lines · Russell King - ARM Linux
Quoted 3 lines · Jean-Francois Moine
This patch enables S/PDIF.
Signed-off-by Jean-Francois Moine <[email protected]>Quoted 9 lines
Quoted 3 lines
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.
Quoted 7 lines
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.
Quoted 6 lines · Mark Brown
Quoted 4 lines · Russell King - ARM Linux
Quoted 3 lines · Jean-Francois Moine
This patch enables S/PDIF.
Signed-off-by Jean-Francois Moine <[email protected]>
Quoted 8 lines
Quoted 3 lines
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?
Mark Brown
maintainerQuoted 9 lines · Russell King - ARM Linux
Quoted 4 lines · Mark Brown
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.