Commit 04162779 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/eukrea-tlv320', 'asoc/topic/fsl',...

Merge remote-tracking branches 'asoc/topic/eukrea-tlv320', 'asoc/topic/fsl', 'asoc/topic/fsl-ssi' and 'asoc/topic/fsl_asrc' into asoc-next
...@@ -169,6 +169,10 @@ struct snd_pcm_ops { ...@@ -169,6 +169,10 @@ struct snd_pcm_ops {
#define SNDRV_PCM_FMTBIT_IMA_ADPCM _SNDRV_PCM_FMTBIT(IMA_ADPCM) #define SNDRV_PCM_FMTBIT_IMA_ADPCM _SNDRV_PCM_FMTBIT(IMA_ADPCM)
#define SNDRV_PCM_FMTBIT_MPEG _SNDRV_PCM_FMTBIT(MPEG) #define SNDRV_PCM_FMTBIT_MPEG _SNDRV_PCM_FMTBIT(MPEG)
#define SNDRV_PCM_FMTBIT_GSM _SNDRV_PCM_FMTBIT(GSM) #define SNDRV_PCM_FMTBIT_GSM _SNDRV_PCM_FMTBIT(GSM)
#define SNDRV_PCM_FMTBIT_S20_LE _SNDRV_PCM_FMTBIT(S20_LE)
#define SNDRV_PCM_FMTBIT_U20_LE _SNDRV_PCM_FMTBIT(U20_LE)
#define SNDRV_PCM_FMTBIT_S20_BE _SNDRV_PCM_FMTBIT(S20_BE)
#define SNDRV_PCM_FMTBIT_U20_BE _SNDRV_PCM_FMTBIT(U20_BE)
#define SNDRV_PCM_FMTBIT_SPECIAL _SNDRV_PCM_FMTBIT(SPECIAL) #define SNDRV_PCM_FMTBIT_SPECIAL _SNDRV_PCM_FMTBIT(SPECIAL)
#define SNDRV_PCM_FMTBIT_S24_3LE _SNDRV_PCM_FMTBIT(S24_3LE) #define SNDRV_PCM_FMTBIT_S24_3LE _SNDRV_PCM_FMTBIT(S24_3LE)
#define SNDRV_PCM_FMTBIT_U24_3LE _SNDRV_PCM_FMTBIT(U24_3LE) #define SNDRV_PCM_FMTBIT_U24_3LE _SNDRV_PCM_FMTBIT(U24_3LE)
...@@ -202,6 +206,8 @@ struct snd_pcm_ops { ...@@ -202,6 +206,8 @@ struct snd_pcm_ops {
#define SNDRV_PCM_FMTBIT_FLOAT SNDRV_PCM_FMTBIT_FLOAT_LE #define SNDRV_PCM_FMTBIT_FLOAT SNDRV_PCM_FMTBIT_FLOAT_LE
#define SNDRV_PCM_FMTBIT_FLOAT64 SNDRV_PCM_FMTBIT_FLOAT64_LE #define SNDRV_PCM_FMTBIT_FLOAT64 SNDRV_PCM_FMTBIT_FLOAT64_LE
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE
#define SNDRV_PCM_FMTBIT_S20 SNDRV_PCM_FMTBIT_S20_LE
#define SNDRV_PCM_FMTBIT_U20 SNDRV_PCM_FMTBIT_U20_LE
#endif #endif
#ifdef SNDRV_BIG_ENDIAN #ifdef SNDRV_BIG_ENDIAN
#define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_BE #define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_BE
...@@ -213,6 +219,8 @@ struct snd_pcm_ops { ...@@ -213,6 +219,8 @@ struct snd_pcm_ops {
#define SNDRV_PCM_FMTBIT_FLOAT SNDRV_PCM_FMTBIT_FLOAT_BE #define SNDRV_PCM_FMTBIT_FLOAT SNDRV_PCM_FMTBIT_FLOAT_BE
#define SNDRV_PCM_FMTBIT_FLOAT64 SNDRV_PCM_FMTBIT_FLOAT64_BE #define SNDRV_PCM_FMTBIT_FLOAT64 SNDRV_PCM_FMTBIT_FLOAT64_BE
#define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE
#define SNDRV_PCM_FMTBIT_S20 SNDRV_PCM_FMTBIT_S20_BE
#define SNDRV_PCM_FMTBIT_U20 SNDRV_PCM_FMTBIT_U20_BE
#endif #endif
struct snd_pcm_file { struct snd_pcm_file {
......
...@@ -102,6 +102,8 @@ struct snd_compr_stream; ...@@ -102,6 +102,8 @@ struct snd_compr_stream;
SNDRV_PCM_FMTBIT_S16_BE |\ SNDRV_PCM_FMTBIT_S16_BE |\
SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S20_3LE |\
SNDRV_PCM_FMTBIT_S20_3BE |\ SNDRV_PCM_FMTBIT_S20_3BE |\
SNDRV_PCM_FMTBIT_S20_LE |\
SNDRV_PCM_FMTBIT_S20_BE |\
SNDRV_PCM_FMTBIT_S24_3LE |\ SNDRV_PCM_FMTBIT_S24_3LE |\
SNDRV_PCM_FMTBIT_S24_3BE |\ SNDRV_PCM_FMTBIT_S24_3BE |\
SNDRV_PCM_FMTBIT_S32_LE |\ SNDRV_PCM_FMTBIT_S32_LE |\
......
...@@ -214,6 +214,11 @@ typedef int __bitwise snd_pcm_format_t; ...@@ -214,6 +214,11 @@ typedef int __bitwise snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22) #define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22)
#define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23) #define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23)
#define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24) #define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24)
#define SNDRV_PCM_FORMAT_S20_LE ((__force snd_pcm_format_t) 25) /* in four bytes, LSB justified */
#define SNDRV_PCM_FORMAT_S20_BE ((__force snd_pcm_format_t) 26) /* in four bytes, LSB justified */
#define SNDRV_PCM_FORMAT_U20_LE ((__force snd_pcm_format_t) 27) /* in four bytes, LSB justified */
#define SNDRV_PCM_FORMAT_U20_BE ((__force snd_pcm_format_t) 28) /* in four bytes, LSB justified */
/* gap in the numbering for a future standard linear format */
#define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31) #define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31)
#define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32) /* in three bytes */ #define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32) /* in three bytes */
#define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33) /* in three bytes */ #define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33) /* in three bytes */
...@@ -248,6 +253,8 @@ typedef int __bitwise snd_pcm_format_t; ...@@ -248,6 +253,8 @@ typedef int __bitwise snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE #define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE
#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE #define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE
#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE
#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE
#endif #endif
#ifdef SNDRV_BIG_ENDIAN #ifdef SNDRV_BIG_ENDIAN
#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE
...@@ -259,6 +266,8 @@ typedef int __bitwise snd_pcm_format_t; ...@@ -259,6 +266,8 @@ typedef int __bitwise snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE #define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE
#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE #define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE
#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE #define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE
#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE
#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE
#endif #endif
typedef int __bitwise snd_pcm_subformat_t; typedef int __bitwise snd_pcm_subformat_t;
......
...@@ -163,13 +163,30 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = { ...@@ -163,13 +163,30 @@ static struct pcm_format_data pcm_formats[(INT)SNDRV_PCM_FORMAT_LAST+1] = {
.width = 32, .phys = 32, .le = 0, .signd = 0, .width = 32, .phys = 32, .le = 0, .signd = 0,
.silence = { 0x69, 0x69, 0x69, 0x69 }, .silence = { 0x69, 0x69, 0x69, 0x69 },
}, },
/* FIXME: the following three formats are not defined properly yet */ /* FIXME: the following two formats are not defined properly yet */
[SNDRV_PCM_FORMAT_MPEG] = { [SNDRV_PCM_FORMAT_MPEG] = {
.le = -1, .signd = -1, .le = -1, .signd = -1,
}, },
[SNDRV_PCM_FORMAT_GSM] = { [SNDRV_PCM_FORMAT_GSM] = {
.le = -1, .signd = -1, .le = -1, .signd = -1,
}, },
[SNDRV_PCM_FORMAT_S20_LE] = {
.width = 20, .phys = 32, .le = 1, .signd = 1,
.silence = {},
},
[SNDRV_PCM_FORMAT_S20_BE] = {
.width = 20, .phys = 32, .le = 0, .signd = 1,
.silence = {},
},
[SNDRV_PCM_FORMAT_U20_LE] = {
.width = 20, .phys = 32, .le = 1, .signd = 0,
.silence = { 0x00, 0x00, 0x08, 0x00 },
},
[SNDRV_PCM_FORMAT_U20_BE] = {
.width = 20, .phys = 32, .le = 0, .signd = 0,
.silence = { 0x00, 0x08, 0x00, 0x00 },
},
/* FIXME: the following format is not defined properly yet */
[SNDRV_PCM_FORMAT_SPECIAL] = { [SNDRV_PCM_FORMAT_SPECIAL] = {
.le = -1, .signd = -1, .le = -1, .signd = -1,
}, },
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "../codecs/tlv320aic23.h" #include "../codecs/tlv320aic23.h"
#include "imx-ssi.h" #include "imx-ssi.h"
#include "fsl_ssi.h"
#include "imx-audmux.h" #include "imx-audmux.h"
#define CODEC_CLOCK 12000000 #define CODEC_CLOCK 12000000
......
...@@ -442,8 +442,8 @@ static int fsl_asoc_card_late_probe(struct snd_soc_card *card) ...@@ -442,8 +442,8 @@ static int fsl_asoc_card_late_probe(struct snd_soc_card *card)
if (fsl_asoc_card_is_ac97(priv)) { if (fsl_asoc_card_is_ac97(priv)) {
#if IS_ENABLED(CONFIG_SND_AC97_CODEC) #if IS_ENABLED(CONFIG_SND_AC97_CODEC)
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_component *component = rtd->codec_dai->component;
struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component);
/* /*
* Use slots 3/4 for S/PDIF so SSI won't try to enable * Use slots 3/4 for S/PDIF so SSI won't try to enable
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#define REG_ASRDOC 0x74 #define REG_ASRDOC 0x74
#define REG_ASRDI(i) (REG_ASRDIA + (i << 3)) #define REG_ASRDI(i) (REG_ASRDIA + (i << 3))
#define REG_ASRDO(i) (REG_ASRDOA + (i << 3)) #define REG_ASRDO(i) (REG_ASRDOA + (i << 3))
#define REG_ASRDx(x, i) (x == IN ? REG_ASRDI(i) : REG_ASRDO(i)) #define REG_ASRDx(x, i) ((x) == IN ? REG_ASRDI(i) : REG_ASRDO(i))
#define REG_ASRIDRHA 0x80 #define REG_ASRIDRHA 0x80
#define REG_ASRIDRLA 0x84 #define REG_ASRIDRLA 0x84
......
...@@ -913,8 +913,8 @@ static int fsl_soc_dma_probe(struct platform_device *pdev) ...@@ -913,8 +913,8 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
dma->dai.pcm_free = fsl_dma_free_dma_buffers; dma->dai.pcm_free = fsl_dma_free_dma_buffers;
/* Store the SSI-specific information that we need */ /* Store the SSI-specific information that we need */
dma->ssi_stx_phys = res.start + CCSR_SSI_STX0; dma->ssi_stx_phys = res.start + REG_SSI_STX0;
dma->ssi_srx_phys = res.start + CCSR_SSI_SRX0; dma->ssi_srx_phys = res.start + REG_SSI_SRX0;
iprop = of_get_property(ssi_np, "fsl,fifo-depth", NULL); iprop = of_get_property(ssi_np, "fsl,fifo-depth", NULL);
if (iprop) if (iprop)
......
This diff is collapsed.
This diff is collapsed.
...@@ -18,86 +18,86 @@ ...@@ -18,86 +18,86 @@
void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *dbg, u32 sisr) void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *dbg, u32 sisr)
{ {
if (sisr & CCSR_SSI_SISR_RFRC) if (sisr & SSI_SISR_RFRC)
dbg->stats.rfrc++; dbg->stats.rfrc++;
if (sisr & CCSR_SSI_SISR_TFRC) if (sisr & SSI_SISR_TFRC)
dbg->stats.tfrc++; dbg->stats.tfrc++;
if (sisr & CCSR_SSI_SISR_CMDAU) if (sisr & SSI_SISR_CMDAU)
dbg->stats.cmdau++; dbg->stats.cmdau++;
if (sisr & CCSR_SSI_SISR_CMDDU) if (sisr & SSI_SISR_CMDDU)
dbg->stats.cmddu++; dbg->stats.cmddu++;
if (sisr & CCSR_SSI_SISR_RXT) if (sisr & SSI_SISR_RXT)
dbg->stats.rxt++; dbg->stats.rxt++;
if (sisr & CCSR_SSI_SISR_RDR1) if (sisr & SSI_SISR_RDR1)
dbg->stats.rdr1++; dbg->stats.rdr1++;
if (sisr & CCSR_SSI_SISR_RDR0) if (sisr & SSI_SISR_RDR0)
dbg->stats.rdr0++; dbg->stats.rdr0++;
if (sisr & CCSR_SSI_SISR_TDE1) if (sisr & SSI_SISR_TDE1)
dbg->stats.tde1++; dbg->stats.tde1++;
if (sisr & CCSR_SSI_SISR_TDE0) if (sisr & SSI_SISR_TDE0)
dbg->stats.tde0++; dbg->stats.tde0++;
if (sisr & CCSR_SSI_SISR_ROE1) if (sisr & SSI_SISR_ROE1)
dbg->stats.roe1++; dbg->stats.roe1++;
if (sisr & CCSR_SSI_SISR_ROE0) if (sisr & SSI_SISR_ROE0)
dbg->stats.roe0++; dbg->stats.roe0++;
if (sisr & CCSR_SSI_SISR_TUE1) if (sisr & SSI_SISR_TUE1)
dbg->stats.tue1++; dbg->stats.tue1++;
if (sisr & CCSR_SSI_SISR_TUE0) if (sisr & SSI_SISR_TUE0)
dbg->stats.tue0++; dbg->stats.tue0++;
if (sisr & CCSR_SSI_SISR_TFS) if (sisr & SSI_SISR_TFS)
dbg->stats.tfs++; dbg->stats.tfs++;
if (sisr & CCSR_SSI_SISR_RFS) if (sisr & SSI_SISR_RFS)
dbg->stats.rfs++; dbg->stats.rfs++;
if (sisr & CCSR_SSI_SISR_TLS) if (sisr & SSI_SISR_TLS)
dbg->stats.tls++; dbg->stats.tls++;
if (sisr & CCSR_SSI_SISR_RLS) if (sisr & SSI_SISR_RLS)
dbg->stats.rls++; dbg->stats.rls++;
if (sisr & CCSR_SSI_SISR_RFF1) if (sisr & SSI_SISR_RFF1)
dbg->stats.rff1++; dbg->stats.rff1++;
if (sisr & CCSR_SSI_SISR_RFF0) if (sisr & SSI_SISR_RFF0)
dbg->stats.rff0++; dbg->stats.rff0++;
if (sisr & CCSR_SSI_SISR_TFE1) if (sisr & SSI_SISR_TFE1)
dbg->stats.tfe1++; dbg->stats.tfe1++;
if (sisr & CCSR_SSI_SISR_TFE0) if (sisr & SSI_SISR_TFE0)
dbg->stats.tfe0++; dbg->stats.tfe0++;
} }
/* Show the statistics of a flag only if its interrupt is enabled. The /**
* compiler will optimze this code to a no-op if the interrupt is not * Show the statistics of a flag only if its interrupt is enabled
* enabled. *
* Compilers will optimize it to a no-op if the interrupt is disabled
*/ */
#define SIER_SHOW(flag, name) \ #define SIER_SHOW(flag, name) \
do { \ do { \
if (CCSR_SSI_SIER_##flag) \ if (SSI_SIER_##flag) \
seq_printf(s, #name "=%u\n", ssi_dbg->stats.name); \ seq_printf(s, #name "=%u\n", ssi_dbg->stats.name); \
} while (0) } while (0)
/** /**
* fsl_sysfs_ssi_show: display SSI statistics * Display the statistics for the current SSI device
* *
* Display the statistics for the current SSI device. To avoid confusion, * To avoid confusion, only show those counts that are enabled
* we only show those counts that are enabled.
*/ */
static int fsl_ssi_stats_show(struct seq_file *s, void *unused) static int fsl_ssi_stats_show(struct seq_file *s, void *unused)
{ {
...@@ -147,7 +147,8 @@ int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev) ...@@ -147,7 +147,8 @@ int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev)
return -ENOMEM; return -ENOMEM;
ssi_dbg->dbg_stats = debugfs_create_file("stats", S_IRUGO, ssi_dbg->dbg_stats = debugfs_create_file("stats", S_IRUGO,
ssi_dbg->dbg_dir, ssi_dbg, &fsl_ssi_stats_ops); ssi_dbg->dbg_dir, ssi_dbg,
&fsl_ssi_stats_ops);
if (!ssi_dbg->dbg_stats) { if (!ssi_dbg->dbg_stats) {
debugfs_remove(ssi_dbg->dbg_dir); debugfs_remove(ssi_dbg->dbg_dir);
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment