migor.c (bc030d6cb9532877c1c5a3f5e7123344fa24a285) | migor.c (f4fd58d65e05850a80bba4ee3929e3b696fbc5eb) |
---|---|
1/* 2 * ALSA SoC driver for Migo-R 3 * 4 * Copyright (C) 2009-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 | 1/* 2 * ALSA SoC driver for Migo-R 3 * 4 * Copyright (C) 2009-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 */ 10 |
11#include <linux/clkdev.h> |
|
11#include <linux/device.h> 12#include <linux/firmware.h> 13#include <linux/module.h> 14 | 12#include <linux/device.h> 13#include <linux/firmware.h> 14#include <linux/module.h> 15 |
15#include <asm/clkdev.h> | |
16#include <asm/clock.h> 17 18#include <cpu/sh7722.h> 19 20#include <sound/core.h> 21#include <sound/pcm.h> 22#include <sound/soc.h> | 16#include <asm/clock.h> 17 18#include <cpu/sh7722.h> 19 20#include <sound/core.h> 21#include <sound/pcm.h> 22#include <sound/soc.h> |
23#include <sound/soc-dapm.h> | |
24 25#include "../codecs/wm8978.h" 26#include "siu.h" 27 28/* Default 8000Hz sampling frequency */ 29static unsigned long codec_freq = 8000 * 512; 30 31static unsigned int use_count; --- 103 unchanged lines hidden (view full) --- 135 { "LMICN", NULL, "Mic Bias" }, 136 { "LMICP", NULL, "Mic Bias" }, 137 { "Mic Bias", NULL, "External Microphone" }, 138}; 139 140static int migor_dai_init(struct snd_soc_pcm_runtime *rtd) 141{ 142 struct snd_soc_codec *codec = rtd->codec; | 23 24#include "../codecs/wm8978.h" 25#include "siu.h" 26 27/* Default 8000Hz sampling frequency */ 28static unsigned long codec_freq = 8000 * 512; 29 30static unsigned int use_count; --- 103 unchanged lines hidden (view full) --- 134 { "LMICN", NULL, "Mic Bias" }, 135 { "LMICP", NULL, "Mic Bias" }, 136 { "Mic Bias", NULL, "External Microphone" }, 137}; 138 139static int migor_dai_init(struct snd_soc_pcm_runtime *rtd) 140{ 141 struct snd_soc_codec *codec = rtd->codec; |
142 struct snd_soc_dapm_context *dapm = &codec->dapm; |
|
143 | 143 |
144 snd_soc_dapm_new_controls(codec, migor_dapm_widgets, | 144 snd_soc_dapm_new_controls(dapm, migor_dapm_widgets, |
145 ARRAY_SIZE(migor_dapm_widgets)); 146 | 145 ARRAY_SIZE(migor_dapm_widgets)); 146 |
147 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 147 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); |
148 149 return 0; 150} 151 152/* migor digital audio interface glue - connects codec <--> CPU */ 153static struct snd_soc_dai_link migor_dai = { 154 .name = "wm8978", 155 .stream_name = "WM8978", --- 69 unchanged lines hidden --- | 148 149 return 0; 150} 151 152/* migor digital audio interface glue - connects codec <--> CPU */ 153static struct snd_soc_dai_link migor_dai = { 154 .name = "wm8978", 155 .stream_name = "WM8978", --- 69 unchanged lines hidden --- |