diff mbox

[v3,1/6] ASoC: fsl_ssi: Real hardware channels max number is 32

Message ID 1453130771-24419-2-git-send-email-arnaud.mouiche@invoxia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arnaud Mouiche Jan. 18, 2016, 3:26 p.m. UTC
The max number of slots in TDM mode is 32:
- Frame Rate Divider Control is a 5bit value
- Time slot mask registers control 32 slots.

Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
---
 sound/soc/fsl/fsl_ssi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Timur Tabi Jan. 18, 2016, 3:46 p.m. UTC | #1
Arnaud Mouiche wrote:
> The max number of slots in TDM mode is 32:
> - Frame Rate Divider Control is a 5bit value
> - Time slot mask registers control 32 slots.
>
> Signed-off-by: Arnaud Mouiche<arnaud.mouiche@invoxia.com>
> ---
>   sound/soc/fsl/fsl_ssi.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index 40dfd8a..cfc78b8 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -1167,14 +1167,14 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = {
>   	.playback = {
>   		.stream_name = "CPU-Playback",
>   		.channels_min = 1,
> -		.channels_max = 2,
> +		.channels_max = 32,

TDM mode is not normally used.  What happens if we're not in TDM mode, 
and the user tries to start a stream with more than 2 channels?
Arnaud Mouiche Jan. 18, 2016, 3:56 p.m. UTC | #2
Le 18/01/2016 16:46, Timur Tabi a écrit :
> Arnaud Mouiche wrote:
>> The max number of slots in TDM mode is 32:
>> - Frame Rate Divider Control is a 5bit value
>> - Time slot mask registers control 32 slots.
>>
>> Signed-off-by: Arnaud Mouiche<arnaud.mouiche@invoxia.com>
>> ---
>>   sound/soc/fsl/fsl_ssi.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
>> index 40dfd8a..cfc78b8 100644
>> --- a/sound/soc/fsl/fsl_ssi.c
>> +++ b/sound/soc/fsl/fsl_ssi.c
>> @@ -1167,14 +1167,14 @@ static struct snd_soc_dai_driver 
>> fsl_ssi_dai_template = {
>>       .playback = {
>>           .stream_name = "CPU-Playback",
>>           .channels_min = 1,
>> -        .channels_max = 2,
>> +        .channels_max = 32,
>
> TDM mode is not normally used.  What happens if we're not in TDM mode, 
> and the user tries to start a stream with more than 2 channels?
For the user point of view, the maximum of available channels (like 
available through aplay command) is the intersection of the CPU and 
Codec DAIs.
So the max will still be the max provided by the whole hardware.

In other words, if the SSI is connected to a simple 2 channels codec, 
"aplay -c 4" will still failed.
But if you build a multi-codec hardware, it will work.

Arnaud
Caleb Crome April 25, 2016, 5:20 p.m. UTC | #3
On Mon, Jan 18, 2016 at 7:26 AM, Arnaud Mouiche <arnaud.mouiche@invoxia.com>
wrote:
>
> The max number of slots in TDM mode is 32:
> - Frame Rate Divider Control is a 5bit value
> - Time slot mask registers control 32 slots.
>
> Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
> ---
>  sound/soc/fsl/fsl_ssi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
> index 40dfd8a..cfc78b8 100644
> --- a/sound/soc/fsl/fsl_ssi.c
> +++ b/sound/soc/fsl/fsl_ssi.c
> @@ -1167,14 +1167,14 @@ static struct snd_soc_dai_driver
fsl_ssi_dai_template = {
>         .playback = {
>                 .stream_name = "CPU-Playback",
>                 .channels_min = 1,
> -               .channels_max = 2,
> +               .channels_max = 32,
>                 .rates = FSLSSI_I2S_RATES,
>                 .formats = FSLSSI_I2S_FORMATS,
>         },
>         .capture = {
>                 .stream_name = "CPU-Capture",
>                 .channels_min = 1,
> -               .channels_max = 2,
> +               .channels_max = 32,
>                 .rates = FSLSSI_I2S_RATES,
>                 .formats = FSLSSI_I2S_FORMATS,
>         },
> --
> 1.9.1
>

I haven't seen any movement on this patch for some time.  I just wanted to
add my Tested&Reviewed.  These patches work for me on the fsl_ssi.


Tested-By: Caleb Crome <caleb@crome.org>
Reviewed-"By: Caleb Crome <caleb@crome.org>
diff mbox

Patch

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 40dfd8a..cfc78b8 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1167,14 +1167,14 @@  static struct snd_soc_dai_driver fsl_ssi_dai_template = {
 	.playback = {
 		.stream_name = "CPU-Playback",
 		.channels_min = 1,
-		.channels_max = 2,
+		.channels_max = 32,
 		.rates = FSLSSI_I2S_RATES,
 		.formats = FSLSSI_I2S_FORMATS,
 	},
 	.capture = {
 		.stream_name = "CPU-Capture",
 		.channels_min = 1,
-		.channels_max = 2,
+		.channels_max = 32,
 		.rates = FSLSSI_I2S_RATES,
 		.formats = FSLSSI_I2S_FORMATS,
 	},