diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/atmel/abdac.c | 2 | ||||
-rw-r--r-- | sound/atmel/ac97c.c | 2 | ||||
-rw-r--r-- | sound/pci/cs5535audio/cs5535audio_pcm.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/hda_eld.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 4 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 33 | ||||
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 8 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s-pcm.c | 13 | ||||
-rw-r--r-- | sound/soc/codecs/ak4642.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic26.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8731.c | 29 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 5 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_i2s.c | 6 | ||||
-rw-r--r-- | sound/spi/at73c213.c | 2 |
16 files changed, 82 insertions, 55 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c index 6e2409181895..bfee60c4d4c0 100644 --- a/sound/atmel/abdac.c +++ b/sound/atmel/abdac.c | |||
@@ -599,4 +599,4 @@ module_exit(atmel_abdac_exit); | |||
599 | 599 | ||
600 | MODULE_LICENSE("GPL"); | 600 | MODULE_LICENSE("GPL"); |
601 | MODULE_DESCRIPTION("Driver for Atmel Audio Bitstream DAC (ABDAC)"); | 601 | MODULE_DESCRIPTION("Driver for Atmel Audio Bitstream DAC (ABDAC)"); |
602 | MODULE_AUTHOR("Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>"); | 602 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index b310702c646e..ac35222ad0dd 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -1199,4 +1199,4 @@ module_exit(atmel_ac97c_exit); | |||
1199 | 1199 | ||
1200 | MODULE_LICENSE("GPL"); | 1200 | MODULE_LICENSE("GPL"); |
1201 | MODULE_DESCRIPTION("Driver for Atmel AC97 controller"); | 1201 | MODULE_DESCRIPTION("Driver for Atmel AC97 controller"); |
1202 | MODULE_AUTHOR("Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>"); | 1202 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
diff --git a/sound/pci/cs5535audio/cs5535audio_pcm.c b/sound/pci/cs5535audio/cs5535audio_pcm.c index f16bc8aad6ed..e083122ca55a 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 b05f7be9dc1b..e3e853153d14 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_conexant.c b/sound/pci/hda/patch_conexant.c index 694b9daf691f..7bbc5f237a5e 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3074,6 +3074,7 @@ static const char * const cxt5066_models[CXT5066_MODELS] = { | |||
3074 | }; | 3074 | }; |
3075 | 3075 | ||
3076 | static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { | 3076 | static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { |
3077 | SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT5066_AUTO), | ||
3077 | SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), | 3078 | SND_PCI_QUIRK_MASK(0x1025, 0xff00, 0x0400, "Acer", CXT5066_IDEAPAD), |
3078 | SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), | 3079 | SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTRO), |
3079 | SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD), | 3080 | SND_PCI_QUIRK(0x1028, 0x02f5, "Dell Vostro 320", CXT5066_IDEAPAD), |
@@ -4389,6 +4390,8 @@ static const struct hda_codec_preset snd_hda_preset_conexant[] = { | |||
4389 | .patch = patch_cxt5066 }, | 4390 | .patch = patch_cxt5066 }, |
4390 | { .id = 0x14f15069, .name = "CX20585", | 4391 | { .id = 0x14f15069, .name = "CX20585", |
4391 | .patch = patch_cxt5066 }, | 4392 | .patch = patch_cxt5066 }, |
4393 | { .id = 0x14f1506c, .name = "CX20588", | ||
4394 | .patch = patch_cxt5066 }, | ||
4392 | { .id = 0x14f1506e, .name = "CX20590", | 4395 | { .id = 0x14f1506e, .name = "CX20590", |
4393 | .patch = patch_cxt5066 }, | 4396 | .patch = patch_cxt5066 }, |
4394 | { .id = 0x14f15097, .name = "CX20631", | 4397 | { .id = 0x14f15097, .name = "CX20631", |
@@ -4417,6 +4420,7 @@ MODULE_ALIAS("snd-hda-codec-id:14f15066"); | |||
4417 | MODULE_ALIAS("snd-hda-codec-id:14f15067"); | 4420 | MODULE_ALIAS("snd-hda-codec-id:14f15067"); |
4418 | MODULE_ALIAS("snd-hda-codec-id:14f15068"); | 4421 | MODULE_ALIAS("snd-hda-codec-id:14f15068"); |
4419 | MODULE_ALIAS("snd-hda-codec-id:14f15069"); | 4422 | MODULE_ALIAS("snd-hda-codec-id:14f15069"); |
4423 | MODULE_ALIAS("snd-hda-codec-id:14f1506c"); | ||
4420 | MODULE_ALIAS("snd-hda-codec-id:14f1506e"); | 4424 | MODULE_ALIAS("snd-hda-codec-id:14f1506e"); |
4421 | MODULE_ALIAS("snd-hda-codec-id:14f15097"); | 4425 | MODULE_ALIAS("snd-hda-codec-id:14f15097"); |
4422 | MODULE_ALIAS("snd-hda-codec-id:14f15098"); | 4426 | MODULE_ALIAS("snd-hda-codec-id:14f15098"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d21191dcfe88..b48fb43b5448 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2715,17 +2715,30 @@ typedef int (*getput_call_t)(struct snd_kcontrol *kcontrol, | |||
2715 | 2715 | ||
2716 | static int alc_cap_getput_caller(struct snd_kcontrol *kcontrol, | 2716 | static int alc_cap_getput_caller(struct snd_kcontrol *kcontrol, |
2717 | struct snd_ctl_elem_value *ucontrol, | 2717 | struct snd_ctl_elem_value *ucontrol, |
2718 | getput_call_t func) | 2718 | getput_call_t func, bool check_adc_switch) |
2719 | { | 2719 | { |
2720 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 2720 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
2721 | struct alc_spec *spec = codec->spec; | 2721 | struct alc_spec *spec = codec->spec; |
2722 | unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 2722 | int i, err = 0; |
2723 | int err; | ||
2724 | 2723 | ||
2725 | mutex_lock(&codec->control_mutex); | 2724 | mutex_lock(&codec->control_mutex); |
2726 | kcontrol->private_value = HDA_COMPOSE_AMP_VAL(spec->adc_nids[adc_idx], | 2725 | if (check_adc_switch && spec->dual_adc_switch) { |
2727 | 3, 0, HDA_INPUT); | 2726 | for (i = 0; i < spec->num_adc_nids; i++) { |
2728 | err = func(kcontrol, ucontrol); | 2727 | kcontrol->private_value = |
2728 | HDA_COMPOSE_AMP_VAL(spec->adc_nids[i], | ||
2729 | 3, 0, HDA_INPUT); | ||
2730 | err = func(kcontrol, ucontrol); | ||
2731 | if (err < 0) | ||
2732 | goto error; | ||
2733 | } | ||
2734 | } else { | ||
2735 | i = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | ||
2736 | kcontrol->private_value = | ||
2737 | HDA_COMPOSE_AMP_VAL(spec->adc_nids[i], | ||
2738 | 3, 0, HDA_INPUT); | ||
2739 | err = func(kcontrol, ucontrol); | ||
2740 | } | ||
2741 | error: | ||
2729 | mutex_unlock(&codec->control_mutex); | 2742 | mutex_unlock(&codec->control_mutex); |
2730 | return err; | 2743 | return err; |
2731 | } | 2744 | } |
@@ -2734,14 +2747,14 @@ static int alc_cap_vol_get(struct snd_kcontrol *kcontrol, | |||
2734 | struct snd_ctl_elem_value *ucontrol) | 2747 | struct snd_ctl_elem_value *ucontrol) |
2735 | { | 2748 | { |
2736 | return alc_cap_getput_caller(kcontrol, ucontrol, | 2749 | return alc_cap_getput_caller(kcontrol, ucontrol, |
2737 | snd_hda_mixer_amp_volume_get); | 2750 | snd_hda_mixer_amp_volume_get, false); |
2738 | } | 2751 | } |
2739 | 2752 | ||
2740 | static int alc_cap_vol_put(struct snd_kcontrol *kcontrol, | 2753 | static int alc_cap_vol_put(struct snd_kcontrol *kcontrol, |
2741 | struct snd_ctl_elem_value *ucontrol) | 2754 | struct snd_ctl_elem_value *ucontrol) |
2742 | { | 2755 | { |
2743 | return alc_cap_getput_caller(kcontrol, ucontrol, | 2756 | return alc_cap_getput_caller(kcontrol, ucontrol, |
2744 | snd_hda_mixer_amp_volume_put); | 2757 | snd_hda_mixer_amp_volume_put, true); |
2745 | } | 2758 | } |
2746 | 2759 | ||
2747 | /* capture mixer elements */ | 2760 | /* capture mixer elements */ |
@@ -2751,14 +2764,14 @@ static int alc_cap_sw_get(struct snd_kcontrol *kcontrol, | |||
2751 | struct snd_ctl_elem_value *ucontrol) | 2764 | struct snd_ctl_elem_value *ucontrol) |
2752 | { | 2765 | { |
2753 | return alc_cap_getput_caller(kcontrol, ucontrol, | 2766 | return alc_cap_getput_caller(kcontrol, ucontrol, |
2754 | snd_hda_mixer_amp_switch_get); | 2767 | snd_hda_mixer_amp_switch_get, false); |
2755 | } | 2768 | } |
2756 | 2769 | ||
2757 | static int alc_cap_sw_put(struct snd_kcontrol *kcontrol, | 2770 | static int alc_cap_sw_put(struct snd_kcontrol *kcontrol, |
2758 | struct snd_ctl_elem_value *ucontrol) | 2771 | struct snd_ctl_elem_value *ucontrol) |
2759 | { | 2772 | { |
2760 | return alc_cap_getput_caller(kcontrol, ucontrol, | 2773 | return alc_cap_getput_caller(kcontrol, ucontrol, |
2761 | snd_hda_mixer_amp_switch_put); | 2774 | snd_hda_mixer_amp_switch_put, true); |
2762 | } | 2775 | } |
2763 | 2776 | ||
2764 | #define _DEFINE_CAPMIX(num) \ | 2777 | #define _DEFINE_CAPMIX(num) \ |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 3f08afc0f0d3..c8e402fc3782 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/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c index b5101efd1c87..f1fd95bb6416 100644 --- a/sound/soc/blackfin/bf5xx-i2s-pcm.c +++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c | |||
@@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) | |||
138 | pr_debug("%s enter\n", __func__); | 138 | pr_debug("%s enter\n", __func__); |
139 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { | 139 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { |
140 | diff = sport_curr_offset_tx(sport); | 140 | diff = sport_curr_offset_tx(sport); |
141 | frames = bytes_to_frames(substream->runtime, diff); | ||
142 | } else { | 141 | } else { |
143 | diff = sport_curr_offset_rx(sport); | 142 | diff = sport_curr_offset_rx(sport); |
144 | frames = bytes_to_frames(substream->runtime, diff); | ||
145 | } | 143 | } |
144 | |||
145 | /* | ||
146 | * TX at least can report one frame beyond the end of the | ||
147 | * buffer if we hit the wraparound case - clamp to within the | ||
148 | * buffer as the ALSA APIs require. | ||
149 | */ | ||
150 | if (diff == snd_pcm_lib_buffer_bytes(substream)) | ||
151 | diff = 0; | ||
152 | |||
153 | frames = bytes_to_frames(substream->runtime, diff); | ||
154 | |||
146 | return frames; | 155 | return frames; |
147 | } | 156 | } |
148 | 157 | ||
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 4be0570e3f1f..65f46047b1cb 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -357,7 +357,7 @@ static int ak4642_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) | |||
357 | default: | 357 | default: |
358 | return -EINVAL; | 358 | return -EINVAL; |
359 | } | 359 | } |
360 | snd_soc_update_bits(codec, PW_MGMT2, MS, data); | 360 | snd_soc_update_bits(codec, PW_MGMT2, MS | MCKO | PMPLL, data); |
361 | snd_soc_update_bits(codec, MD_CTL1, BCKO_MASK, bcko); | 361 | snd_soc_update_bits(codec, MD_CTL1, BCKO_MASK, bcko); |
362 | 362 | ||
363 | /* format type */ | 363 | /* format type */ |
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index e2a7608d3944..7859bdcc93db 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c | |||
@@ -161,10 +161,18 @@ static int aic26_hw_params(struct snd_pcm_substream *substream, | |||
161 | dev_dbg(&aic26->spi->dev, "bad format\n"); return -EINVAL; | 161 | dev_dbg(&aic26->spi->dev, "bad format\n"); return -EINVAL; |
162 | } | 162 | } |
163 | 163 | ||
164 | /* Configure PLL */ | 164 | /** |
165 | * Configure PLL | ||
166 | * fsref = (mclk * PLLM) / 2048 | ||
167 | * where PLLM = J.DDDD (DDDD register ranges from 0 to 9999, decimal) | ||
168 | */ | ||
165 | pval = 1; | 169 | pval = 1; |
166 | jval = (fsref == 44100) ? 7 : 8; | 170 | /* compute J portion of multiplier */ |
167 | dval = (fsref == 44100) ? 5264 : 1920; | 171 | jval = fsref / (aic26->mclk / 2048); |
172 | /* compute fractional DDDD component of multiplier */ | ||
173 | dval = fsref - (jval * (aic26->mclk / 2048)); | ||
174 | dval = (10000 * dval) / (aic26->mclk / 2048); | ||
175 | dev_dbg(&aic26->spi->dev, "Setting PLLM to %d.%04d\n", jval, dval); | ||
168 | qval = 0; | 176 | qval = 0; |
169 | reg = 0x8000 | qval << 11 | pval << 8 | jval << 2; | 177 | reg = 0x8000 | qval << 11 | pval << 8 | jval << 2; |
170 | aic26_reg_write(codec, AIC26_REG_PLL_PROG1, reg); | 178 | aic26_reg_write(codec, AIC26_REG_PLL_PROG1, reg); |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index c3d96fc8c267..789453d44ec5 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -1114,12 +1114,19 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power) | |||
1114 | 1114 | ||
1115 | /* Sync reg_cache with the hardware */ | 1115 | /* Sync reg_cache with the hardware */ |
1116 | codec->cache_only = 0; | 1116 | codec->cache_only = 0; |
1117 | for (i = 0; i < ARRAY_SIZE(aic3x_reg); i++) | 1117 | for (i = AIC3X_SAMPLE_RATE_SEL_REG; i < ARRAY_SIZE(aic3x_reg); i++) |
1118 | snd_soc_write(codec, i, cache[i]); | 1118 | snd_soc_write(codec, i, cache[i]); |
1119 | if (aic3x->model == AIC3X_MODEL_3007) | 1119 | if (aic3x->model == AIC3X_MODEL_3007) |
1120 | aic3x_init_3007(codec); | 1120 | aic3x_init_3007(codec); |
1121 | codec->cache_sync = 0; | 1121 | codec->cache_sync = 0; |
1122 | } else { | 1122 | } else { |
1123 | /* | ||
1124 | * Do soft reset to this codec instance in order to clear | ||
1125 | * possible VDD leakage currents in case the supply regulators | ||
1126 | * remain on | ||
1127 | */ | ||
1128 | snd_soc_write(codec, AIC3X_RESET, SOFT_RESET); | ||
1129 | codec->cache_sync = 1; | ||
1123 | aic3x->power = 0; | 1130 | aic3x->power = 0; |
1124 | /* HW writes are needless when bias is off */ | 1131 | /* HW writes are needless when bias is off */ |
1125 | codec->cache_only = 1; | 1132 | codec->cache_only = 1; |
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 2dc964b55e4f..76b4361e9b80 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -175,6 +175,7 @@ static const struct snd_kcontrol_new wm8731_input_mux_controls = | |||
175 | SOC_DAPM_ENUM("Input Select", wm8731_insel_enum); | 175 | SOC_DAPM_ENUM("Input Select", wm8731_insel_enum); |
176 | 176 | ||
177 | static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = { | 177 | static const struct snd_soc_dapm_widget wm8731_dapm_widgets[] = { |
178 | SND_SOC_DAPM_SUPPLY("ACTIVE",WM8731_ACTIVE, 0, 0, NULL, 0), | ||
178 | SND_SOC_DAPM_SUPPLY("OSC", WM8731_PWR, 5, 1, NULL, 0), | 179 | SND_SOC_DAPM_SUPPLY("OSC", WM8731_PWR, 5, 1, NULL, 0), |
179 | SND_SOC_DAPM_MIXER("Output Mixer", WM8731_PWR, 4, 1, | 180 | SND_SOC_DAPM_MIXER("Output Mixer", WM8731_PWR, 4, 1, |
180 | &wm8731_output_mixer_controls[0], | 181 | &wm8731_output_mixer_controls[0], |
@@ -204,6 +205,8 @@ static int wm8731_check_osc(struct snd_soc_dapm_widget *source, | |||
204 | static const struct snd_soc_dapm_route wm8731_intercon[] = { | 205 | static const struct snd_soc_dapm_route wm8731_intercon[] = { |
205 | {"DAC", NULL, "OSC", wm8731_check_osc}, | 206 | {"DAC", NULL, "OSC", wm8731_check_osc}, |
206 | {"ADC", NULL, "OSC", wm8731_check_osc}, | 207 | {"ADC", NULL, "OSC", wm8731_check_osc}, |
208 | {"DAC", NULL, "ACTIVE"}, | ||
209 | {"ADC", NULL, "ACTIVE"}, | ||
207 | 210 | ||
208 | /* output mixer */ | 211 | /* output mixer */ |
209 | {"Output Mixer", "Line Bypass Switch", "Line Input"}, | 212 | {"Output Mixer", "Line Bypass Switch", "Line Input"}, |
@@ -315,29 +318,6 @@ static int wm8731_hw_params(struct snd_pcm_substream *substream, | |||
315 | return 0; | 318 | return 0; |
316 | } | 319 | } |
317 | 320 | ||
318 | static int wm8731_pcm_prepare(struct snd_pcm_substream *substream, | ||
319 | struct snd_soc_dai *dai) | ||
320 | { | ||
321 | struct snd_soc_codec *codec = dai->codec; | ||
322 | |||
323 | /* set active */ | ||
324 | snd_soc_write(codec, WM8731_ACTIVE, 0x0001); | ||
325 | |||
326 | return 0; | ||
327 | } | ||
328 | |||
329 | static void wm8731_shutdown(struct snd_pcm_substream *substream, | ||
330 | struct snd_soc_dai *dai) | ||
331 | { | ||
332 | struct snd_soc_codec *codec = dai->codec; | ||
333 | |||
334 | /* deactivate */ | ||
335 | if (!codec->active) { | ||
336 | udelay(50); | ||
337 | snd_soc_write(codec, WM8731_ACTIVE, 0x0); | ||
338 | } | ||
339 | } | ||
340 | |||
341 | static int wm8731_mute(struct snd_soc_dai *dai, int mute) | 321 | static int wm8731_mute(struct snd_soc_dai *dai, int mute) |
342 | { | 322 | { |
343 | struct snd_soc_codec *codec = dai->codec; | 323 | struct snd_soc_codec *codec = dai->codec; |
@@ -480,7 +460,6 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec, | |||
480 | snd_soc_write(codec, WM8731_PWR, reg | 0x0040); | 460 | snd_soc_write(codec, WM8731_PWR, reg | 0x0040); |
481 | break; | 461 | break; |
482 | case SND_SOC_BIAS_OFF: | 462 | case SND_SOC_BIAS_OFF: |
483 | snd_soc_write(codec, WM8731_ACTIVE, 0x0); | ||
484 | snd_soc_write(codec, WM8731_PWR, 0xffff); | 463 | snd_soc_write(codec, WM8731_PWR, 0xffff); |
485 | regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), | 464 | regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), |
486 | wm8731->supplies); | 465 | wm8731->supplies); |
@@ -496,9 +475,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec, | |||
496 | SNDRV_PCM_FMTBIT_S24_LE) | 475 | SNDRV_PCM_FMTBIT_S24_LE) |
497 | 476 | ||
498 | static struct snd_soc_dai_ops wm8731_dai_ops = { | 477 | static struct snd_soc_dai_ops wm8731_dai_ops = { |
499 | .prepare = wm8731_pcm_prepare, | ||
500 | .hw_params = wm8731_hw_params, | 478 | .hw_params = wm8731_hw_params, |
501 | .shutdown = wm8731_shutdown, | ||
502 | .digital_mute = wm8731_mute, | 479 | .digital_mute = wm8731_mute, |
503 | .set_sysclk = wm8731_set_dai_sysclk, | 480 | .set_sysclk = wm8731_set_dai_sysclk, |
504 | .set_fmt = wm8731_set_dai_fmt, | 481 | .set_fmt = wm8731_set_dai_fmt, |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 970a95c5360b..c2fc0356c2a4 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -1713,6 +1713,8 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src, | |||
1713 | snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset, | 1713 | snd_soc_update_bits(codec, WM8994_FLL1_CONTROL_1 + reg_offset, |
1714 | WM8994_FLL1_ENA | WM8994_FLL1_FRAC, | 1714 | WM8994_FLL1_ENA | WM8994_FLL1_FRAC, |
1715 | reg); | 1715 | reg); |
1716 | |||
1717 | msleep(5); | ||
1716 | } | 1718 | } |
1717 | 1719 | ||
1718 | wm8994->fll[id].in = freq_in; | 1720 | wm8994->fll[id].in = freq_in; |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index d75043ed7fc0..b194be09e74d 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1929,8 +1929,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) | |||
1929 | "%s", card->name); | 1929 | "%s", card->name); |
1930 | snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), | 1930 | snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), |
1931 | "%s", card->long_name ? card->long_name : card->name); | 1931 | "%s", card->long_name ? card->long_name : card->name); |
1932 | snprintf(card->snd_card->driver, sizeof(card->snd_card->driver), | 1932 | if (card->driver_name) |
1933 | "%s", card->driver_name ? card->driver_name : card->name); | 1933 | strlcpy(card->snd_card->driver, card->driver_name, |
1934 | sizeof(card->snd_card->driver)); | ||
1934 | 1935 | ||
1935 | if (card->late_probe) { | 1936 | if (card->late_probe) { |
1936 | ret = card->late_probe(card); | 1937 | ret = card->late_probe(card); |
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c index 6b817e20548c..95f03c10b4f7 100644 --- a/sound/soc/tegra/tegra_i2s.c +++ b/sound/soc/tegra/tegra_i2s.c | |||
@@ -222,12 +222,18 @@ static int tegra_i2s_hw_params(struct snd_pcm_substream *substream, | |||
222 | if (i2sclock % (2 * srate)) | 222 | if (i2sclock % (2 * srate)) |
223 | reg |= TEGRA_I2S_TIMING_NON_SYM_ENABLE; | 223 | reg |= TEGRA_I2S_TIMING_NON_SYM_ENABLE; |
224 | 224 | ||
225 | if (!i2s->clk_refs) | ||
226 | clk_enable(i2s->clk_i2s); | ||
227 | |||
225 | tegra_i2s_write(i2s, TEGRA_I2S_TIMING, reg); | 228 | tegra_i2s_write(i2s, TEGRA_I2S_TIMING, reg); |
226 | 229 | ||
227 | tegra_i2s_write(i2s, TEGRA_I2S_FIFO_SCR, | 230 | tegra_i2s_write(i2s, TEGRA_I2S_FIFO_SCR, |
228 | TEGRA_I2S_FIFO_SCR_FIFO2_ATN_LVL_FOUR_SLOTS | | 231 | TEGRA_I2S_FIFO_SCR_FIFO2_ATN_LVL_FOUR_SLOTS | |
229 | TEGRA_I2S_FIFO_SCR_FIFO1_ATN_LVL_FOUR_SLOTS); | 232 | TEGRA_I2S_FIFO_SCR_FIFO1_ATN_LVL_FOUR_SLOTS); |
230 | 233 | ||
234 | if (!i2s->clk_refs) | ||
235 | clk_disable(i2s->clk_i2s); | ||
236 | |||
231 | return 0; | 237 | return 0; |
232 | } | 238 | } |
233 | 239 | ||
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c index 337a00241a1f..4dd051bdf4fd 100644 --- a/sound/spi/at73c213.c +++ b/sound/spi/at73c213.c | |||
@@ -1124,6 +1124,6 @@ static void __exit at73c213_exit(void) | |||
1124 | } | 1124 | } |
1125 | module_exit(at73c213_exit); | 1125 | module_exit(at73c213_exit); |
1126 | 1126 | ||
1127 | MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); | 1127 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
1128 | MODULE_DESCRIPTION("Sound driver for AT73C213 with Atmel SSC"); | 1128 | MODULE_DESCRIPTION("Sound driver for AT73C213 with Atmel SSC"); |
1129 | MODULE_LICENSE("GPL"); | 1129 | MODULE_LICENSE("GPL"); |