struct snd_ctl_elem_value *ucontrol)
{
struct snd_ali *codec = kcontrol->private_data;
- unsigned int enable;
+ unsigned int spdif_enable;
- enable = ucontrol->value.integer.value[0] ? 1 : 0;
+ spdif_enable = ucontrol->value.integer.value[0] ? 1 : 0;
spin_lock_irq(&codec->reg_lock);
switch (kcontrol->private_value) {
case 0:
- enable = (codec->spdif_mask & 0x02) ? 1 : 0;
+ spdif_enable = (codec->spdif_mask & 0x02) ? 1 : 0;
break;
case 1:
- enable = ((codec->spdif_mask & 0x02) &&
+ spdif_enable = ((codec->spdif_mask & 0x02) &&
(codec->spdif_mask & 0x04)) ? 1 : 0;
break;
case 2:
- enable = (codec->spdif_mask & 0x01) ? 1 : 0;
+ spdif_enable = (codec->spdif_mask & 0x01) ? 1 : 0;
break;
default:
break;
}
- ucontrol->value.integer.value[0] = enable;
+ ucontrol->value.integer.value[0] = spdif_enable;
spin_unlock_irq(&codec->reg_lock);
return 0;
}
struct snd_ctl_elem_value *ucontrol)
{
struct snd_ali *codec = kcontrol->private_data;
- unsigned int change = 0, enable = 0;
+ unsigned int change = 0, spdif_enable = 0;
- enable = ucontrol->value.integer.value[0] ? 1 : 0;
+ spdif_enable = ucontrol->value.integer.value[0] ? 1 : 0;
spin_lock_irq(&codec->reg_lock);
switch (kcontrol->private_value) {
case 0:
change = (codec->spdif_mask & 0x02) ? 1 : 0;
- change = change ^ enable;
+ change = change ^ spdif_enable;
if (change) {
- if (enable) {
+ if (spdif_enable) {
codec->spdif_mask |= 0x02;
snd_ali_enable_spdif_out(codec);
} else {
break;
case 1:
change = (codec->spdif_mask & 0x04) ? 1 : 0;
- change = change ^ enable;
+ change = change ^ spdif_enable;
if (change && (codec->spdif_mask & 0x02)) {
- if (enable) {
+ if (spdif_enable) {
codec->spdif_mask |= 0x04;
snd_ali_enable_spdif_chnout(codec);
} else {
break;
case 2:
change = (codec->spdif_mask & 0x01) ? 1 : 0;
- change = change ^ enable;
+ change = change ^ spdif_enable;
if (change) {
- if (enable) {
+ if (spdif_enable) {
codec->spdif_mask |= 0x01;
snd_ali_enable_spdif_in(codec);
} else {