aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2007-11-12 09:55:19 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:22 -0500
commit83a28a09c8d02d29c17e903ca713d9b8f4159ad4 (patch)
tree8afb81c8d1311435e01320d5e9790fa4787de9e5 /sound/pci
parent40c1d30871346c7428d3876fc4c6b593b1b875f2 (diff)
[ALSA] emu10k1: Add mixer controls parameter checking.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/emu10k1/emumixer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index ccacd7b890e8..4b85a6b273cd 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -1089,6 +1089,7 @@ static int snd_emu10k1_send_volume_put(struct snd_kcontrol *kcontrol,
1089{ 1089{
1090 unsigned long flags; 1090 unsigned long flags;
1091 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1091 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1092 /* FIXME: Check limits */
1092 struct snd_emu10k1_pcm_mixer *mix = 1093 struct snd_emu10k1_pcm_mixer *mix =
1093 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 1094 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1094 int change = 0, idx, val; 1095 int change = 0, idx, val;
@@ -1141,6 +1142,7 @@ static int snd_emu10k1_attn_get(struct snd_kcontrol *kcontrol,
1141 struct snd_ctl_elem_value *ucontrol) 1142 struct snd_ctl_elem_value *ucontrol)
1142{ 1143{
1143 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1144 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1145 /* FIXME: Check limits */
1144 struct snd_emu10k1_pcm_mixer *mix = 1146 struct snd_emu10k1_pcm_mixer *mix =
1145 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 1147 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1146 unsigned long flags; 1148 unsigned long flags;
@@ -1158,6 +1160,7 @@ static int snd_emu10k1_attn_put(struct snd_kcontrol *kcontrol,
1158{ 1160{
1159 unsigned long flags; 1161 unsigned long flags;
1160 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1162 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1163 /* FIXME: Check limits */
1161 struct snd_emu10k1_pcm_mixer *mix = 1164 struct snd_emu10k1_pcm_mixer *mix =
1162 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 1165 &emu->pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1163 int change = 0, idx, val; 1166 int change = 0, idx, val;
@@ -1210,6 +1213,7 @@ static int snd_emu10k1_efx_send_routing_get(struct snd_kcontrol *kcontrol,
1210{ 1213{
1211 unsigned long flags; 1214 unsigned long flags;
1212 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1215 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1216 /* FIXME: Check limits */
1213 struct snd_emu10k1_pcm_mixer *mix = 1217 struct snd_emu10k1_pcm_mixer *mix =
1214 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 1218 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1215 int idx; 1219 int idx;
@@ -1229,6 +1233,7 @@ static int snd_emu10k1_efx_send_routing_put(struct snd_kcontrol *kcontrol,
1229{ 1233{
1230 unsigned long flags; 1234 unsigned long flags;
1231 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1235 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1236 /* FIXME: Check limits */
1232 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1237 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1233 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; 1238 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
1234 int change = 0, idx, val; 1239 int change = 0, idx, val;
@@ -1280,6 +1285,7 @@ static int snd_emu10k1_efx_send_volume_get(struct snd_kcontrol *kcontrol,
1280{ 1285{
1281 unsigned long flags; 1286 unsigned long flags;
1282 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1287 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1288 /* FIXME: Check limits */
1283 struct snd_emu10k1_pcm_mixer *mix = 1289 struct snd_emu10k1_pcm_mixer *mix =
1284 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 1290 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1285 int idx; 1291 int idx;
@@ -1297,6 +1303,7 @@ static int snd_emu10k1_efx_send_volume_put(struct snd_kcontrol *kcontrol,
1297{ 1303{
1298 unsigned long flags; 1304 unsigned long flags;
1299 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1305 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1306 /* FIXME: Check limits */
1300 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1307 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1301 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; 1308 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
1302 int change = 0, idx, val; 1309 int change = 0, idx, val;
@@ -1345,6 +1352,7 @@ static int snd_emu10k1_efx_attn_get(struct snd_kcontrol *kcontrol,
1345 struct snd_ctl_elem_value *ucontrol) 1352 struct snd_ctl_elem_value *ucontrol)
1346{ 1353{
1347 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1354 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1355 /* FIXME: Check limits */
1348 struct snd_emu10k1_pcm_mixer *mix = 1356 struct snd_emu10k1_pcm_mixer *mix =
1349 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)]; 1357 &emu->efx_pcm_mixer[snd_ctl_get_ioffidx(kcontrol, &ucontrol->id)];
1350 unsigned long flags; 1358 unsigned long flags;
@@ -1360,6 +1368,7 @@ static int snd_emu10k1_efx_attn_put(struct snd_kcontrol *kcontrol,
1360{ 1368{
1361 unsigned long flags; 1369 unsigned long flags;
1362 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); 1370 struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
1371 /* FIXME: Check limits */
1363 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1372 int ch = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1364 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch]; 1373 struct snd_emu10k1_pcm_mixer *mix = &emu->efx_pcm_mixer[ch];
1365 int change = 0, val; 1374 int change = 0, val;