Loading sound/soc/codecs/wm8974.c +38 −40 Original line number Diff line number Diff line Loading @@ -28,9 +28,6 @@ #include "wm8974.h" #define AUDIO_NAME "wm8974" #define WM8974_VERSION "0.6" struct snd_soc_codec_device soc_codec_dev_wm8974; /* Loading Loading @@ -215,7 +212,8 @@ static int wm8974_add_controls(struct snd_soc_codec *codec) for (i = 0; i < ARRAY_SIZE(wm8974_snd_controls); i++) { err = snd_ctl_add(codec->card, snd_soc_cnew(&wm8974_snd_controls[i],codec, NULL)); snd_soc_cnew(&wm8974_snd_controls[i], codec, NULL)); if (err < 0) return err; } Loading Loading @@ -353,7 +351,8 @@ static struct pll_ pll[] = { { 13000000, 12288000, 0, 7, 0x8fd525 }, { 12288000, 11289600, 0, 7, 0x59999a }, { 11289600, 12288000, 0, 8, 0x80dee9 }, /* liam - add more entries */ { 25000000, 11289600, 1, 7, 0x39B024 }, { 25000000, 24576000, 1, 7, 0xdd4413 } }; static int wm8974_set_dai_pll(struct snd_soc_dai *codec_dai, Loading @@ -371,15 +370,18 @@ static int wm8974_set_dai_pll(struct snd_soc_dai *codec_dai, for (i = 0; i < ARRAY_SIZE(pll); i++) { if (freq_in == pll[i].in_hz && freq_out == pll[i].out_hz) { wm8974_write(codec, WM8974_PLLN, (pll[i].pre << 4) | pll[i].n); wm8974_write(codec, WM8974_PLLN, (pll[i].pre << 4) | pll[i].n); wm8974_write(codec, WM8974_PLLK1, pll[i].k >> 18); wm8974_write(codec, WM8974_PLLK2, (pll[i].k >> 9) & 0x1ff); wm8974_write(codec, WM8974_PLLK2, (pll[i].k >> 9) & 0x1ff); wm8974_write(codec, WM8974_PLLK3, pll[i].k & 0x1ff); reg = wm8974_read_reg_cache(codec, WM8974_POWER1); wm8974_write(codec, WM8974_POWER1, reg | 0x020); return 0; } } return -EINVAL; } Loading Loading @@ -562,9 +564,7 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec, return 0; } #define WM8974_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000) #define WM8974_RATES (SNDRV_PCM_RATE_8000_48000) #define WM8974_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) Loading Loading @@ -773,8 +773,6 @@ static int wm8974_probe(struct platform_device *pdev) struct snd_soc_codec *codec; int ret = 0; pr_info("WM8974 Audio Codec %s", WM8974_VERSION); setup = socdev->codec_data; codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); if (codec == NULL) Loading sound/soc/codecs/wm8974.h +14 −14 File changed.Contains only whitespace changes. Show changes Loading
sound/soc/codecs/wm8974.c +38 −40 Original line number Diff line number Diff line Loading @@ -28,9 +28,6 @@ #include "wm8974.h" #define AUDIO_NAME "wm8974" #define WM8974_VERSION "0.6" struct snd_soc_codec_device soc_codec_dev_wm8974; /* Loading Loading @@ -215,7 +212,8 @@ static int wm8974_add_controls(struct snd_soc_codec *codec) for (i = 0; i < ARRAY_SIZE(wm8974_snd_controls); i++) { err = snd_ctl_add(codec->card, snd_soc_cnew(&wm8974_snd_controls[i],codec, NULL)); snd_soc_cnew(&wm8974_snd_controls[i], codec, NULL)); if (err < 0) return err; } Loading Loading @@ -353,7 +351,8 @@ static struct pll_ pll[] = { { 13000000, 12288000, 0, 7, 0x8fd525 }, { 12288000, 11289600, 0, 7, 0x59999a }, { 11289600, 12288000, 0, 8, 0x80dee9 }, /* liam - add more entries */ { 25000000, 11289600, 1, 7, 0x39B024 }, { 25000000, 24576000, 1, 7, 0xdd4413 } }; static int wm8974_set_dai_pll(struct snd_soc_dai *codec_dai, Loading @@ -371,15 +370,18 @@ static int wm8974_set_dai_pll(struct snd_soc_dai *codec_dai, for (i = 0; i < ARRAY_SIZE(pll); i++) { if (freq_in == pll[i].in_hz && freq_out == pll[i].out_hz) { wm8974_write(codec, WM8974_PLLN, (pll[i].pre << 4) | pll[i].n); wm8974_write(codec, WM8974_PLLN, (pll[i].pre << 4) | pll[i].n); wm8974_write(codec, WM8974_PLLK1, pll[i].k >> 18); wm8974_write(codec, WM8974_PLLK2, (pll[i].k >> 9) & 0x1ff); wm8974_write(codec, WM8974_PLLK2, (pll[i].k >> 9) & 0x1ff); wm8974_write(codec, WM8974_PLLK3, pll[i].k & 0x1ff); reg = wm8974_read_reg_cache(codec, WM8974_POWER1); wm8974_write(codec, WM8974_POWER1, reg | 0x020); return 0; } } return -EINVAL; } Loading Loading @@ -562,9 +564,7 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec, return 0; } #define WM8974_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \ SNDRV_PCM_RATE_48000) #define WM8974_RATES (SNDRV_PCM_RATE_8000_48000) #define WM8974_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ SNDRV_PCM_FMTBIT_S24_LE) Loading Loading @@ -773,8 +773,6 @@ static int wm8974_probe(struct platform_device *pdev) struct snd_soc_codec *codec; int ret = 0; pr_info("WM8974 Audio Codec %s", WM8974_VERSION); setup = socdev->codec_data; codec = kzalloc(sizeof(struct snd_soc_codec), GFP_KERNEL); if (codec == NULL) Loading