Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741832 > unrolled thread

[PATCH INTERNAL 1/1] ASoC: cygnus: Remove set_fmt from SPDIF dai ops

Started byLori Hikichi <lori.hikichi@broadcom.com>
First post2017-09-29 00:30 +0200
Last post2017-09-29 02:00 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH INTERNAL 1/1] ASoC: cygnus: Remove set_fmt from SPDIF dai ops Lori Hikichi <lori.hikichi@broadcom.com> - 2017-09-29 00:30 +0200
    Re: [PATCH INTERNAL 1/1] ASoC: cygnus: Remove set_fmt from SPDIF dai  ops Lori Hikichi <lori.hikichi@broadcom.com> - 2017-09-29 02:00 +0200

#1741832 — [PATCH INTERNAL 1/1] ASoC: cygnus: Remove set_fmt from SPDIF dai ops

FromLori Hikichi <lori.hikichi@broadcom.com>
Date2017-09-29 00:30 +0200
Subject[PATCH INTERNAL 1/1] ASoC: cygnus: Remove set_fmt from SPDIF dai ops
Message-ID<uuPtE-6ha-19@gated-at.bofh.it>
The SPDIF port cannot modify its format so a set_fmt function is not
needed. Previously, we used a generic set_fmt for all ports and returned
an error code for the SPDIF port. It is cleaner to not populate the
set_fmt field.

Signed-off-by: Lori Hikichi <lori.hikichi@broadcom.com>
---
 sound/soc/bcm/cygnus-ssp.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index 15c438f..b9a3bb8d 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1136,6 +1136,13 @@ static int cygnus_ssp_resume(struct snd_soc_dai *cpu_dai)
 	.set_tdm_slot	= cygnus_set_dai_tdm_slot,
 };
 
+static const struct snd_soc_dai_ops cygnus_spdif_dai_ops = {
+	.startup	= cygnus_ssp_startup,
+	.shutdown	= cygnus_ssp_shutdown,
+	.trigger	= cygnus_ssp_trigger,
+	.hw_params	= cygnus_ssp_hw_params,
+	.set_sysclk	= cygnus_ssp_set_sysclk,
+};
 
 #define INIT_CPU_DAI(num) { \
 	.name = "cygnus-ssp" #num, \
@@ -1174,7 +1181,7 @@ static int cygnus_ssp_resume(struct snd_soc_dai *cpu_dai)
 		.formats = SNDRV_PCM_FMTBIT_S16_LE |
 			SNDRV_PCM_FMTBIT_S32_LE,
 	},
-	.ops = &cygnus_ssp_dai_ops,
+	.ops = &cygnus_spdif_dai_ops,
 	.suspend = cygnus_ssp_suspend,
 	.resume = cygnus_ssp_resume,
 };
-- 
1.9.1

[toc] | [next] | [standalone]


#1741868 — Re: [PATCH INTERNAL 1/1] ASoC: cygnus: Remove set_fmt from SPDIF dai ops

FromLori Hikichi <lori.hikichi@broadcom.com>
Date2017-09-29 02:00 +0200
SubjectRe: [PATCH INTERNAL 1/1] ASoC: cygnus: Remove set_fmt from SPDIF dai ops
Message-ID<uuQSJ-70Y-7@gated-at.bofh.it>
In reply to#1741832

On 9/28/2017 3:29 PM, Lori Hikichi wrote:
> The SPDIF port cannot modify its format so a set_fmt function is not
> needed. Previously, we used a generic set_fmt for all ports and returned
> an error code for the SPDIF port. It is cleaner to not populate the
> set_fmt field.
>
> Signed-off-by: Lori Hikichi <lori.hikichi@broadcom.com>
> ---
>  sound/soc/bcm/cygnus-ssp.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
> index 15c438f..b9a3bb8d 100644
> --- a/sound/soc/bcm/cygnus-ssp.c
> +++ b/sound/soc/bcm/cygnus-ssp.c
> @@ -1136,6 +1136,13 @@ static int cygnus_ssp_resume(struct snd_soc_dai *cpu_dai)
>  	.set_tdm_slot	= cygnus_set_dai_tdm_slot,
>  };
>  
> +static const struct snd_soc_dai_ops cygnus_spdif_dai_ops = {
> +	.startup	= cygnus_ssp_startup,
> +	.shutdown	= cygnus_ssp_shutdown,
> +	.trigger	= cygnus_ssp_trigger,
> +	.hw_params	= cygnus_ssp_hw_params,
> +	.set_sysclk	= cygnus_ssp_set_sysclk,
> +};
>  
>  #define INIT_CPU_DAI(num) { \
>  	.name = "cygnus-ssp" #num, \
> @@ -1174,7 +1181,7 @@ static int cygnus_ssp_resume(struct snd_soc_dai *cpu_dai)
>  		.formats = SNDRV_PCM_FMTBIT_S16_LE |
>  			SNDRV_PCM_FMTBIT_S32_LE,
>  	},
> -	.ops = &cygnus_ssp_dai_ops,
> +	.ops = &cygnus_spdif_dai_ops,
>  	.suspend = cygnus_ssp_suspend,
>  	.resume = cygnus_ssp_resume,
>  };
Please ignore this patch. It was accidentally included in the patch set and is a
duplicate of another patch already in the patch set.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web