Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73935
b: refs/heads/master
c: 552d2f8
h: refs/heads/master
i:
  73933: 5ce0574
  73931: 9d1edc6
  73927: bf0f40e
  73919: 810689b
v: v3
  • Loading branch information
Linus Torvalds committed Nov 27, 2007
1 parent 016c45a commit 541d105
Show file tree
Hide file tree
Showing 16 changed files with 121 additions and 109 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1e3afa001db8845eb60981f6ab925503ed94e53
refs/heads/master: 552d2f841e3f0f45eac86ff93e230db0b0a67a99
5 changes: 2 additions & 3 deletions trunk/arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ endif
$(srctree)/arch/x86/Makefile%: ;

ifeq ($(CONFIG_X86_32),y)
UTS_MACHINE := i386
include $(srctree)/arch/x86/Makefile_32
else
UTS_MACHINE := x86_64
include $(srctree)/arch/x86/Makefile_64
endif



2 changes: 1 addition & 1 deletion trunk/include/sound/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* include/version.h. Generated by alsa/ksync script. */
#define CONFIG_SND_VERSION "1.0.15"
#define CONFIG_SND_DATE " (Tue Oct 23 06:09:18 2007 UTC)"
#define CONFIG_SND_DATE " (Tue Nov 20 19:16:42 2007 UTC)"
12 changes: 8 additions & 4 deletions trunk/sound/drivers/mpu401/mpu401_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,27 @@ static void snd_mpu401_uart_clear_rx(struct snd_mpu401 *mpu)

static void uart_interrupt_tx(struct snd_mpu401 *mpu)
{
unsigned long flags;

if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) &&
test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) {
spin_lock(&mpu->output_lock);
spin_lock_irqsave(&mpu->output_lock, flags);
snd_mpu401_uart_output_write(mpu);
spin_unlock(&mpu->output_lock);
spin_unlock_irqrestore(&mpu->output_lock, flags);
}
}

