aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-07 03:28:47 -0400
committerTakashi Iwai <tiwai@suse.de>2011-07-07 03:28:47 -0400
commit8e89995c58644682302fe9e298a9e30ff38d01a1 (patch)
treeefebb038c81d80c930fc1f52a398797ce8e20539
parentb68785714b67079385188323631b05a8f9093675 (diff)
parent9c7a083d94656ad6d6f2e03ba90194f2cc5bced5 (diff)
Merge branch 'fix/hda' into topic/hda
-rw-r--r--include/sound/sb16_csp.h9
-rw-r--r--sound/atmel/abdac.c2
-rw-r--r--sound/atmel/ac97c.c2
-rw-r--r--sound/pci/cs5535audio/cs5535audio_pcm.c4
-rw-r--r--sound/pci/hda/hda_eld.c2
-rw-r--r--sound/pci/hda/patch_realtek.c33
-rw-r--r--sound/pci/rme9652/hdspm.c8
-rw-r--r--sound/spi/at73c213.c2
8 files changed, 41 insertions, 21 deletions
diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h
index 736eac71d05..af1b49e982d 100644
--- a/include/sound/sb16_csp.h
+++ b/include/sound/sb16_csp.h
@@ -99,7 +99,14 @@ struct snd_sb_csp_info {
99/* get CSP information */ 99/* get CSP information */
100#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) 100#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info)
101/* load microcode to CSP */ 101/* load microcode to CSP */
102#define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOW('H', 0x11, struct snd_sb_csp_microcode) 102/* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits)
103 * defined for some architectures like MIPS, and it leads to build errors.
104 * (x86 and co have 14-bit size, thus it's valid, though.)
105 * As a workaround for skipping the size-limit check, here we don't use the
106 * normal _IOW() macro but _IOC() with the manual argument.
107 */
108#define SNDRV_SB_CSP_IOCTL_LOAD_CODE \
109 _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
103/* unload microcode from CSP */ 110/* unload microcode from CSP */
104#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) 111#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
105/* start CSP */ 112/* start CSP */
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 6e240918189..bfee60c4d4c 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -599,4 +599,4 @@ module_exit(atmel_abdac_exit);
599 599
600MODULE_LICENSE("GPL"); 600MODULE_LICENSE("GPL");
601MODULE_DESCRIPTION("Driver for Atmel Audio Bitstream DAC (ABDAC)"); 601MODULE_DESCRIPTION("Driver for Atmel Audio Bitstream DAC (ABDAC)");
602MODULE_AUTHOR("Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>"); 602MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index b310702c646..ac35222ad0d 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -1199,4 +1199,4 @@ module_exit(atmel_ac97c_exit);
1199 1199
1200MODULE_LICENSE("GPL"); 1200MODULE_LICENSE("GPL");
1201MODULE_DESCRIPTION("Driver for Atmel AC97 controller"); 1201MODULE_DESCRIPTION("Driver for Atmel AC97 controller");
1202MODULE_AUTHOR("Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>"); 1202MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c
index f16bc8aad6e..e083122ca55 100644
--- a/sound/pci/cs5535audio/cs5535audio_pcm.c
+++ b/sound/pci/cs5535audio/cs5535audio_pcm.c
@@ -149,7 +149,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
149 &((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i]; 149 &((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i];
150 desc->addr = cpu_to_le32(addr); 150 desc->addr = cpu_to_le32(addr);
151 desc->size = cpu_to_le32(period_bytes); 151 desc->size = cpu_to_le32(period_bytes);
152 desc->ctlreserved = cpu_to_le32(PRD_EOP); 152 desc->ctlreserved = cpu_to_le16(PRD_EOP);
153 desc_addr += sizeof(struct cs5535audio_dma_desc); 153 desc_addr += sizeof(struct cs5535audio_dma_desc);
154 addr += period_bytes; 154 addr += period_bytes;
155 } 155 }
@@ -157,7 +157,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
157 lastdesc = &((struct cs5535audio_dma_desc *) dma->desc_buf.area)[periods]; 157 lastdesc = &((struct cs5535audio_dma_desc *) dma->desc_buf.area)[periods];
158 lastdesc->addr = cpu_to_le32((u32) dma->desc_buf.addr); 158 lastdesc->addr = cpu_to_le32((u32) dma->desc_buf.addr);
159 lastdesc->size = 0; 159 lastdesc->size = 0;
160 lastdesc->ctlreserved = cpu_to_le32(PRD_JMP); 160 lastdesc->ctlreserved = cpu_to_le16(PRD_JMP);
161 jmpprd_addr = cpu_to_le32(lastdesc->addr + 161 jmpprd_addr = cpu_to_le32(lastdesc->addr +
162 (sizeof(struct cs5535audio_dma_desc)*periods)); 162 (sizeof(struct cs5535audio_dma_desc)*periods));
163 163
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index 473cfa13a30..28ce17d09c3 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -294,7 +294,7 @@ static int hdmi_update_eld(struct hdmi_eld *e,
294 snd_printd(KERN_INFO "HDMI: out of range MNL %d\n", mnl); 294 snd_printd(KERN_INFO "HDMI: out of range MNL %d\n", mnl);
295 goto out_fail; 295 goto out_fail;
296 } else 296 } else
297 strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl); 297 strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl + 1);
298 298
299 for (i = 0; i < e->sad_count; i++) { 299 for (i = 0; i < e->sad_count; i++) {
300 if (ELD_FIXED_BYTES + mnl + 3 * (i + 1) > size) { 300 if (ELD_FIXED_BYTES + mnl + 3 * (i + 1) > size) {
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 575ffc9fedb..49f39699ea1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2707,17 +2707,30 @@ typedef int (*getput_call_t)(struct snd_kcontrol *kcontrol,
2707 2707
2708static int alc_cap_getput_caller(struct snd_kcontrol *kcontrol, 2708static int alc_cap_getput_caller(struct snd_kcontrol *kcontrol,
2709 struct snd_ctl_elem_value *ucontrol, 2709 struct snd_ctl_elem_value *ucontrol,
2710 getput_call_t func) 2710 getput_call_t func, bool check_adc_switch)
2711{ 2711{
2712 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2712 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2713 struct alc_spec *spec = codec->spec; 2713 struct alc_spec *spec = codec->spec;
2714 unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 2714 int i, err;
2715 int err;
2716 2715
2717 mutex_lock(&codec->control_mutex); 2716 mutex_lock(&codec->control_mutex);
2718 kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[adc_idx], 2717 if (check_adc_switch && spec->dual_adc_switch) {
2719 3, 0, HDA_INPUT); 2718 for (i = 0; i < spec->num_adc_nids; i++) {
2720 err = func(kcontrol, ucontrol); 2719 kcontrol->private_value =
2720 HDA_COMPOSE_AMP_VAL(spec->adc_nids[i],
2721 3, 0, HDA_INPUT);
2722 err = func(kcontrol, ucontrol);
2723 if (err < 0)
2724 goto error;
2725 }
2726 } else {
2727 i = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
2728 kcontrol->private_value =
2729 HDA_COMPOSE_AMP_VAL(spec->adc_nids[i],
2730 3, 0, HDA_INPUT);
2731 err = func(kcontrol, ucontrol);
2732 }
2733 error:
2721 mutex_unlock(&codec->control_mutex); 2734 mutex_unlock(&codec->control_mutex);
2722 return err; 2735 return err;
2723} 2736}
@@ -2726,14 +2739,14 @@ static int alc_cap_vol_get(struct snd_kcontrol *kcontrol,
2726 struct snd_ctl_elem_value *ucontrol) 2739 struct snd_ctl_elem_value *ucontrol)
2727{ 2740{
2728 return alc_cap_getput_caller(kcontrol, ucontrol, 2741 return alc_cap_getput_caller(kcontrol, ucontrol,
2729 snd_hda_mixer_amp_volume_get); 2742 snd_hda_mixer_amp_volume_get, false);
2730} 2743}
2731 2744
2732static int alc_cap_vol_put(struct snd_kcontrol *kcontrol, 2745static int alc_cap_vol_put(struct snd_kcontrol *kcontrol,
2733 struct snd_ctl_elem_value *ucontrol) 2746 struct snd_ctl_elem_value *ucontrol)
2734{ 2747{
2735 return alc_cap_getput_caller(kcontrol, ucontrol, 2748 return alc_cap_getput_caller(kcontrol, ucontrol,
2736 snd_hda_mixer_amp_volume_put); 2749 snd_hda_mixer_amp_volume_put, true);
2737} 2750}
2738 2751
2739/* capture mixer elements */ 2752/* capture mixer elements */
@@ -2743,14 +2756,14 @@ static int alc_cap_sw_get(struct snd_kcontrol *kcontrol,
2743 struct snd_ctl_elem_value *ucontrol) 2756 struct snd_ctl_elem_value *ucontrol)
2744{ 2757{
2745 return alc_cap_getput_caller(kcontrol, ucontrol, 2758 return alc_cap_getput_caller(kcontrol, ucontrol,
2746 snd_hda_mixer_amp_switch_get); 2759 snd_hda_mixer_amp_switch_get, false);
2747} 2760}
2748 2761
2749static int alc_cap_sw_put(struct snd_kcontrol *kcontrol, 2762static int alc_cap_sw_put(struct snd_kcontrol *kcontrol,
2750 struct snd_ctl_elem_value *ucontrol) 2763 struct snd_ctl_elem_value *ucontrol)
2751{ 2764{
2752 return alc_cap_getput_caller(kcontrol, ucontrol, 2765 return alc_cap_getput_caller(kcontrol, ucontrol,
2753 snd_hda_mixer_amp_switch_put); 2766 snd_hda_mixer_amp_switch_put, true);
2754} 2767}
2755 2768
2756#define _DEFINE_CAPMIX(num) \ 2769#define _DEFINE_CAPMIX(num) \
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 3f08afc0f0d..c8e402fc378 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -896,11 +896,11 @@ struct hdspm {
896 unsigned char max_channels_in; 896 unsigned char max_channels_in;
897 unsigned char max_channels_out; 897 unsigned char max_channels_out;
898 898
899 char *channel_map_in; 899 signed char *channel_map_in;
900 char *channel_map_out; 900 signed char *channel_map_out;
901 901
902 char *channel_map_in_ss, *channel_map_in_ds, *channel_map_in_qs; 902 signed char *channel_map_in_ss, *channel_map_in_ds, *channel_map_in_qs;
903 char *channel_map_out_ss, *channel_map_out_ds, *channel_map_out_qs; 903 signed char *channel_map_out_ss, *channel_map_out_ds, *channel_map_out_qs;
904 904
905 char **port_names_in; 905 char **port_names_in;
906 char **port_names_out; 906 char **port_names_out;
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c
index 337a00241a1..4dd051bdf4f 100644
--- a/sound/spi/at73c213.c
+++ b/sound/spi/at73c213.c
@@ -1124,6 +1124,6 @@ static void __exit at73c213_exit(void)
1124} 1124}
1125module_exit(at73c213_exit); 1125module_exit(at73c213_exit);
1126 1126
1127MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); 1127MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
1128MODULE_DESCRIPTION("Sound driver for AT73C213 with Atmel SSC"); 1128MODULE_DESCRIPTION("Sound driver for AT73C213 with Atmel SSC");
1129MODULE_LICENSE("GPL"); 1129MODULE_LICENSE("GPL");