diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:42:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:42:55 -0400 |
commit | eb81071584bed0b04adcaf57e525638d0f92e1e1 (patch) | |
tree | efd7f5a56299acf9ce96870a7e6e0d353330bdce /sound | |
parent | 5f4f0c4d3fc95cb7d509e4469a22aed40532f0fc (diff) | |
parent | bfd4e66b8d0dfcdbe3f5ccff45757f098bdbb26e (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: aoa i2sbus: don't overwrite module parameter
ALSA: ASoC: tlv320aic3x: Fix DSP DAI format and signal polarities matching
ALSA: ASoC: OMAP: Continue fixing DSP DAI format in McBSP DAI driver
ALSA: Ensure PXA runtime data is initialised
ALSA: hda - correct bracketing in spdif test in patch_sigmatel.c
ALSA: hda - Fix conflicting volume controls on ALC260
Diffstat (limited to 'sound')
-rw-r--r-- | sound/aoa/soundbus/i2sbus/i2sbus-core.c | 6 | ||||
-rw-r--r-- | sound/arm/pxa2xx-pcm-lib.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 22 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 16 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 7 |
6 files changed, 31 insertions, 24 deletions
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/sound/aoa/soundbus/i2sbus/i2sbus-core.c index e6beb92c6933..b4590df07466 100644 --- a/sound/aoa/soundbus/i2sbus/i2sbus-core.c +++ b/sound/aoa/soundbus/i2sbus/i2sbus-core.c | |||
@@ -159,7 +159,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
159 | struct i2sbus_dev *dev; | 159 | struct i2sbus_dev *dev; |
160 | struct device_node *child = NULL, *sound = NULL; | 160 | struct device_node *child = NULL, *sound = NULL; |
161 | struct resource *r; | 161 | struct resource *r; |
162 | int i, layout = 0, rlen; | 162 | int i, layout = 0, rlen, ok = force; |
163 | static const char *rnames[] = { "i2sbus: %s (control)", | 163 | static const char *rnames[] = { "i2sbus: %s (control)", |
164 | "i2sbus: %s (tx)", | 164 | "i2sbus: %s (tx)", |
165 | "i2sbus: %s (rx)" }; | 165 | "i2sbus: %s (rx)" }; |
@@ -192,7 +192,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
192 | layout = *layout_id; | 192 | layout = *layout_id; |
193 | snprintf(dev->sound.modalias, 32, | 193 | snprintf(dev->sound.modalias, 32, |
194 | "sound-layout-%d", layout); | 194 | "sound-layout-%d", layout); |
195 | force = 1; | 195 | ok = 1; |
196 | } | 196 | } |
197 | } | 197 | } |
198 | /* for the time being, until we can handle non-layout-id | 198 | /* for the time being, until we can handle non-layout-id |
@@ -201,7 +201,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, | |||
201 | * When there are two i2s busses and only one has a layout-id, | 201 | * When there are two i2s busses and only one has a layout-id, |
202 | * then this depends on the order, but that isn't important | 202 | * then this depends on the order, but that isn't important |
203 | * either as the second one in that case is just a modem. */ | 203 | * either as the second one in that case is just a modem. */ |
204 | if (!force) { | 204 | if (!ok) { |
205 | kfree(dev); | 205 | kfree(dev); |
206 | return -ENODEV; | 206 | return -ENODEV; |
207 | } | 207 | } |
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 1c93eb77cb99..75a0d746fb60 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c | |||
@@ -194,7 +194,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) | |||
194 | goto out; | 194 | goto out; |
195 | 195 | ||
196 | ret = -ENOMEM; | 196 | ret = -ENOMEM; |
197 | rtd = kmalloc(sizeof(*rtd), GFP_KERNEL); | 197 | rtd = kzalloc(sizeof(*rtd), GFP_KERNEL); |
198 | if (!rtd) | 198 | if (!rtd) |
199 | goto out; | 199 | goto out; |
200 | rtd->dma_desc_array = | 200 | rtd->dma_desc_array = |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e72707cb60a3..ef4955c73c88 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4996,7 +4996,7 @@ static struct hda_verb alc260_test_init_verbs[] = { | |||
4996 | */ | 4996 | */ |
4997 | 4997 | ||
4998 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | 4998 | static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, |
4999 | const char *pfx) | 4999 | const char *pfx, int *vol_bits) |
5000 | { | 5000 | { |
5001 | hda_nid_t nid_vol; | 5001 | hda_nid_t nid_vol; |
5002 | unsigned long vol_val, sw_val; | 5002 | unsigned long vol_val, sw_val; |
@@ -5018,10 +5018,14 @@ static int alc260_add_playback_controls(struct alc_spec *spec, hda_nid_t nid, | |||
5018 | } else | 5018 | } else |
5019 | return 0; /* N/A */ | 5019 | return 0; /* N/A */ |
5020 | 5020 | ||
5021 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); | 5021 | if (!(*vol_bits & (1 << nid_vol))) { |
5022 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); | 5022 | /* first control for the volume widget */ |
5023 | if (err < 0) | 5023 | snprintf(name, sizeof(name), "%s Playback Volume", pfx); |
5024 | return err; | 5024 | err = add_control(spec, ALC_CTL_WIDGET_VOL, name, vol_val); |
5025 | if (err < 0) | ||
5026 | return err; | ||
5027 | *vol_bits |= (1 << nid_vol); | ||
5028 | } | ||
5025 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); | 5029 | snprintf(name, sizeof(name), "%s Playback Switch", pfx); |
5026 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); | 5030 | err = add_control(spec, ALC_CTL_WIDGET_MUTE, name, sw_val); |
5027 | if (err < 0) | 5031 | if (err < 0) |
@@ -5035,6 +5039,7 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5035 | { | 5039 | { |
5036 | hda_nid_t nid; | 5040 | hda_nid_t nid; |
5037 | int err; | 5041 | int err; |
5042 | int vols = 0; | ||
5038 | 5043 | ||
5039 | spec->multiout.num_dacs = 1; | 5044 | spec->multiout.num_dacs = 1; |
5040 | spec->multiout.dac_nids = spec->private_dac_nids; | 5045 | spec->multiout.dac_nids = spec->private_dac_nids; |
@@ -5042,21 +5047,22 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec, | |||
5042 | 5047 | ||
5043 | nid = cfg->line_out_pins[0]; | 5048 | nid = cfg->line_out_pins[0]; |
5044 | if (nid) { | 5049 | if (nid) { |
5045 | err = alc260_add_playback_controls(spec, nid, "Front"); | 5050 | err = alc260_add_playback_controls(spec, nid, "Front", &vols); |
5046 | if (err < 0) | 5051 | if (err < 0) |
5047 | return err; | 5052 | return err; |
5048 | } | 5053 | } |
5049 | 5054 | ||
5050 | nid = cfg->speaker_pins[0]; | 5055 | nid = cfg->speaker_pins[0]; |
5051 | if (nid) { | 5056 | if (nid) { |
5052 | err = alc260_add_playback_controls(spec, nid, "Speaker"); | 5057 | err = alc260_add_playback_controls(spec, nid, "Speaker", &vols); |
5053 | if (err < 0) | 5058 | if (err < 0) |
5054 | return err; | 5059 | return err; |
5055 | } | 5060 | } |
5056 | 5061 | ||
5057 | nid = cfg->hp_pins[0]; | 5062 | nid = cfg->hp_pins[0]; |
5058 | if (nid) { | 5063 | if (nid) { |
5059 | err = alc260_add_playback_controls(spec, nid, "Headphone"); | 5064 | err = alc260_add_playback_controls(spec, nid, "Headphone", |
5065 | &vols); | ||
5060 | if (err < 0) | 5066 | if (err < 0) |
5061 | return err; | 5067 | return err; |
5062 | } | 5068 | } |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index a2ac7205d45d..788fdc6f3264 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1282,7 +1282,7 @@ static int stac92xx_build_controls(struct hda_codec *codec) | |||
1282 | return err; | 1282 | return err; |
1283 | spec->multiout.share_spdif = 1; | 1283 | spec->multiout.share_spdif = 1; |
1284 | } | 1284 | } |
1285 | if (spec->dig_in_nid && (!spec->gpio_dir & 0x01)) { | 1285 | if (spec->dig_in_nid && !(spec->gpio_dir & 0x01)) { |
1286 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); | 1286 | err = snd_hda_create_spdif_in_ctls(codec, spec->dig_in_nid); |
1287 | if (err < 0) | 1287 | if (err < 0) |
1288 | return err; | 1288 | return err; |
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 05336ed7e493..cff276ee261e 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c | |||
@@ -863,17 +863,21 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
863 | return -EINVAL; | 863 | return -EINVAL; |
864 | } | 864 | } |
865 | 865 | ||
866 | /* interface format */ | 866 | /* |
867 | switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { | 867 | * match both interface format and signal polarities since they |
868 | case SND_SOC_DAIFMT_I2S: | 868 | * are fixed |
869 | */ | ||
870 | switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK | | ||
871 | SND_SOC_DAIFMT_INV_MASK)) { | ||
872 | case (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF): | ||
869 | break; | 873 | break; |
870 | case SND_SOC_DAIFMT_DSP_A: | 874 | case (SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF): |
871 | iface_breg |= (0x01 << 6); | 875 | iface_breg |= (0x01 << 6); |
872 | break; | 876 | break; |
873 | case SND_SOC_DAIFMT_RIGHT_J: | 877 | case (SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF): |
874 | iface_breg |= (0x02 << 6); | 878 | iface_breg |= (0x02 << 6); |
875 | break; | 879 | break; |
876 | case SND_SOC_DAIFMT_LEFT_J: | 880 | case (SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF): |
877 | iface_breg |= (0x03 << 6); | 881 | iface_breg |= (0x03 << 6); |
878 | break; | 882 | break; |
879 | default: | 883 | default: |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 853b33ae3435..8485a8a9d0ff 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -265,7 +265,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, | |||
265 | break; | 265 | break; |
266 | case SND_SOC_DAIFMT_DSP_A: | 266 | case SND_SOC_DAIFMT_DSP_A: |
267 | regs->srgr2 |= FPER(wlen * 2 - 1); | 267 | regs->srgr2 |= FPER(wlen * 2 - 1); |
268 | regs->srgr1 |= FWID(0); | 268 | regs->srgr1 |= FWID(wlen * 2 - 2); |
269 | break; | 269 | break; |
270 | } | 270 | } |
271 | 271 | ||
@@ -284,7 +284,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
284 | { | 284 | { |
285 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); | 285 | struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); |
286 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; | 286 | struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; |
287 | unsigned int temp_fmt = fmt; | ||
288 | 287 | ||
289 | if (mcbsp_data->configured) | 288 | if (mcbsp_data->configured) |
290 | return 0; | 289 | return 0; |
@@ -307,8 +306,6 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
307 | /* 0-bit data delay */ | 306 | /* 0-bit data delay */ |
308 | regs->rcr2 |= RDATDLY(0); | 307 | regs->rcr2 |= RDATDLY(0); |
309 | regs->xcr2 |= XDATDLY(0); | 308 | regs->xcr2 |= XDATDLY(0); |
310 | /* Invert bit clock and FS polarity configuration for DSP_A */ | ||
311 | temp_fmt ^= SND_SOC_DAIFMT_IB_IF; | ||
312 | break; | 309 | break; |
313 | default: | 310 | default: |
314 | /* Unsupported data format */ | 311 | /* Unsupported data format */ |
@@ -332,7 +329,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
332 | } | 329 | } |
333 | 330 | ||
334 | /* Set bit clock (CLKX/CLKR) and FS polarities */ | 331 | /* Set bit clock (CLKX/CLKR) and FS polarities */ |
335 | switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) { | 332 | switch (fmt & SND_SOC_DAIFMT_INV_MASK) { |
336 | case SND_SOC_DAIFMT_NB_NF: | 333 | case SND_SOC_DAIFMT_NB_NF: |
337 | /* | 334 | /* |
338 | * Normal BCLK + FS. | 335 | * Normal BCLK + FS. |