static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu)
{
unsigned long flags;

if (mpu->info_flags & MPU401_INFO_INPUT) {
spin_lock(&mpu->input_lock);
spin_lock_irqsave(&mpu->input_lock, flags);
if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode))
snd_mpu401_uart_input_read(mpu);
else
snd_mpu401_uart_clear_rx(mpu);
spin_unlock(&mpu->input_lock);
spin_unlock_irqrestore(&mpu->input_lock, flags);
}
if (! (mpu->info_flags & MPU401_INFO_TX_IRQ))
/* ok. for better Tx performance try do some output
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/drivers/portman2x4.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ static int __devinit snd_portman_probe_port(struct parport *p)
parport_release(pardev);
parport_unregister_device(pardev);

return res;
return res ? -EIO : 0;
}

static void __devinit snd_portman_attach(struct parport *p)
Expand Down
18 changes: 12 additions & 6 deletions trunk/sound/pci/ca0106/ca0106_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static int snd_ca0106_shared_spdif_get(struct snd_kcontrol *kcontrol,
{
struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol);

ucontrol->value.enumerated.item[0] = emu->spdif_enable;
ucontrol->value.integer.value[0] = emu->spdif_enable;
return 0;
}

Expand All @@ -98,11 +98,11 @@ static int snd_ca0106_shared_spdif_put(struct snd_kcontrol *kcontrol,
int change = 0;
u32 mask;

val = ucontrol->value.enumerated.item[0] ;
val = !!ucontrol->value.integer.value[0];
change = (emu->spdif_enable != val);
if (change) {
emu->spdif_enable = val;
if (val == 1) {
if (val) {
/* Digital */
snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf);
snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x0b000000);
Expand Down Expand Up @@ -159,6 +159,8 @@ static int snd_ca0106_capture_source_put(struct snd_kcontrol *kcontrol,
u32 source;

val = ucontrol->value.enumerated.item[0] ;
if (val >= 6)
return -EINVAL;
change = (emu->capture_source != val);
if (change) {
emu->capture_source = val;
Expand Down Expand Up @@ -207,6 +209,8 @@ static int snd_ca0106_i2c_capture_source_put(struct snd_kcontrol *kcontrol,
* for the particular source.
*/
source_id = ucontrol->value.enumerated.item[0] ;
if (source_id >= 4)
return -EINVAL;
change = (emu->i2c_capture_source != source_id);
if (change) {
snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */
Expand Down Expand Up @@ -271,6 +275,8 @@ static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol,
u32 tmp;

val = ucontrol->value.enumerated.item[0] ;
if (val > 1)
return -EINVAL;
change = (emu->capture_mic_line_in != val);
if (change) {
emu->capture_mic_line_in = val;
Expand Down Expand Up @@ -443,7 +449,7 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol,
ogain = emu->i2c_capture_volume[source_id][0]; /* Left */
ngain = ucontrol->value.integer.value[0];
if (ngain > 0xff)
return 0;
return -EINVAL;
if (ogain != ngain) {
if (emu->i2c_capture_source == source_id)
snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) );
Expand All @@ -453,7 +459,7 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol,
ogain = emu->i2c_capture_volume[source_id][1]; /* Right */
ngain = ucontrol->value.integer.value[1];
if (ngain > 0xff)
return 0;
return -EINVAL;
if (ogain != ngain) {
if (emu->i2c_capture_source == source_id)
snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff));
Expand Down Expand Up @@ -497,7 +503,7 @@ static int spi_mute_put(struct snd_kcontrol *kcontrol,
}

ret = snd_ca0106_spi_write(emu, emu->spi_dac_reg[reg]);
return ret ? -1 : 1;
return ret ? -EINVAL : 1;
}

#define CA_VOLUME(xname,chid,reg) \
Expand Down
4 changes: 1 addition & 3 deletions trunk/sound/pci/ca0106/ca0106_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,11 @@ int __devinit snd_ca0106_proc_init(struct snd_ca0106 * emu)
snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1);
entry->c.text.write = snd_ca0106_proc_reg_write;
entry->mode |= S_IWUSR;
// entry->private_data = emu;
}
if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) {
snd_info_set_text_ops(entry, emu, snd_ca0106_proc_i2c_write);
entry->c.text.write = snd_ca0106_proc_i2c_write;
entry->private_data = emu;
entry->mode |= S_IWUSR;
// entry->private_data = emu;
}
if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry))
snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2);
Expand Down
5 changes: 2 additions & 3 deletions trunk/sound/pci/cmipci.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,9 @@ MODULE_PARM_DESC(joystick_port, "Joystick port address.");
#define CM_MMODE_MASK 0x00000E00 /* model DAA interface mode */
#define CM_SPDIF_SELECT2 0x00000100 /* for model > 039 ? */
#define CM_ENCENTER 0x00000080
#define CM_FLINKON 0x00000080 /* force modem link detection on, model 037 */
#define CM_FLINKON 0x00000040 /* force modem link detection on, model 037 */
#define CM_MUTECH1 0x00000040 /* mute PCI ch1 to DAC */
#define CM_FLINKOFF 0x00000040 /* force modem link detection off, model 037 */
#define CM_UNKNOWN_18_5 0x00000020 /* ? */
#define CM_FLINKOFF 0x00000020 /* force modem link detection off, model 037 */
#define CM_MIDSMP 0x00000010 /* 1/2 interpolation at front end DAC */
#define CM_UPDDMA_MASK 0x0000000C /* TDMA position update notification */
#define CM_UPDDMA_2048 0x00000000
Expand Down
65 changes: 52 additions & 13 deletions trunk/sound/pci/emu10k1/emumixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ static int snd_emu10k1_spdif_get(struct snd_kcontrol *kcontrol,
unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
unsigned long flags;

/* Limit: emu->spdif_bits */
if (idx >= 3)
return -EINVAL;
spin_lock_irqsave(&emu->reg_lock, flags);
ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff;
ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff;
Expand Down Expand Up @@ -272,9 +275,12 @@ static int snd_emu1010_output_source_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int channel;
unsigned int channel;

channel = (kcontrol->private_value) & 0xff;
/* Limit: emu1010_output_dst, emu->emu1010.output_source */
if (channel >= 24)
return -EINVAL;
ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel];
return 0;
}
Expand All @@ -285,11 +291,17 @@ static int snd_emu1010_output_source_put(struct snd_kcontrol *kcontrol,
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int change = 0;
unsigned int val;
int channel;
unsigned int channel;

val = ucontrol->value.enumerated.item[0];
if (val >= 53)
return -EINVAL;
channel = (kcontrol->private_value) & 0xff;
if (emu->emu1010.output_source[channel] != ucontrol->value.enumerated.item[0]) {
val = emu->emu1010.output_source[channel] = ucontrol->value.enumerated.item[0];
/* Limit: emu1010_output_dst, emu->emu1010.output_source */
if (channel >= 24)
return -EINVAL;
if (emu->emu1010.output_source[channel] != val) {
emu->emu1010.output_source[channel] = val;
change = 1;
snd_emu1010_fpga_link_dst_src_write(emu,
emu1010_output_dst[channel], emu1010_src_regs[val]);
Expand All @@ -301,9 +313,12 @@ static int snd_emu1010_input_source_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int channel;
unsigned int channel;

channel = (kcontrol->private_value) & 0xff;
/* Limit: emu1010_input_dst, emu->emu1010.input_source */
if (channel >= 22)
return -EINVAL;
ucontrol->value.enumerated.item[0] = emu->emu1010.input_source[channel];
return 0;
}
Expand All @@ -314,11 +329,17 @@ static int snd_emu1010_input_source_put(struct snd_kcontrol *kcontrol,
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int change = 0;
unsigned int val;
int channel;
unsigned int channel;

val = ucontrol->value.enumerated.item[0];
if (val >= 53)
return -EINVAL;
channel = (kcontrol->private_value) & 0xff;
if (emu->emu1010.input_source[channel] != ucontrol->value.enumerated.item[0]) {
val = emu->emu1010.input_source[channel] = ucontrol->value.enumerated.item[0];
/* Limit: emu1010_input_dst, emu->emu1010.input_source */
if (channel >= 22)
return -EINVAL;
if (emu->emu1010.input_source[channel] != val) {
emu->emu1010.input_source[channel] = val;
change = 1;
snd_emu1010_fpga_link_dst_src_write(emu,
emu1010_input_dst[channel], emu1010_src_regs[val]);
Expand Down Expand Up @@ -533,6 +554,9 @@ static int snd_emu1010_internal_clock_put(struct snd_kcontrol *kcontrol,
int change = 0;

val = ucontrol->value.enumerated.item[0] ;
/* Limit: uinfo->value.enumerated.items = 4; */
if (val >= 4)
return -EINVAL;
change = (emu->emu1010.internal_clock != val);
if (change) {
emu->emu1010.internal_clock = val;
Expand Down Expand Up @@ -669,7 +693,11 @@ static int snd_audigy_i2c_capture_source_put(struct snd_kcontrol *kcontrol,
* update the capture volume from the cached value
* for the particular source.
*/
source_id = ucontrol->value.enumerated.item[0]; /* Use 2 and 3 */
source_id = ucontrol->value.enumerated.item[0];
/* Limit: uinfo->value.enumerated.items = 2; */
/* emu->i2c_capture_volume */
if (source_id >= 2)
return -EINVAL;
change = (emu->i2c_capture_source != source_id);
if (change) {
snd_emu10k1_i2c_write(emu, ADC_MUX, 0); /* Mute input */
Expand Down Expand Up @@ -720,9 +748,13 @@ static int snd_audigy_i2c_volume_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
int source_id;
unsigned int source_id;

source_id = kcontrol->private_value;
/* Limit: emu->i2c_capture_volume */
/* capture_source: uinfo->value.enumerated.items = 2 */
if (source_id >= 2)
return -EINVAL;

ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0];
ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1];
Expand All @@ -735,18 +767,22 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol,
struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
unsigned int ogain;
unsigned int ngain;
int source_id;
unsigned int source_id;
int change = 0;

source_id = kcontrol->private_value;
/* Limit: emu->i2c_capture_volume */
/* capture_source: uinfo->value.enumerated.items = 2 */
if (source_id >= 2)
return -EINVAL;
ogain = emu->i2c_capture_volume[source_id][0]; /* Left */
ngain = ucontrol->value.integer.value[0];
if (ngain > 0xff)
return 0;
if (ogain != ngain) {
if (emu->i2c_capture_source == source_id)
snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) );
emu->i2c_capture_volume[source_id][0] = ucontrol->value.integer.value[0];
emu->i2c_capture_volume[source_id][0] = ngain;
change = 1;
}
ogain = emu->i2c_capture_volume[source_id][1]; /* Right */
Expand All @@ -756,7 +792,7 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol,
if (ogain != ngain) {
if (emu->i2c_capture_source == source_id)
snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff));
emu->i2c_capture_volume[source_id][1] = ucontrol->value.integer.value[1];
emu->i2c_capture_volume[source_id][1] = ngain;
change = 1;
}

Expand Down Expand Up @@ -877,6 +913,9 @@ static int snd_emu10k1_spdif_put(struct snd_kcontrol *kcontrol,
unsigned int val;
unsigned long flags;

/* Limit: emu->spdif_bits */
if (idx >= 3)
return -EINVAL;
val = (ucontrol->value.iec958.status[0] << 0) |
(ucontrol->value.iec958.status[1] << 8) |
(ucontrol->value.iec958.status[2] << 16) |
Expand Down
4 changes: 4 additions & 0 deletions trunk/sound/pci/emu10k1/p16v.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,8 @@ static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol,
u32 source;

val = ucontrol->value.enumerated.item[0] ;
if (val > 7)
return -EINVAL;
change = (emu->p16v_capture_source != val);
if (change) {
emu->p16v_capture_source = val;
Expand Down Expand Up @@ -784,6 +786,8 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
u32 tmp;

val = ucontrol->value.enumerated.item[0] ;
if (val > 3)
return -EINVAL;
change = (emu->p16v_capture_channel != val);
if (change) {
emu->p16v_capture_channel = val;
Expand Down
Loading

0 comments on commit 541d105

Please sign in to comment.