Skip to content

Commit

Permalink
Tomtom extended Formats/Fmtbits & 16bit uhqa
Browse files Browse the repository at this point in the history
  • Loading branch information
ObyeBoss committed Jun 10, 2018
1 parent 7de8f47 commit 011d7a0
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions sound/soc/codecs/wcd9330.c
Expand Up @@ -337,8 +337,9 @@ static struct afe_param_id_clip_bank_sel clip_bank_sel = {
};

#define WCD9330_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\
SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000)
SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 |\
SNDRV_PCM_RATE_192000)

#define NUM_DECIMATORS 10
#define NUM_INTERPOLATORS 8
Expand All @@ -355,11 +356,13 @@ static struct afe_param_id_clip_bank_sel clip_bank_sel = {
#define TOMTOM_MCLK_CLK_12P288MHZ 12288000
#define TOMTOM_MCLK_CLK_9P6MHZ 9600000

#define TOMTOM_FORMATS_S16_S24_LE (SNDRV_PCM_FMTBIT_S16_LE | \
SNDRV_PCM_FORMAT_S24_LE | \
SNDRV_PCM_FMTBIT_S24_3LE)
#define TOMTOM_FORMATS_S16_S24_LE (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S16_LE |\
SNDRV_PCM_FORMAT_S24_LE | SNDRV_PCM_FMTBIT_S24_LE |\
SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FORMAT_S24_LE)

#define TOMTOM_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
#define TOMTOM_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S16_LE |\
SNDRV_PCM_FORMAT_S24_LE | SNDRV_PCM_FMTBIT_S24_LE |\
SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FORMAT_S24_LE)

#define TOMTOM_SLIM_PGD_PORT_INT_TX_EN0 (TOMTOM_SLIM_PGD_PORT_INT_EN0 + 2)
#define TOMTOM_ZDET_BOX_CAR_AVG_LOOP_COUNT 1
Expand Down Expand Up @@ -583,6 +586,7 @@ struct tomtom_priv {


unsigned long status_mask;

};

static const u32 comp_shift[] = {
Expand Down Expand Up @@ -711,8 +715,8 @@ static int tomtom_update_uhqa_mode(struct snd_soc_codec *codec, int path)
if (((tomtom_get_sample_rate(codec, path) & 0xE0) == 0xA0) &&
(tomtom_compare_bit_format(codec, 24))) {
tomtom_p->uhqa_mode = 1;
} else {
tomtom_p->uhqa_mode = 0;
} else if ((tomtom_compare_bit_format(codec, 16))) {
tomtom_p->uhqa_mode = 1;
}
dev_dbg(codec->dev, "%s: uhqa_mode=%d", __func__, tomtom_p->uhqa_mode);
return ret;
Expand Down

0 comments on commit 011d7a0

Please sign in to comment.