aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/bells.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-17 15:05:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-17 15:05:31 -0500
commita016af2e70bfca23f2f5de7d8708157b86ea374d (patch)
treebfe3c0c6ea9d52d4ec6ea021b0626a53c83e7d9f /sound/soc/samsung/bells.c
parente535d74bc50df2357d3253f8f3ca48c66d0d892a (diff)
parentc3b1681375dc6e71d89a3ae00cc3ce9e775a8917 (diff)
Merge tag 'sound-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "We've had quite busy weeks in this cycle. Looking at ALSA core, the significant changes are a few fixes wrt timer and sequencer ioctls that have been revealed by fuzzer recently. Other than that, ASoC core got a few updates about DAI link handling, but these are rather straightforward refactoring. In drivers scene, ASoC received quite lots of new drivers in addition to bunch of updates for still ongoing Intel Skylake support and topology API. HD-audio gained a new HDMI/DP hotplug notification via component. FireWire got a pile of code refactoring/updates with SCS.1x driver integration. More highlights are shown below. [ NOTE: this contains also many commits for DRM. This is due to the pull of drm stable branch into sound tree, as the base of i915 audio component work for HD-audio. The highlights below don't contain these DRM changes, as these are supposed to be pulled via drm tree in anyway sooner or later. ] Core: - Handful fixes to harden ALSA timer and sequencer ioctls against races reported by syzkaller fuzzer - Irq description string can be unique to each card; only for HD-audio for now ASoC: - Conversion of the array of DAI links to a list for supporting dynamically adding and removing DAI links - Topology API enhancements to make everything more component based and being able to specify PCM links via topology - Some more fixes for the topology code, though it is still not final and ready for enabling in production; we really need to get to the point where that can be done - A pile of changes for Intel SkyLake drivers which hopefully deliver some useful initial functionality for systems with this chipset, though there is more work still to come - Lots of new features and cleanups for the Renesas drivers - ANC support for WM5110 - New drivers: Imagination Technologies IPs, Atmel class D speaker, Cirrus CS47L24 and WM1831, Dialog DA7128, Realtek RT5659 and RT56156, Rockchip RK3036, TI PC3168A, and AMD ACP - Rename PCM1792a driver to be generic pcm179x HD-Audio: - Use audio component for i915 HDMI/DP hotplug handling - On-demand binding with i915 driver - bdl_pos_adj parameter adjustment for Baytrail controllers - Enable power_save_node for CX20722; this shouldn't lead to regression, hopefully - Kabylake HDMI/DP codec support - Quirks for Lenovo E50-80, Dell Latitude E-series, and other Dell machines - A few code refactoring FireWire: - Lots of code cleanup and refactoring - Integrate the support of SCS.1x devices into snd-oxfw driver; snd-scs1x driver is obsoleted USB-audio: - Fix possible NULL dereference at disconnection - A regression fix for Native Instruments devices Misc: - A few code cleanups of fm801 driver" * tag 'sound-4.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (722 commits) ALSA: timer: Code cleanup ALSA: timer: Harden slave timer list handling ALSA: hda - Add fixup for Dell Latitidue E6540 ALSA: timer: Fix race among timer ioctls ALSA: hda - add codec support for Kabylake display audio codec ALSA: timer: Fix double unlink of active_list ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices ALSA: hda - fix the headset mic detection problem for a Dell laptop ALSA: hda - Fix white noise on Dell Latitude E5550 ALSA: hda_intel: add card number to irq description ALSA: seq: Fix race at timer setup and close ALSA: seq: Fix missing NULL check at remove_events ioctl ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect ASoC: hdac_hdmi: remove unused hdac_hdmi_query_pin_connlist ASoC: AMD: Add missing include file ALSA: hda - Fixup inverted internal mic for Lenovo E50-80 ALSA: usb: Add native DSD support for Oppo HA-1 ASoC: Make aux_dev more like a generic component ASoC: bcm2835: cleanup includes by ordering them alphabetically ASoC: AMD: Manage ACP 2.x SRAM banks power ...
Diffstat (limited to 'sound/soc/samsung/bells.c')
-rw-r--r--sound/soc/samsung/bells.c40
1 files changed, 30 insertions, 10 deletions
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c
index e5f05e62fa3c..3dd246fa0059 100644
--- a/sound/soc/samsung/bells.c
+++ b/sound/soc/samsung/bells.c
@@ -58,11 +58,16 @@ static int bells_set_bias_level(struct snd_soc_card *card,
58 struct snd_soc_dapm_context *dapm, 58 struct snd_soc_dapm_context *dapm,
59 enum snd_soc_bias_level level) 59 enum snd_soc_bias_level level)
60{ 60{
61 struct snd_soc_dai *codec_dai = card->rtd[DAI_DSP_CODEC].codec_dai; 61 struct snd_soc_pcm_runtime *rtd;
62 struct snd_soc_codec *codec = codec_dai->codec; 62 struct snd_soc_dai *codec_dai;
63 struct snd_soc_codec *codec;
63 struct bells_drvdata *bells = card->drvdata; 64 struct bells_drvdata *bells = card->drvdata;
64 int ret; 65 int ret;
65 66
67 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_DSP_CODEC].name);
68 codec_dai = rtd->codec_dai;
69 codec = codec_dai->codec;
70
66 if (dapm->dev != codec_dai->dev) 71 if (dapm->dev != codec_dai->dev)
67 return 0; 72 return 0;
68 73
@@ -99,11 +104,16 @@ static int bells_set_bias_level_post(struct snd_soc_card *card,
99 struct snd_soc_dapm_context *dapm, 104 struct snd_soc_dapm_context *dapm,
100 enum snd_soc_bias_level level) 105 enum snd_soc_bias_level level)
101{ 106{
102 struct snd_soc_dai *codec_dai = card->rtd[DAI_DSP_CODEC].codec_dai; 107 struct snd_soc_pcm_runtime *rtd;
103 struct snd_soc_codec *codec = codec_dai->codec; 108 struct snd_soc_dai *codec_dai;
109 struct snd_soc_codec *codec;
104 struct bells_drvdata *bells = card->drvdata; 110 struct bells_drvdata *bells = card->drvdata;
105 int ret; 111 int ret;
106 112
113 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_DSP_CODEC].name);
114 codec_dai = rtd->codec_dai;
115 codec = codec_dai->codec;
116
107 if (dapm->dev != codec_dai->dev) 117 if (dapm->dev != codec_dai->dev)
108 return 0; 118 return 0;
109 119
@@ -137,14 +147,22 @@ static int bells_set_bias_level_post(struct snd_soc_card *card,
137static int bells_late_probe(struct snd_soc_card *card) 147static int bells_late_probe(struct snd_soc_card *card)
138{ 148{
139 struct bells_drvdata *bells = card->drvdata; 149 struct bells_drvdata *bells = card->drvdata;
140 struct snd_soc_codec *wm0010 = card->rtd[DAI_AP_DSP].codec; 150 struct snd_soc_pcm_runtime *rtd;
141 struct snd_soc_codec *codec = card->rtd[DAI_DSP_CODEC].codec; 151 struct snd_soc_codec *wm0010;
142 struct snd_soc_dai *aif1_dai = card->rtd[DAI_DSP_CODEC].codec_dai; 152 struct snd_soc_codec *codec;
153 struct snd_soc_dai *aif1_dai;
143 struct snd_soc_dai *aif2_dai; 154 struct snd_soc_dai *aif2_dai;
144 struct snd_soc_dai *aif3_dai; 155 struct snd_soc_dai *aif3_dai;
145 struct snd_soc_dai *wm9081_dai; 156 struct snd_soc_dai *wm9081_dai;
146 int ret; 157 int ret;
147 158
159 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_AP_DSP].name);
160 wm0010 = rtd->codec;
161
162 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_DSP_CODEC].name);
163 codec = rtd->codec;
164 aif1_dai = rtd->codec_dai;
165
148 ret = snd_soc_codec_set_sysclk(codec, ARIZONA_CLK_SYSCLK, 166 ret = snd_soc_codec_set_sysclk(codec, ARIZONA_CLK_SYSCLK,
149 ARIZONA_CLK_SRC_FLL1, 167 ARIZONA_CLK_SRC_FLL1,
150 bells->sysclk_rate, 168 bells->sysclk_rate,
@@ -181,7 +199,8 @@ static int bells_late_probe(struct snd_soc_card *card)
181 return ret; 199 return ret;
182 } 200 }
183 201
184 aif2_dai = card->rtd[DAI_CODEC_CP].cpu_dai; 202 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_CODEC_CP].name);
203 aif2_dai = rtd->cpu_dai;
185 204
186 ret = snd_soc_dai_set_sysclk(aif2_dai, ARIZONA_CLK_ASYNCCLK, 0, 0); 205 ret = snd_soc_dai_set_sysclk(aif2_dai, ARIZONA_CLK_ASYNCCLK, 0, 0);
187 if (ret != 0) { 206 if (ret != 0) {
@@ -192,8 +211,9 @@ static int bells_late_probe(struct snd_soc_card *card)
192 if (card->num_rtd == DAI_CODEC_SUB) 211 if (card->num_rtd == DAI_CODEC_SUB)
193 return 0; 212 return 0;
194 213
195 aif3_dai = card->rtd[DAI_CODEC_SUB].cpu_dai; 214 rtd = snd_soc_get_pcm_runtime(card, card->dai_link[DAI_CODEC_SUB].name);
196 wm9081_dai = card->rtd[DAI_CODEC_SUB].codec_dai; 215 aif3_dai = rtd->cpu_dai;
216 wm9081_dai = rtd->codec_dai;
197 217
198 ret = snd_soc_dai_set_sysclk(aif3_dai, ARIZONA_CLK_SYSCLK, 0, 0); 218 ret = snd_soc_dai_set_sysclk(aif3_dai, ARIZONA_CLK_SYSCLK, 0, 0);
199 if (ret != 0) { 219 if (ret != 0) {