aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-03-02 03:00:33 -0500
committerTakashi Iwai <tiwai@suse.de>2012-03-02 03:00:33 -0500
commit7c589750a70831b8cee3c10e01c297fefde104e3 (patch)
tree871da898d9953dd50c4830400ba1dd0b614ee311
parent07cafff288266c3aa082f4bda3d47989e73ee85d (diff)
parente49a3434f1bc64dc49ff3a56e416bb5894868dde (diff)
Merge branch 'fix/hda' into topic/hda
Speaker-Out renames are merged. Conflicts: sound/pci/hda/patch_realtek.c
-rw-r--r--sound/pci/azt3328.c3
-rw-r--r--sound/pci/hda/hda_codec.c12
-rw-r--r--sound/pci/hda/hda_codec.h3
-rw-r--r--sound/pci/hda/patch_cirrus.c4
-rw-r--r--sound/pci/hda/patch_conexant.c24
-rw-r--r--sound/pci/hda/patch_realtek.c14
-rw-r--r--sound/pci/hda/patch_sigmatel.c2
-rw-r--r--sound/soc/codecs/ak4642.c31
-rw-r--r--sound/soc/codecs/wm8962.c2
-rw-r--r--sound/soc/imx/imx-ssi.c2
-rw-r--r--sound/soc/soc-dapm.c12
-rw-r--r--sound/usb/caiaq/audio.c5
12 files changed, 79 insertions, 35 deletions
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index 95ffa6a9db6e..496f14c1a731 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -2684,10 +2684,9 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
2684 err = snd_opl3_hwdep_new(opl3, 0, 1, NULL); 2684 err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
2685 if (err < 0) 2685 if (err < 0)
2686 goto out_err; 2686 goto out_err;
2687 opl3->private_data = chip;
2687 } 2688 }
2688 2689
2689 opl3->private_data = chip;
2690
2691 sprintf(card->longname, "%s at 0x%lx, irq %i", 2690 sprintf(card->longname, "%s at 0x%lx, irq %i",
2692 card->shortname, chip->ctrl_io, chip->irq); 2691 card->shortname, chip->ctrl_io, chip->irq);
2693 2692
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 65c01798d843..76bac4fc0472 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1759,7 +1759,11 @@ static void put_vol_mute(struct hda_codec *codec, struct hda_amp_info *info,
1759 parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT; 1759 parm = ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT;
1760 parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT; 1760 parm |= direction == HDA_OUTPUT ? AC_AMP_SET_OUTPUT : AC_AMP_SET_INPUT;
1761 parm |= index << AC_AMP_SET_INDEX_SHIFT; 1761 parm |= index << AC_AMP_SET_INDEX_SHIFT;
1762 parm |= val; 1762 if ((val & HDA_AMP_MUTE) && !(info->amp_caps & AC_AMPCAP_MUTE) &&
1763 (info->amp_caps & AC_AMPCAP_MIN_MUTE))
1764 ; /* set the zero value as a fake mute */
1765 else
1766 parm |= val;
1763 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm); 1767 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, parm);
1764 info->vol[ch] = val; 1768 info->vol[ch] = val;
1765} 1769}
@@ -2026,7 +2030,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag,
2026 val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT); 2030 val1 = -((caps & AC_AMPCAP_OFFSET) >> AC_AMPCAP_OFFSET_SHIFT);
2027 val1 += ofs; 2031 val1 += ofs;
2028 val1 = ((int)val1) * ((int)val2); 2032 val1 = ((int)val1) * ((int)val2);
2029 if (min_mute) 2033 if (min_mute || (caps & AC_AMPCAP_MIN_MUTE))
2030 val2 |= TLV_DB_SCALE_MUTE; 2034 val2 |= TLV_DB_SCALE_MUTE;
2031 if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv)) 2035 if (put_user(SNDRV_CTL_TLVT_DB_SCALE, _tlv))
2032 return -EFAULT; 2036 return -EFAULT;
@@ -5123,7 +5127,7 @@ static int fill_audio_out_name(struct hda_codec *codec, hda_nid_t nid,
5123 const char *pfx = "", *sfx = ""; 5127 const char *pfx = "", *sfx = "";
5124 5128
5125 /* handle as a speaker if it's a fixed line-out */ 5129 /* handle as a speaker if it's a fixed line-out */
5126 if (!strcmp(name, "Line-Out") && attr == INPUT_PIN_ATTR_INT) 5130 if (!strcmp(name, "Line Out") && attr == INPUT_PIN_ATTR_INT)
5127 name = "Speaker"; 5131 name = "Speaker";
5128 /* check the location */ 5132 /* check the location */
5129 switch (attr) { 5133 switch (attr) {
@@ -5182,7 +5186,7 @@ int snd_hda_get_pin_label(struct hda_codec *codec, hda_nid_t nid,
5182 5186
5183 switch (get_defcfg_device(def_conf)) { 5187 switch (get_defcfg_device(def_conf)) {
5184 case AC_JACK_LINE_OUT: 5188 case AC_JACK_LINE_OUT:
5185 return fill_audio_out_name(codec, nid, cfg, "Line-Out", 5189 return fill_audio_out_name(codec, nid, cfg, "Line Out",
5186 label, maxlen, indexp); 5190 label, maxlen, indexp);
5187 case AC_JACK_SPEAKER: 5191 case AC_JACK_SPEAKER:
5188 return fill_audio_out_name(codec, nid, cfg, "Speaker", 5192 return fill_audio_out_name(codec, nid, cfg, "Speaker",
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 654d2e41e25d..9a9f372e1be4 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -298,6 +298,9 @@ enum {
298#define AC_AMPCAP_MUTE (1<<31) /* mute capable */ 298#define AC_AMPCAP_MUTE (1<<31) /* mute capable */
299#define AC_AMPCAP_MUTE_SHIFT 31 299#define AC_AMPCAP_MUTE_SHIFT 31
300 300
301/* driver-specific amp-caps: using bits 24-30 */
302#define AC_AMPCAP_MIN_MUTE (1 << 30) /* min-volume = mute */
303
301/* Connection list */ 304/* Connection list */
302#define AC_CLIST_LENGTH (0x7f<<0) 305#define AC_CLIST_LENGTH (0x7f<<0)
303#define AC_CLIST_LONG (1<<7) 306#define AC_CLIST_LONG (1<<7)
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index bc5a993d1146..c83ccdba1e5a 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -609,7 +609,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx,
609 "Front Speaker", "Surround Speaker", "Bass Speaker" 609 "Front Speaker", "Surround Speaker", "Bass Speaker"
610 }; 610 };
611 static const char * const line_outs[] = { 611 static const char * const line_outs[] = {
612 "Front Line-Out", "Surround Line-Out", "Bass Line-Out" 612 "Front Line Out", "Surround Line Out", "Bass Line Out"
613 }; 613 };
614 614
615 fix_volume_caps(codec, dac); 615 fix_volume_caps(codec, dac);
@@ -635,7 +635,7 @@ static int add_output(struct hda_codec *codec, hda_nid_t dac, int idx,
635 if (num_ctls > 1) 635 if (num_ctls > 1)
636 name = line_outs[idx]; 636 name = line_outs[idx];
637 else 637 else
638 name = "Line-Out"; 638 name = "Line Out";
639 break; 639 break;
640 } 640 }
641 641
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index f3b79031fcca..5a56fda83625 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3470,7 +3470,7 @@ static int cx_automute_mode_info(struct snd_kcontrol *kcontrol,
3470 "Disabled", "Enabled" 3470 "Disabled", "Enabled"
3471 }; 3471 };
3472 static const char * const texts3[] = { 3472 static const char * const texts3[] = {
3473 "Disabled", "Speaker Only", "Line-Out+Speaker" 3473 "Disabled", "Speaker Only", "Line Out+Speaker"
3474 }; 3474 };
3475 const char * const *texts; 3475 const char * const *texts;
3476 3476
@@ -4112,7 +4112,8 @@ static int cx_auto_add_volume_idx(struct hda_codec *codec, const char *basename,
4112 err = snd_hda_ctl_add(codec, nid, kctl); 4112 err = snd_hda_ctl_add(codec, nid, kctl);
4113 if (err < 0) 4113 if (err < 0)
4114 return err; 4114 return err;
4115 if (!(query_amp_caps(codec, nid, hda_dir) & AC_AMPCAP_MUTE)) 4115 if (!(query_amp_caps(codec, nid, hda_dir) &
4116 (AC_AMPCAP_MUTE | AC_AMPCAP_MIN_MUTE)))
4116 break; 4117 break;
4117 } 4118 }
4118 return 0; 4119 return 0;
@@ -4413,6 +4414,22 @@ static const struct snd_pci_quirk cxt_fixups[] = {
4413 {} 4414 {}
4414}; 4415};
4415 4416
4417/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
4418 * can be created (bko#42825)
4419 */
4420static void add_cx5051_fake_mutes(struct hda_codec *codec)
4421{
4422 static hda_nid_t out_nids[] = {
4423 0x10, 0x11, 0
4424 };
4425 hda_nid_t *p;
4426
4427 for (p = out_nids; *p; p++)
4428 snd_hda_override_amp_caps(codec, *p, HDA_OUTPUT,
4429 AC_AMPCAP_MIN_MUTE |
4430 query_amp_caps(codec, *p, HDA_OUTPUT));
4431}
4432
4416static int patch_conexant_auto(struct hda_codec *codec) 4433static int patch_conexant_auto(struct hda_codec *codec)
4417{ 4434{
4418 struct conexant_spec *spec; 4435 struct conexant_spec *spec;
@@ -4431,6 +4448,9 @@ static int patch_conexant_auto(struct hda_codec *codec)
4431 case 0x14f15045: 4448 case 0x14f15045:
4432 spec->single_adc_amp = 1; 4449 spec->single_adc_amp = 1;
4433 break; 4450 break;
4451 case 0x14f15051:
4452 add_cx5051_fake_mutes(codec);
4453 break;
4434 } 4454 }
4435 4455
4436 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl); 4456 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e142f6f5c499..01179d53edcd 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -841,7 +841,7 @@ static int alc_automute_mode_info(struct snd_kcontrol *kcontrol,
841 "Disabled", "Enabled" 841 "Disabled", "Enabled"
842 }; 842 };
843 static const char * const texts3[] = { 843 static const char * const texts3[] = {
844 "Disabled", "Speaker Only", "Line-Out+Speaker" 844 "Disabled", "Speaker Only", "Line Out+Speaker"
845 }; 845 };
846 const char * const *texts; 846 const char * const *texts;
847 847
@@ -1856,7 +1856,7 @@ DEFINE_CAPMIX_NOSRC(3);
1856 */ 1856 */
1857static const char * const alc_slave_pfxs[] = { 1857static const char * const alc_slave_pfxs[] = {
1858 "Front", "Surround", "Center", "LFE", "Side", 1858 "Front", "Surround", "Center", "LFE", "Side",
1859 "Headphone", "Speaker", "Mono", "Line-Out", 1859 "Headphone", "Speaker", "Mono", "Line Out",
1860 "CLFE", "Bass Speaker", "PCM", 1860 "CLFE", "Bass Speaker", "PCM",
1861 NULL, 1861 NULL,
1862}; 1862};
@@ -4147,7 +4147,7 @@ static void alc_auto_init_input_src(struct hda_codec *codec)
4147 else 4147 else
4148 nums = spec->num_adc_nids; 4148 nums = spec->num_adc_nids;
4149 for (c = 0; c < nums; c++) 4149 for (c = 0; c < nums; c++)
4150 alc_mux_select(codec, 0, spec->cur_mux[c], true); 4150 alc_mux_select(codec, c, spec->cur_mux[c], true);
4151} 4151}
4152 4152
4153/* add mic boosts if needed */ 4153/* add mic boosts if needed */
@@ -5082,12 +5082,20 @@ static void alc889_fixup_dac_route(struct hda_codec *codec,
5082 const struct alc_fixup *fix, int action) 5082 const struct alc_fixup *fix, int action)
5083{ 5083{
5084 if (action == ALC_FIXUP_ACT_PRE_PROBE) { 5084 if (action == ALC_FIXUP_ACT_PRE_PROBE) {
5085 /* fake the connections during parsing the tree */
5085 hda_nid_t conn1[2] = { 0x0c, 0x0d }; 5086 hda_nid_t conn1[2] = { 0x0c, 0x0d };
5086 hda_nid_t conn2[2] = { 0x0e, 0x0f }; 5087 hda_nid_t conn2[2] = { 0x0e, 0x0f };
5087 snd_hda_override_conn_list(codec, 0x14, 2, conn1); 5088 snd_hda_override_conn_list(codec, 0x14, 2, conn1);
5088 snd_hda_override_conn_list(codec, 0x15, 2, conn1); 5089 snd_hda_override_conn_list(codec, 0x15, 2, conn1);
5089 snd_hda_override_conn_list(codec, 0x18, 2, conn2); 5090 snd_hda_override_conn_list(codec, 0x18, 2, conn2);
5090 snd_hda_override_conn_list(codec, 0x1a, 2, conn2); 5091 snd_hda_override_conn_list(codec, 0x1a, 2, conn2);
5092 } else if (action == ALC_FIXUP_ACT_PROBE) {
5093 /* restore the connections */
5094 hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 };
5095 snd_hda_override_conn_list(codec, 0x14, 5, conn);
5096 snd_hda_override_conn_list(codec, 0x15, 5, conn);
5097 snd_hda_override_conn_list(codec, 0x18, 5, conn);
5098 snd_hda_override_conn_list(codec, 0x1a, 5, conn);
5091 } 5099 }
5092} 5100}
5093 5101
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 8c346ac59d46..5988dbdedc4e 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4638,7 +4638,7 @@ static void stac92xx_hp_detect(struct hda_codec *codec)
4638 unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN; 4638 unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN;
4639 if (no_hp_sensing(spec, i)) 4639 if (no_hp_sensing(spec, i))
4640 continue; 4640 continue;
4641 if (presence) 4641 if (1 /*presence*/)
4642 stac92xx_set_pinctl(codec, cfg->hp_pins[i], val); 4642 stac92xx_set_pinctl(codec, cfg->hp_pins[i], val);
4643#if 0 /* FIXME */ 4643#if 0 /* FIXME */
4644/* Resetting the pinctl like below may lead to (a sort of) regressions 4644/* Resetting the pinctl like below may lead to (a sort of) regressions
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 5ef70b5d27e4..278c0a0575f5 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -146,13 +146,10 @@ static const struct snd_kcontrol_new ak4642_snd_controls[] = {
146 146
147 SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC, 147 SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC,
148 0, 0xFF, 1, out_tlv), 148 0, 0xFF, 1, out_tlv),
149
150 SOC_SINGLE("Headphone Switch", PW_MGMT2, 6, 1, 0),
151}; 149};
152 150
153static const struct snd_kcontrol_new ak4642_hpout_mixer_controls[] = { 151static const struct snd_kcontrol_new ak4642_headphone_control =
154 SOC_DAPM_SINGLE("DACH", MD_CTL4, 0, 1, 0), 152 SOC_DAPM_SINGLE("Switch", PW_MGMT2, 6, 1, 0);
155};
156 153
157static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = { 154static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = {
158 SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0), 155 SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0),
@@ -165,13 +162,12 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = {
165 SND_SOC_DAPM_OUTPUT("HPOUTR"), 162 SND_SOC_DAPM_OUTPUT("HPOUTR"),
166 SND_SOC_DAPM_OUTPUT("LINEOUT"), 163 SND_SOC_DAPM_OUTPUT("LINEOUT"),
167 164
168 SND_SOC_DAPM_MIXER("HPOUTL Mixer", PW_MGMT2, 5, 0, 165 SND_SOC_DAPM_PGA("HPL Out", PW_MGMT2, 5, 0, NULL, 0),
169 &ak4642_hpout_mixer_controls[0], 166 SND_SOC_DAPM_PGA("HPR Out", PW_MGMT2, 4, 0, NULL, 0),
170 ARRAY_SIZE(ak4642_hpout_mixer_controls)), 167 SND_SOC_DAPM_SWITCH("Headphone Enable", SND_SOC_NOPM, 0, 0,
168 &ak4642_headphone_control),
171 169
172 SND_SOC_DAPM_MIXER("HPOUTR Mixer", PW_MGMT2, 4, 0, 170 SND_SOC_DAPM_PGA("DACH", MD_CTL4, 0, 0, NULL, 0),
173 &ak4642_hpout_mixer_controls[0],
174 ARRAY_SIZE(ak4642_hpout_mixer_controls)),
175 171
176 SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0, 172 SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0,
177 &ak4642_lout_mixer_controls[0], 173 &ak4642_lout_mixer_controls[0],
@@ -184,12 +180,17 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = {
184static const struct snd_soc_dapm_route ak4642_intercon[] = { 180static const struct snd_soc_dapm_route ak4642_intercon[] = {
185 181
186 /* Outputs */ 182 /* Outputs */
187 {"HPOUTL", NULL, "HPOUTL Mixer"}, 183 {"HPOUTL", NULL, "HPL Out"},
188 {"HPOUTR", NULL, "HPOUTR Mixer"}, 184 {"HPOUTR", NULL, "HPR Out"},
189 {"LINEOUT", NULL, "LINEOUT Mixer"}, 185 {"LINEOUT", NULL, "LINEOUT Mixer"},
190 186
191 {"HPOUTL Mixer", "DACH", "DAC"}, 187 {"HPL Out", NULL, "Headphone Enable"},
192 {"HPOUTR Mixer", "DACH", "DAC"}, 188 {"HPR Out", NULL, "Headphone Enable"},
189
190 {"Headphone Enable", "Switch", "DACH"},
191
192 {"DACH", NULL, "DAC"},
193
193 {"LINEOUT Mixer", "DACL", "DAC"}, 194 {"LINEOUT Mixer", "DACL", "DAC"},
194}; 195};
195 196
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 29c4b02c4790..0ac228b7dc04 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -2564,7 +2564,7 @@ static int dsp2_event(struct snd_soc_dapm_widget *w,
2564 return 0; 2564 return 0;
2565} 2565}
2566 2566
2567static const char *st_text[] = { "None", "Right", "Left" }; 2567static const char *st_text[] = { "None", "Left", "Right" };
2568 2568
2569static const struct soc_enum str_enum = 2569static const struct soc_enum str_enum =
2570 SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); 2570 SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text);
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
index 01d1f749cf02..b6adbed6e506 100644
--- a/sound/soc/imx/imx-ssi.c
+++ b/sound/soc/imx/imx-ssi.c
@@ -112,7 +112,7 @@ static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
112 break; 112 break;
113 case SND_SOC_DAIFMT_DSP_A: 113 case SND_SOC_DAIFMT_DSP_A:
114 /* data on rising edge of bclk, frame high 1clk before data */ 114 /* data on rising edge of bclk, frame high 1clk before data */
115 strcr |= SSI_STCR_TFSL | SSI_STCR_TEFS; 115 strcr |= SSI_STCR_TFSL | SSI_STCR_TXBIT0 | SSI_STCR_TEFS;
116 break; 116 break;
117 } 117 }
118 118
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1f55ded4047f..1315663c1c09 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3068,9 +3068,13 @@ static void soc_dapm_shutdown_codec(struct snd_soc_dapm_context *dapm)
3068 * standby. 3068 * standby.
3069 */ 3069 */
3070 if (powerdown) { 3070 if (powerdown) {
3071 snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_PREPARE); 3071 if (dapm->bias_level == SND_SOC_BIAS_ON)
3072 snd_soc_dapm_set_bias_level(dapm,
3073 SND_SOC_BIAS_PREPARE);
3072 dapm_seq_run(dapm, &down_list, 0, false); 3074 dapm_seq_run(dapm, &down_list, 0, false);
3073 snd_soc_dapm_set_bias_level(dapm, SND_SOC_BIAS_STANDBY); 3075 if (dapm->bias_level == SND_SOC_BIAS_PREPARE)
3076 snd_soc_dapm_set_bias_level(dapm,
3077 SND_SOC_BIAS_STANDBY);
3074 } 3078 }
3075} 3079}
3076 3080
@@ -3083,7 +3087,9 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card)
3083 3087
3084 list_for_each_entry(codec, &card->codec_dev_list, list) { 3088 list_for_each_entry(codec, &card->codec_dev_list, list) {
3085 soc_dapm_shutdown_codec(&codec->dapm); 3089 soc_dapm_shutdown_codec(&codec->dapm);
3086 snd_soc_dapm_set_bias_level(&codec->dapm, SND_SOC_BIAS_OFF); 3090 if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY)
3091 snd_soc_dapm_set_bias_level(&codec->dapm,
3092 SND_SOC_BIAS_OFF);
3087 } 3093 }
3088} 3094}
3089 3095
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
index 2cf87f5afed4..fde9a7a29cb6 100644
--- a/sound/usb/caiaq/audio.c
+++ b/sound/usb/caiaq/audio.c
@@ -311,8 +311,10 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub)
311 311
312 spin_lock(&dev->spinlock); 312 spin_lock(&dev->spinlock);
313 313
314 if (dev->input_panic || dev->output_panic) 314 if (dev->input_panic || dev->output_panic) {
315 ptr = SNDRV_PCM_POS_XRUN; 315 ptr = SNDRV_PCM_POS_XRUN;
316 goto unlock;
317 }
316 318
317 if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) 319 if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK)
318 ptr = bytes_to_frames(sub->runtime, 320 ptr = bytes_to_frames(sub->runtime,
@@ -321,6 +323,7 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub)
321 ptr = bytes_to_frames(sub->runtime, 323 ptr = bytes_to_frames(sub->runtime,
322 dev->audio_in_buf_pos[index]); 324 dev->audio_in_buf_pos[index]);
323 325
326unlock:
324 spin_unlock(&dev->spinlock); 327 spin_unlock(&dev->spinlock);
325 return ptr; 328 return ptr;
326} 329}