diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-12 14:04:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-12 14:04:25 -0400 |
commit | 9d6fa8fa7042622f8ed9c0988de665464d4584a6 (patch) | |
tree | e51dbcdcbaa4f542dd7b37b1e11a73ad778a1ecf | |
parent | c7ca6b0fcfb309dbb3d81dc9315e960f6fb14cb9 (diff) | |
parent | 05e205429d3f73ad4f9f0d84e8a95e978237d6fd (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop
ALSA: Use %pV for snd_printk()
ALSA: hda - Fix initialization of hp pins with master_mute in Realtek
ALSA: hda - Fix invalid unsol tag for some alc262 model quirks
ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
ASoC: fsl: fix initialization of DMA buffers
ASoC: WM8804 does not support sample rates below 32kHz
ASoC: Fix WM8962 headphone volume update for use of advanced caches
ASoC: Blackfin: bf5xx-ad1836: Fix codec device name
ALSA: hda: Fix quirk for Dell Inspiron 910
ASoC: AD1836: Fix setting the PCM format
ASoC: Check for NULL register bank in snd_soc_get_cache_val()
ASoC: Add missing break in WM8915 FLL source selection
ASoC: Only update SYSCLK_ENA when pausing WM8915 SYSCLK
ASoC: atmel_ssc: Don't try to free ssc if request failed
-rw-r--r-- | sound/core/misc.c | 40 | ||||
-rw-r--r-- | sound/pci/hda/patch_conexant.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 15 | ||||
-rw-r--r-- | sound/soc/atmel/atmel_ssc_dai.c | 5 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-ad1836.c | 4 | ||||
-rw-r--r-- | sound/soc/codecs/ad1836.c | 14 | ||||
-rw-r--r-- | sound/soc/codecs/ad1836.h | 6 | ||||
-rw-r--r-- | sound/soc/codecs/wm8804.c | 9 | ||||
-rw-r--r-- | sound/soc/codecs/wm8915.c | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm8962.c | 4 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_dma.c | 9 | ||||
-rw-r--r-- | sound/soc/samsung/i2s.c | 4 | ||||
-rw-r--r-- | sound/soc/soc-cache.c | 3 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 17 |
14 files changed, 74 insertions, 60 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c index 2c41825c836e..eb9fe2e1d291 100644 --- a/sound/core/misc.c +++ b/sound/core/misc.c | |||
@@ -58,26 +58,6 @@ static const char *sanity_file_name(const char *path) | |||
58 | else | 58 | else |
59 | return path; | 59 | return path; |
60 | } | 60 | } |
61 | |||
62 | /* print file and line with a certain printk prefix */ | ||
63 | static int print_snd_pfx(unsigned int level, const char *path, int line, | ||
64 | const char *format) | ||
65 | { | ||
66 | const char *file = sanity_file_name(path); | ||
67 | char tmp[] = "<0>"; | ||
68 | const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT; | ||
69 | int ret = 0; | ||
70 | |||
71 | if (format[0] == '<' && format[2] == '>') { | ||
72 | tmp[1] = format[1]; | ||
73 | pfx = tmp; | ||
74 | ret = 1; | ||
75 | } | ||
76 | printk("%sALSA %s:%d: ", pfx, file, line); | ||
77 | return ret; | ||
78 | } | ||
79 | #else | ||
80 | #define print_snd_pfx(level, path, line, format) 0 | ||
81 | #endif | 61 | #endif |
82 | 62 | ||
83 | #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) | 63 | #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) |
@@ -85,15 +65,29 @@ void __snd_printk(unsigned int level, const char *path, int line, | |||
85 | const char *format, ...) | 65 | const char *format, ...) |
86 | { | 66 | { |
87 | va_list args; | 67 | va_list args; |
88 | 68 | #ifdef CONFIG_SND_VERBOSE_PRINTK | |
69 | struct va_format vaf; | ||
70 | char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV"; | ||
71 | #endif | ||
72 | |||
89 | #ifdef CONFIG_SND_DEBUG | 73 | #ifdef CONFIG_SND_DEBUG |
90 | if (debug < level) | 74 | if (debug < level) |
91 | return; | 75 | return; |
92 | #endif | 76 | #endif |
77 | |||
93 | va_start(args, format); | 78 | va_start(args, format); |
94 | if (print_snd_pfx(level, path, line, format)) | 79 | #ifdef CONFIG_SND_VERBOSE_PRINTK |
95 | format += 3; /* skip the printk level-prefix */ | 80 | vaf.fmt = format; |
81 | vaf.va = &args; | ||
82 | if (format[0] == '<' && format[2] == '>') { | ||
83 | memcpy(verbose_fmt, format, 3); | ||
84 | vaf.fmt = format + 3; | ||
85 | } else if (level) | ||
86 | memcpy(verbose_fmt, KERN_DEBUG, 3); | ||
87 | printk(verbose_fmt, sanity_file_name(path), line, &vaf); | ||
88 | #else | ||
96 | vprintk(format, args); | 89 | vprintk(format, args); |
90 | #endif | ||
97 | va_end(args); | 91 | va_end(args); |
98 | } | 92 | } |
99 | EXPORT_SYMBOL_GPL(__snd_printk); | 93 | EXPORT_SYMBOL_GPL(__snd_printk); |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 3e6b9a8539c2..694b9daf691f 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -3102,6 +3102,7 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { | |||
3102 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), | 3102 | SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), |
3103 | SND_PCI_QUIRK(0x17aa, 0x3938, "Lenovo G565", CXT5066_AUTO), | 3103 | SND_PCI_QUIRK(0x17aa, 0x3938, "Lenovo G565", CXT5066_AUTO), |
3104 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ | 3104 | SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ |
3105 | SND_PCI_QUIRK(0x1b0a, 0x2092, "CyberpowerPC Gamer Xplorer N57001", CXT5066_AUTO), | ||
3105 | {} | 3106 | {} |
3106 | }; | 3107 | }; |
3107 | 3108 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7a4e10002f56..43fcfbd32847 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1141,6 +1141,13 @@ static void update_speakers(struct hda_codec *codec) | |||
1141 | struct alc_spec *spec = codec->spec; | 1141 | struct alc_spec *spec = codec->spec; |
1142 | int on; | 1142 | int on; |
1143 | 1143 | ||
1144 | /* Control HP pins/amps depending on master_mute state; | ||
1145 | * in general, HP pins/amps control should be enabled in all cases, | ||
1146 | * but currently set only for master_mute, just to be safe | ||
1147 | */ | ||
1148 | do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), | ||
1149 | spec->autocfg.hp_pins, spec->master_mute, true); | ||
1150 | |||
1144 | if (!spec->automute) | 1151 | if (!spec->automute) |
1145 | on = 0; | 1152 | on = 0; |
1146 | else | 1153 | else |
@@ -6201,11 +6208,6 @@ static const struct snd_kcontrol_new alc260_input_mixer[] = { | |||
6201 | /* update HP, line and mono out pins according to the master switch */ | 6208 | /* update HP, line and mono out pins according to the master switch */ |
6202 | static void alc260_hp_master_update(struct hda_codec *codec) | 6209 | static void alc260_hp_master_update(struct hda_codec *codec) |
6203 | { | 6210 | { |
6204 | struct alc_spec *spec = codec->spec; | ||
6205 | |||
6206 | /* change HP pins */ | ||
6207 | do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), | ||
6208 | spec->autocfg.hp_pins, spec->master_mute, true); | ||
6209 | update_speakers(codec); | 6211 | update_speakers(codec); |
6210 | } | 6212 | } |
6211 | 6213 | ||
@@ -11924,7 +11926,7 @@ static const struct hda_verb alc262_nec_verbs[] = { | |||
11924 | * 0x1b = port replicator headphone out | 11926 | * 0x1b = port replicator headphone out |
11925 | */ | 11927 | */ |
11926 | 11928 | ||
11927 | #define ALC_HP_EVENT 0x37 | 11929 | #define ALC_HP_EVENT ALC880_HP_EVENT |
11928 | 11930 | ||
11929 | static const struct hda_verb alc262_fujitsu_unsol_verbs[] = { | 11931 | static const struct hda_verb alc262_fujitsu_unsol_verbs[] = { |
11930 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, | 11932 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, |
@@ -13860,6 +13862,7 @@ static const struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
13860 | SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", | 13862 | SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", |
13861 | ALC268_ACER_ASPIRE_ONE), | 13863 | ALC268_ACER_ASPIRE_ONE), |
13862 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), | 13864 | SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), |
13865 | SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron 910", ALC268_AUTO), | ||
13863 | SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0, | 13866 | SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0, |
13864 | "Dell Inspiron Mini9/Vostro A90", ALC268_DELL), | 13867 | "Dell Inspiron Mini9/Vostro A90", ALC268_DELL), |
13865 | /* almost compatible with toshiba but with optional digital outs; | 13868 | /* almost compatible with toshiba but with optional digital outs; |
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 7fbfa051f6e1..eda955b15834 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c | |||
@@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id) | |||
848 | if (IS_ERR(ssc)) | 848 | if (IS_ERR(ssc)) |
849 | pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n", | 849 | pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n", |
850 | PTR_ERR(ssc)); | 850 | PTR_ERR(ssc)); |
851 | else | 851 | else { |
852 | ssc_pdev->dev.parent = &(ssc->pdev->dev); | 852 | ssc_pdev->dev.parent = &(ssc->pdev->dev); |
853 | ssc_free(ssc); | 853 | ssc_free(ssc); |
854 | } | ||
854 | 855 | ||
855 | ret = platform_device_add(ssc_pdev); | 856 | ret = platform_device_add(ssc_pdev); |
856 | if (ret < 0) | 857 | if (ret < 0) |
diff --git a/sound/soc/blackfin/bf5xx-ad1836.c b/sound/soc/blackfin/bf5xx-ad1836.c index ea4951cf5526..f79d1655e035 100644 --- a/sound/soc/blackfin/bf5xx-ad1836.c +++ b/sound/soc/blackfin/bf5xx-ad1836.c | |||
@@ -75,7 +75,7 @@ static struct snd_soc_dai_link bf5xx_ad1836_dai[] = { | |||
75 | .cpu_dai_name = "bfin-tdm.0", | 75 | .cpu_dai_name = "bfin-tdm.0", |
76 | .codec_dai_name = "ad1836-hifi", | 76 | .codec_dai_name = "ad1836-hifi", |
77 | .platform_name = "bfin-tdm-pcm-audio", | 77 | .platform_name = "bfin-tdm-pcm-audio", |
78 | .codec_name = "ad1836.0", | 78 | .codec_name = "spi0.4", |
79 | .ops = &bf5xx_ad1836_ops, | 79 | .ops = &bf5xx_ad1836_ops, |
80 | }, | 80 | }, |
81 | { | 81 | { |
@@ -84,7 +84,7 @@ static struct snd_soc_dai_link bf5xx_ad1836_dai[] = { | |||
84 | .cpu_dai_name = "bfin-tdm.1", | 84 | .cpu_dai_name = "bfin-tdm.1", |
85 | .codec_dai_name = "ad1836-hifi", | 85 | .codec_dai_name = "ad1836-hifi", |
86 | .platform_name = "bfin-tdm-pcm-audio", | 86 | .platform_name = "bfin-tdm-pcm-audio", |
87 | .codec_name = "ad1836.0", | 87 | .codec_name = "spi0.4", |
88 | .ops = &bf5xx_ad1836_ops, | 88 | .ops = &bf5xx_ad1836_ops, |
89 | }, | 89 | }, |
90 | }; | 90 | }; |
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index ab63d52e36e1..754c496412bd 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -145,22 +145,22 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream, | |||
145 | /* bit size */ | 145 | /* bit size */ |
146 | switch (params_format(params)) { | 146 | switch (params_format(params)) { |
147 | case SNDRV_PCM_FORMAT_S16_LE: | 147 | case SNDRV_PCM_FORMAT_S16_LE: |
148 | word_len = 3; | 148 | word_len = AD1836_WORD_LEN_16; |
149 | break; | 149 | break; |
150 | case SNDRV_PCM_FORMAT_S20_3LE: | 150 | case SNDRV_PCM_FORMAT_S20_3LE: |
151 | word_len = 1; | 151 | word_len = AD1836_WORD_LEN_20; |
152 | break; | 152 | break; |
153 | case SNDRV_PCM_FORMAT_S24_LE: | 153 | case SNDRV_PCM_FORMAT_S24_LE: |
154 | case SNDRV_PCM_FORMAT_S32_LE: | 154 | case SNDRV_PCM_FORMAT_S32_LE: |
155 | word_len = 0; | 155 | word_len = AD1836_WORD_LEN_24; |
156 | break; | 156 | break; |
157 | } | 157 | } |
158 | 158 | ||
159 | snd_soc_update_bits(codec, AD1836_DAC_CTRL1, | 159 | snd_soc_update_bits(codec, AD1836_DAC_CTRL1, AD1836_DAC_WORD_LEN_MASK, |
160 | AD1836_DAC_WORD_LEN_MASK, word_len); | 160 | word_len << AD1836_DAC_WORD_LEN_OFFSET); |
161 | 161 | ||
162 | snd_soc_update_bits(codec, AD1836_ADC_CTRL2, | 162 | snd_soc_update_bits(codec, AD1836_ADC_CTRL2, AD1836_ADC_WORD_LEN_MASK, |
163 | AD1836_ADC_WORD_LEN_MASK, word_len); | 163 | word_len << AD1836_ADC_WORD_OFFSET); |
164 | 164 | ||
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |
diff --git a/sound/soc/codecs/ad1836.h b/sound/soc/codecs/ad1836.h index 845596717fdf..9d6a3f8f8aaf 100644 --- a/sound/soc/codecs/ad1836.h +++ b/sound/soc/codecs/ad1836.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define AD1836_DAC_SERFMT_PCK256 (0x4 << 5) | 25 | #define AD1836_DAC_SERFMT_PCK256 (0x4 << 5) |
26 | #define AD1836_DAC_SERFMT_PCK128 (0x5 << 5) | 26 | #define AD1836_DAC_SERFMT_PCK128 (0x5 << 5) |
27 | #define AD1836_DAC_WORD_LEN_MASK 0x18 | 27 | #define AD1836_DAC_WORD_LEN_MASK 0x18 |
28 | #define AD1836_DAC_WORD_LEN_OFFSET 3 | ||
28 | 29 | ||
29 | #define AD1836_DAC_CTRL2 1 | 30 | #define AD1836_DAC_CTRL2 1 |
30 | #define AD1836_DACL1_MUTE 0 | 31 | #define AD1836_DACL1_MUTE 0 |
@@ -51,6 +52,7 @@ | |||
51 | #define AD1836_ADCL2_MUTE 2 | 52 | #define AD1836_ADCL2_MUTE 2 |
52 | #define AD1836_ADCR2_MUTE 3 | 53 | #define AD1836_ADCR2_MUTE 3 |
53 | #define AD1836_ADC_WORD_LEN_MASK 0x30 | 54 | #define AD1836_ADC_WORD_LEN_MASK 0x30 |
55 | #define AD1836_ADC_WORD_OFFSET 5 | ||
54 | #define AD1836_ADC_SERFMT_MASK (7 << 6) | 56 | #define AD1836_ADC_SERFMT_MASK (7 << 6) |
55 | #define AD1836_ADC_SERFMT_PCK256 (0x4 << 6) | 57 | #define AD1836_ADC_SERFMT_PCK256 (0x4 << 6) |
56 | #define AD1836_ADC_SERFMT_PCK128 (0x5 << 6) | 58 | #define AD1836_ADC_SERFMT_PCK128 (0x5 << 6) |
@@ -60,4 +62,8 @@ | |||
60 | 62 | ||
61 | #define AD1836_NUM_REGS 16 | 63 | #define AD1836_NUM_REGS 16 |
62 | 64 | ||
65 | #define AD1836_WORD_LEN_24 0x0 | ||
66 | #define AD1836_WORD_LEN_20 0x1 | ||
67 | #define AD1836_WORD_LEN_16 0x2 | ||
68 | |||
63 | #endif | 69 | #endif |
diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index 6785688f8806..9a5e67c5a6bd 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c | |||
@@ -680,20 +680,25 @@ static struct snd_soc_dai_ops wm8804_dai_ops = { | |||
680 | #define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ | 680 | #define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ |
681 | SNDRV_PCM_FMTBIT_S24_LE) | 681 | SNDRV_PCM_FMTBIT_S24_LE) |
682 | 682 | ||
683 | #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ | ||
684 | SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ | ||
685 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \ | ||
686 | SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000) | ||
687 | |||
683 | static struct snd_soc_dai_driver wm8804_dai = { | 688 | static struct snd_soc_dai_driver wm8804_dai = { |
684 | .name = "wm8804-spdif", | 689 | .name = "wm8804-spdif", |
685 | .playback = { | 690 | .playback = { |
686 | .stream_name = "Playback", | 691 | .stream_name = "Playback", |
687 | .channels_min = 2, | 692 | .channels_min = 2, |
688 | .channels_max = 2, | 693 | .channels_max = 2, |
689 | .rates = SNDRV_PCM_RATE_8000_192000, | 694 | .rates = WM8804_RATES, |
690 | .formats = WM8804_FORMATS, | 695 | .formats = WM8804_FORMATS, |
691 | }, | 696 | }, |
692 | .capture = { | 697 | .capture = { |
693 | .stream_name = "Capture", | 698 | .stream_name = "Capture", |
694 | .channels_min = 2, | 699 | .channels_min = 2, |
695 | .channels_max = 2, | 700 | .channels_max = 2, |
696 | .rates = SNDRV_PCM_RATE_8000_192000, | 701 | .rates = WM8804_RATES, |
697 | .formats = WM8804_FORMATS, | 702 | .formats = WM8804_FORMATS, |
698 | }, | 703 | }, |
699 | .ops = &wm8804_dai_ops, | 704 | .ops = &wm8804_dai_ops, |
diff --git a/sound/soc/codecs/wm8915.c b/sound/soc/codecs/wm8915.c index a0b1a7278284..e2ab4fac2819 100644 --- a/sound/soc/codecs/wm8915.c +++ b/sound/soc/codecs/wm8915.c | |||
@@ -1839,7 +1839,7 @@ static int wm8915_set_sysclk(struct snd_soc_dai *dai, | |||
1839 | int old; | 1839 | int old; |
1840 | 1840 | ||
1841 | /* Disable SYSCLK while we reconfigure */ | 1841 | /* Disable SYSCLK while we reconfigure */ |
1842 | old = snd_soc_read(codec, WM8915_AIF_CLOCKING_1); | 1842 | old = snd_soc_read(codec, WM8915_AIF_CLOCKING_1) & WM8915_SYSCLK_ENA; |
1843 | snd_soc_update_bits(codec, WM8915_AIF_CLOCKING_1, | 1843 | snd_soc_update_bits(codec, WM8915_AIF_CLOCKING_1, |
1844 | WM8915_SYSCLK_ENA, 0); | 1844 | WM8915_SYSCLK_ENA, 0); |
1845 | 1845 | ||
@@ -2038,6 +2038,7 @@ static int wm8915_set_fll(struct snd_soc_codec *codec, int fll_id, int source, | |||
2038 | break; | 2038 | break; |
2039 | case WM8915_FLL_MCLK2: | 2039 | case WM8915_FLL_MCLK2: |
2040 | reg = 1; | 2040 | reg = 1; |
2041 | break; | ||
2041 | case WM8915_FLL_DACLRCLK1: | 2042 | case WM8915_FLL_DACLRCLK1: |
2042 | reg = 2; | 2043 | reg = 2; |
2043 | break; | 2044 | break; |
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index f90ae427242b..5e05eed96c38 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -1999,12 +1999,12 @@ static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol, | |||
1999 | return 0; | 1999 | return 0; |
2000 | 2000 | ||
2001 | /* If the left PGA is enabled hit that VU bit... */ | 2001 | /* If the left PGA is enabled hit that VU bit... */ |
2002 | if (reg_cache[WM8962_PWR_MGMT_2] & WM8962_HPOUTL_PGA_ENA) | 2002 | if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTL_PGA_ENA) |
2003 | return snd_soc_write(codec, WM8962_HPOUTL_VOLUME, | 2003 | return snd_soc_write(codec, WM8962_HPOUTL_VOLUME, |
2004 | reg_cache[WM8962_HPOUTL_VOLUME]); | 2004 | reg_cache[WM8962_HPOUTL_VOLUME]); |
2005 | 2005 | ||
2006 | /* ...otherwise the right. The VU is stereo. */ | 2006 | /* ...otherwise the right. The VU is stereo. */ |
2007 | if (reg_cache[WM8962_PWR_MGMT_2] & WM8962_HPOUTR_PGA_ENA) | 2007 | if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTR_PGA_ENA) |
2008 | return snd_soc_write(codec, WM8962_HPOUTR_VOLUME, | 2008 | return snd_soc_write(codec, WM8962_HPOUTR_VOLUME, |
2009 | reg_cache[WM8962_HPOUTR_VOLUME]); | 2009 | reg_cache[WM8962_HPOUTR_VOLUME]); |
2010 | 2010 | ||
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 15dac0f20cd8..6680c0b4d203 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -310,7 +310,7 @@ static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai, | |||
310 | * should allocate a DMA buffer only for the streams that are valid. | 310 | * should allocate a DMA buffer only for the streams that are valid. |
311 | */ | 311 | */ |
312 | 312 | ||
313 | if (dai->driver->playback.channels_min) { | 313 | if (pcm->streams[0].substream) { |
314 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, | 314 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, |
315 | fsl_dma_hardware.buffer_bytes_max, | 315 | fsl_dma_hardware.buffer_bytes_max, |
316 | &pcm->streams[0].substream->dma_buffer); | 316 | &pcm->streams[0].substream->dma_buffer); |
@@ -320,13 +320,13 @@ static int fsl_dma_new(struct snd_card *card, struct snd_soc_dai *dai, | |||
320 | } | 320 | } |
321 | } | 321 | } |
322 | 322 | ||
323 | if (dai->driver->capture.channels_min) { | 323 | if (pcm->streams[1].substream) { |
324 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, | 324 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, |
325 | fsl_dma_hardware.buffer_bytes_max, | 325 | fsl_dma_hardware.buffer_bytes_max, |
326 | &pcm->streams[1].substream->dma_buffer); | 326 | &pcm->streams[1].substream->dma_buffer); |
327 | if (ret) { | 327 | if (ret) { |
328 | snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); | ||
329 | dev_err(card->dev, "can't alloc capture dma buffer\n"); | 328 | dev_err(card->dev, "can't alloc capture dma buffer\n"); |
329 | snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); | ||
330 | return ret; | 330 | return ret; |
331 | } | 331 | } |
332 | } | 332 | } |
@@ -449,7 +449,8 @@ static int fsl_dma_open(struct snd_pcm_substream *substream) | |||
449 | dma_private->ld_buf_phys = ld_buf_phys; | 449 | dma_private->ld_buf_phys = ld_buf_phys; |
450 | dma_private->dma_buf_phys = substream->dma_buffer.addr; | 450 | dma_private->dma_buf_phys = substream->dma_buffer.addr; |
451 | 451 | ||
452 | ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "DMA", dma_private); | 452 | ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "fsldma-audio", |
453 | dma_private); | ||
453 | if (ret) { | 454 | if (ret) { |
454 | dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n", | 455 | dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n", |
455 | dma_private->irq, ret); | 456 | dma_private->irq, ret); |
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index ffa09b3b2caa..992a732b5211 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c | |||
@@ -191,7 +191,7 @@ static inline bool tx_active(struct i2s_dai *i2s) | |||
191 | if (!i2s) | 191 | if (!i2s) |
192 | return false; | 192 | return false; |
193 | 193 | ||
194 | active = readl(i2s->addr + I2SMOD); | 194 | active = readl(i2s->addr + I2SCON); |
195 | 195 | ||
196 | if (is_secondary(i2s)) | 196 | if (is_secondary(i2s)) |
197 | active &= CON_TXSDMA_ACTIVE; | 197 | active &= CON_TXSDMA_ACTIVE; |
@@ -223,7 +223,7 @@ static inline bool rx_active(struct i2s_dai *i2s) | |||
223 | if (!i2s) | 223 | if (!i2s) |
224 | return false; | 224 | return false; |
225 | 225 | ||
226 | active = readl(i2s->addr + I2SMOD) & CON_RXDMA_ACTIVE; | 226 | active = readl(i2s->addr + I2SCON) & CON_RXDMA_ACTIVE; |
227 | 227 | ||
228 | return active ? true : false; | 228 | return active ? true : false; |
229 | } | 229 | } |
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 06b7b81a1601..c005ceb70c9d 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
@@ -466,6 +466,9 @@ static bool snd_soc_set_cache_val(void *base, unsigned int idx, | |||
466 | static unsigned int snd_soc_get_cache_val(const void *base, unsigned int idx, | 466 | static unsigned int snd_soc_get_cache_val(const void *base, unsigned int idx, |
467 | unsigned int word_size) | 467 | unsigned int word_size) |
468 | { | 468 | { |
469 | if (!base) | ||
470 | return -1; | ||
471 | |||
469 | switch (word_size) { | 472 | switch (word_size) { |
470 | case 1: { | 473 | case 1: { |
471 | const u8 *cache = base; | 474 | const u8 *cache = base; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 776e6f418306..32ab7fc4579a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -350,9 +350,9 @@ static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm, | |||
350 | } | 350 | } |
351 | 351 | ||
352 | /* create new dapm mixer control */ | 352 | /* create new dapm mixer control */ |
353 | static int dapm_new_mixer(struct snd_soc_dapm_context *dapm, | 353 | static int dapm_new_mixer(struct snd_soc_dapm_widget *w) |
354 | struct snd_soc_dapm_widget *w) | ||
355 | { | 354 | { |
355 | struct snd_soc_dapm_context *dapm = w->dapm; | ||
356 | int i, ret = 0; | 356 | int i, ret = 0; |
357 | size_t name_len, prefix_len; | 357 | size_t name_len, prefix_len; |
358 | struct snd_soc_dapm_path *path; | 358 | struct snd_soc_dapm_path *path; |
@@ -450,9 +450,9 @@ static int dapm_new_mixer(struct snd_soc_dapm_context *dapm, | |||
450 | } | 450 | } |
451 | 451 | ||
452 | /* create new dapm mux control */ | 452 | /* create new dapm mux control */ |
453 | static int dapm_new_mux(struct snd_soc_dapm_context *dapm, | 453 | static int dapm_new_mux(struct snd_soc_dapm_widget *w) |
454 | struct snd_soc_dapm_widget *w) | ||
455 | { | 454 | { |
455 | struct snd_soc_dapm_context *dapm = w->dapm; | ||
456 | struct snd_soc_dapm_path *path = NULL; | 456 | struct snd_soc_dapm_path *path = NULL; |
457 | struct snd_kcontrol *kcontrol; | 457 | struct snd_kcontrol *kcontrol; |
458 | struct snd_card *card = dapm->card->snd_card; | 458 | struct snd_card *card = dapm->card->snd_card; |
@@ -535,8 +535,7 @@ static int dapm_new_mux(struct snd_soc_dapm_context *dapm, | |||
535 | } | 535 | } |
536 | 536 | ||
537 | /* create new dapm volume control */ | 537 | /* create new dapm volume control */ |
538 | static int dapm_new_pga(struct snd_soc_dapm_context *dapm, | 538 | static int dapm_new_pga(struct snd_soc_dapm_widget *w) |
539 | struct snd_soc_dapm_widget *w) | ||
540 | { | 539 | { |
541 | if (w->num_kcontrols) | 540 | if (w->num_kcontrols) |
542 | dev_err(w->dapm->dev, | 541 | dev_err(w->dapm->dev, |
@@ -1826,13 +1825,13 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm) | |||
1826 | case snd_soc_dapm_mixer: | 1825 | case snd_soc_dapm_mixer: |
1827 | case snd_soc_dapm_mixer_named_ctl: | 1826 | case snd_soc_dapm_mixer_named_ctl: |
1828 | w->power_check = dapm_generic_check_power; | 1827 | w->power_check = dapm_generic_check_power; |
1829 | dapm_new_mixer(dapm, w); | 1828 | dapm_new_mixer(w); |
1830 | break; | 1829 | break; |
1831 | case snd_soc_dapm_mux: | 1830 | case snd_soc_dapm_mux: |
1832 | case snd_soc_dapm_virt_mux: | 1831 | case snd_soc_dapm_virt_mux: |
1833 | case snd_soc_dapm_value_mux: | 1832 | case snd_soc_dapm_value_mux: |
1834 | w->power_check = dapm_generic_check_power; | 1833 | w->power_check = dapm_generic_check_power; |
1835 | dapm_new_mux(dapm, w); | 1834 | dapm_new_mux(w); |
1836 | break; | 1835 | break; |
1837 | case snd_soc_dapm_adc: | 1836 | case snd_soc_dapm_adc: |
1838 | case snd_soc_dapm_aif_out: | 1837 | case snd_soc_dapm_aif_out: |
@@ -1845,7 +1844,7 @@ int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm) | |||
1845 | case snd_soc_dapm_pga: | 1844 | case snd_soc_dapm_pga: |
1846 | case snd_soc_dapm_out_drv: | 1845 | case snd_soc_dapm_out_drv: |
1847 | w->power_check = dapm_generic_check_power; | 1846 | w->power_check = dapm_generic_check_power; |
1848 | dapm_new_pga(dapm, w); | 1847 | dapm_new_pga(w); |
1849 | break; | 1848 | break; |
1850 | case snd_soc_dapm_input: | 1849 | case snd_soc_dapm_input: |
1851 | case snd_soc_dapm_output: | 1850 | case snd_soc_dapm_output: |