tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge branch 'fix/asoc' into for-linus
Takashi Iwai
15 years ago
b614e38e
e68d3b31
+16
-4
2 changed files
expand all
collapse all
unified
split
sound
soc
sh
migor.c
soc-cache.c
+13
-2
sound/soc/sh/migor.c
···
12
#include <linux/firmware.h>
13
#include <linux/module.h>
14
0
15
#include <asm/clock.h>
16
17
#include <cpu/sh7722.h>
···
41
};
42
43
static struct clk siumckb_clk = {
44
-
.name = "siumckb_clk",
45
-
.id = -1,
46
.ops = &siumckb_clk_ops,
47
.rate = 0, /* initialised at run-time */
48
};
0
0
49
50
static int migor_hw_params(struct snd_pcm_substream *substream,
51
struct snd_pcm_hw_params *params)
···
181
if (ret < 0)
182
return ret;
183
0
0
0
0
0
0
0
184
/* Port number used on this machine: port B */
185
migor_snd_device = platform_device_alloc("soc-audio", 1);
186
if (!migor_snd_device) {
···
208
epdevadd:
209
platform_device_put(migor_snd_device);
210
epdevalloc:
0
0
211
clk_unregister(&siumckb_clk);
212
return ret;
213
}
214
215
static void __exit migor_exit(void)
216
{
0
217
clk_unregister(&siumckb_clk);
218
platform_device_unregister(migor_snd_device);
219
}
···
12
#include <linux/firmware.h>
13
#include <linux/module.h>
14
15
+
#include <asm/clkdev.h>
16
#include <asm/clock.h>
17
18
#include <cpu/sh7722.h>
···
40
};
41
42
static struct clk siumckb_clk = {
0
0
43
.ops = &siumckb_clk_ops,
44
.rate = 0, /* initialised at run-time */
45
};
46
+
47
+
static struct clk_lookup *siumckb_lookup;
48
49
static int migor_hw_params(struct snd_pcm_substream *substream,
50
struct snd_pcm_hw_params *params)
···
180
if (ret < 0)
181
return ret;
182
183
+
siumckb_lookup = clkdev_alloc(&siumckb_clk, "siumckb_clk", NULL);
184
+
if (!siumckb_lookup) {
185
+
ret = -ENOMEM;
186
+
goto eclkdevalloc;
187
+
}
188
+
clkdev_add(siumckb_lookup);
189
+
190
/* Port number used on this machine: port B */
191
migor_snd_device = platform_device_alloc("soc-audio", 1);
192
if (!migor_snd_device) {
···
200
epdevadd:
201
platform_device_put(migor_snd_device);
202
epdevalloc:
203
+
clkdev_drop(siumckb_lookup);
204
+
eclkdevalloc:
205
clk_unregister(&siumckb_clk);
206
return ret;
207
}
208
209
static void __exit migor_exit(void)
210
{
211
+
clkdev_drop(siumckb_lookup);
212
clk_unregister(&siumckb_clk);
213
platform_device_unregister(migor_snd_device);
214
}
+3
-2
sound/soc/soc-cache.c
···
203
data[1] = (value >> 8) & 0xff;
204
data[2] = value & 0xff;
205
206
-
if (!snd_soc_codec_volatile_register(codec, reg))
207
-
reg_cache[reg] = value;
0
208
209
if (codec->cache_only) {
210
codec->cache_sync = 1;
···
203
data[1] = (value >> 8) & 0xff;
204
data[2] = value & 0xff;
205
206
+
if (!snd_soc_codec_volatile_register(codec, reg)
207
+
&& reg < codec->reg_cache_size)
208
+
reg_cache[reg] = value;
209
210
if (codec->cache_only) {
211
codec->cache_sync = 1;