diff --git a/sound/soc/amlogic/auge/pdm.c b/sound/soc/amlogic/auge/pdm.c index fb01c92e56cb..e784e6b7bd61 100644 --- a/sound/soc/amlogic/auge/pdm.c +++ b/sound/soc/amlogic/auge/pdm.c @@ -51,7 +51,7 @@ static struct snd_pcm_hardware aml_pdm_hardware = { SNDRV_PCM_FMTBIT_S32, .rate_min = 8000, - .rate_max = 48000, + .rate_max = 64000, .channels_min = PDM_CHANNELS_MIN, .channels_max = PDM_CHANNELS_MAX, @@ -139,7 +139,7 @@ static int pdm_hcic_shift_gain_set_enum( int pdm_dclk; static const char *const pdm_dclk_texts[] = { - "PDM Dclk 3.072m, support 8k/16k/32k/48k", + "PDM Dclk 3.072m, support 8k/16k/32k/48k/64k", "PDM Dclk 1.024m, support 8k/16k", "PDM Dclk 768k, support 8k/16k", }; @@ -652,7 +652,9 @@ static int aml_pdm_dai_prepare( return -EINVAL; } } else { - if (runtime->rate == 48000) + if (runtime->rate == 64000) + osr = 48; + else if (runtime->rate == 48000) osr = 64; else if (runtime->rate == 32000) osr = 96; diff --git a/sound/soc/amlogic/auge/pdm.h b/sound/soc/amlogic/auge/pdm.h index ab34611d8b18..115efa650c58 100644 --- a/sound/soc/amlogic/auge/pdm.h +++ b/sound/soc/amlogic/auge/pdm.h @@ -29,7 +29,8 @@ #define PDM_CHANNELS_MIN 1 #define PDM_CHANNELS_MAX (8 + 8) /* 8ch pdm in, 8 ch tdmin_lb */ -#define PDM_RATES (SNDRV_PCM_RATE_48000 |\ +#define PDM_RATES (SNDRV_PCM_RATE_64000 |\ + SNDRV_PCM_RATE_48000 |\ SNDRV_PCM_RATE_32000 |\ SNDRV_PCM_RATE_16000 |\ SNDRV_PCM_RATE_8000) diff --git a/sound/soc/amlogic/auge/pdm_hw.c b/sound/soc/amlogic/auge/pdm_hw.c index fb0f94d743b1..5177aee78848 100644 --- a/sound/soc/amlogic/auge/pdm_hw.c +++ b/sound/soc/amlogic/auge/pdm_hw.c @@ -147,22 +147,22 @@ static void aml_pdm_filters_config(int osr, case 32: hcic_dn_rate = 0x4; hcic_gain = 0x80; - hcic_shift = 0xa; + hcic_shift = 0xe; break; case 40: hcic_dn_rate = 0x5; - hcic_gain = 0x54; - hcic_shift = 0xb; + hcic_gain = 0x6b; + hcic_shift = 0x10; break; case 48: hcic_dn_rate = 0x6; - hcic_gain = 0x43; - hcic_shift = 0xc; + hcic_gain = 0x78; + hcic_shift = 0x12; break; case 56: hcic_dn_rate = 0x7; - hcic_gain = 0x7d; - hcic_shift = 0xe; + hcic_gain = 0x51; + hcic_shift = 0x13; break; case 64: hcic_dn_rate = 0x0008; @@ -358,7 +358,8 @@ void aml_pdm_filter_ctrl(int osr, int mode) case 48: case 56: default: - pr_info("default mode 1, osr 64, 48k\n"); + pr_info("osr :%d , lpf2 uses default parameters with osr64\n", + osr); lpf2_coeff = lpf2_osr64; break; } diff --git a/sound/soc/codecs/amlogic/pdm_dummy.c b/sound/soc/codecs/amlogic/pdm_dummy.c index 0200d1c04976..79fca33c5826 100644 --- a/sound/soc/codecs/amlogic/pdm_dummy.c +++ b/sound/soc/codecs/amlogic/pdm_dummy.c @@ -20,7 +20,8 @@ #include #include -#define DUMMY_RATES (SNDRV_PCM_RATE_48000 |\ +#define DUMMY_RATES (SNDRV_PCM_RATE_64000 |\ + SNDRV_PCM_RATE_48000 |\ SNDRV_PCM_RATE_32000 |\ SNDRV_PCM_RATE_16000 |\ SNDRV_PCM_RATE_8000)