diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-31 18:16:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-31 18:16:28 -0500 |
commit | e1a9c9872dd004617555dff079b357a6ffd945e9 (patch) | |
tree | c34779e59712ff345f8e4ee97e74086a85b34974 /sound/sparc/dbri.c | |
parent | fcc3ff4f9d695a80dc6e6058e0d631a3026ed4c3 (diff) | |
parent | 2ecba4ffbbc6c85fce8c3878514be415edace413 (diff) |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa: (299 commits)
[ALSA] version 1.0.16rc2
[ALSA] hda: fix Mic in as output
[ALSA] emu10k1 - Another EMU0404 Board ID
[ALSA] emu10k1 - Fix kthread handling at resume
[ALSA] emu10k1: General cleanup, add new locks, fix alsa bug#3501, kernel bug#9304.
[ALSA] emu10k1 - Use enum for emu_model types
[ALSA] emu10k1 - Don't create emu1010 controls for non-emu boards
[ALSA] emu10k1 - 1616(M) cardbus improvements
[ALSA] snd:emu10k1: E-Mu updates. Fixes to firmware loading and support for 0404.
[ALSA] emu10k1: Add comments regarding E-Mu ins and outs.
[ALSA] oxygen: revert SPI clock frequency change for AK4396/WM8785
[ALSA] es1938 - improve capture hw pointer reads
[ALSA] HDA-Intel - Add support for Intel SCH
[ALSA] hda: Add GPIO mute support to STAC9205
[ALSA] hda-codec - Add Dell T3400 support
[ALSA] hda-codec - Add model for HP DV9553EG laptop
[ALSA] hda-codec - Control SPDIF as slave
[ALSA] hda_intel: ALSA HD Audio patch for Intel ICH10 DeviceID's
[ALSA] Fix Oops with PCM OSS sync
[ALSA] hda-codec - Add speaker automute to ALC262 HP models
...
Diffstat (limited to 'sound/sparc/dbri.c')
-rw-r--r-- | sound/sparc/dbri.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 376b98691c96..3d00e0797b11 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c | |||
@@ -53,7 +53,6 @@ | |||
53 | * other DBRI low-level stuff | 53 | * other DBRI low-level stuff |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include <sound/driver.h> | ||
57 | #include <linux/interrupt.h> | 56 | #include <linux/interrupt.h> |
58 | #include <linux/delay.h> | 57 | #include <linux/delay.h> |
59 | #include <linux/irq.h> | 58 | #include <linux/irq.h> |
@@ -2279,14 +2278,25 @@ static int snd_cs4215_put_volume(struct snd_kcontrol *kcontrol, | |||
2279 | struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); | 2278 | struct snd_dbri *dbri = snd_kcontrol_chip(kcontrol); |
2280 | struct dbri_streaminfo *info = | 2279 | struct dbri_streaminfo *info = |
2281 | &dbri->stream_info[kcontrol->private_value]; | 2280 | &dbri->stream_info[kcontrol->private_value]; |
2281 | unsigned int vol[2]; | ||
2282 | int changed = 0; | 2282 | int changed = 0; |
2283 | 2283 | ||
2284 | if (info->left_gain != ucontrol->value.integer.value[0]) { | 2284 | vol[0] = ucontrol->value.integer.value[0]; |
2285 | info->left_gain = ucontrol->value.integer.value[0]; | 2285 | vol[1] = ucontrol->value.integer.value[1]; |
2286 | if (kcontrol->private_value == DBRI_PLAY) { | ||
2287 | if (vol[0] > DBRI_MAX_VOLUME || vol[1] > DBRI_MAX_VOLUME) | ||
2288 | return -EINVAL; | ||
2289 | } else { | ||
2290 | if (vol[0] > DBRI_MAX_GAIN || vol[1] > DBRI_MAX_GAIN) | ||
2291 | return -EINVAL; | ||
2292 | } | ||
2293 | |||
2294 | if (info->left_gain != vol[0]) { | ||
2295 | info->left_gain = vol[0]; | ||
2286 | changed = 1; | 2296 | changed = 1; |
2287 | } | 2297 | } |
2288 | if (info->right_gain != ucontrol->value.integer.value[1]) { | 2298 | if (info->right_gain != vol[1]) { |
2289 | info->right_gain = ucontrol->value.integer.value[1]; | 2299 | info->right_gain = vol[1]; |
2290 | changed = 1; | 2300 | changed = 1; |
2291 | } | 2301 | } |
2292 | if (changed) { | 2302 | if (changed) { |