diff --git a/[refs] b/[refs] index 9a55a6f0df85..43387e614cba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8cd2b264d92bb949ddccfb6db6a82254bb07af75 +refs/heads/master: 762b8df748d83c14070afbf0c6f8c0f4a91a13bf diff --git a/trunk/include/sound/soc.h b/trunk/include/sound/soc.h index a1e0357a84d7..5e0189876afd 100644 --- a/trunk/include/sound/soc.h +++ b/trunk/include/sound/soc.h @@ -28,7 +28,8 @@ */ #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \ ((unsigned long)&(struct soc_mixer_control) \ - {.reg = xreg, .shift = xshift, .max = xmax, .invert = xinvert}) + {.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \ + .invert = xinvert}) #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \ ((unsigned long)&(struct soc_mixer_control) \ {.reg = xreg, .max = xmax, .invert = xinvert}) diff --git a/trunk/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/trunk/sound/aoa/soundbus/i2sbus/i2sbus-core.c index b4590df07466..e6beb92c6933 100644 --- a/trunk/sound/aoa/soundbus/i2sbus/i2sbus-core.c +++ b/trunk/sound/aoa/soundbus/i2sbus/i2sbus-core.c @@ -159,7 +159,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, struct i2sbus_dev *dev; struct device_node *child = NULL, *sound = NULL; struct resource *r; - int i, layout = 0, rlen, ok = force; + int i, layout = 0, rlen; static const char *rnames[] = { "i2sbus: %s (control)", "i2sbus: %s (tx)", "i2sbus: %s (rx)" }; @@ -192,7 +192,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, layout = *layout_id; snprintf(dev->sound.modalias, 32, "sound-layout-%d", layout); - ok = 1; + force = 1; } } /* for the time being, until we can handle non-layout-id @@ -201,7 +201,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, * When there are two i2s busses and only one has a layout-id, * then this depends on the order, but that isn't important * either as the second one in that case is just a modem. */ - if (!ok) { + if (!force) { kfree(dev); return -ENODEV; } diff --git a/trunk/sound/arm/pxa2xx-ac97-lib.c b/trunk/sound/arm/pxa2xx-ac97-lib.c index 34c1d94f921e..99026dfb81ea 100644 --- a/trunk/sound/arm/pxa2xx-ac97-lib.c +++ b/trunk/sound/arm/pxa2xx-ac97-lib.c @@ -50,7 +50,7 @@ unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg) mutex_lock(&car_mutex); /* set up primary or secondary codec space */ - if (cpu_is_pxa25x() && reg == AC97_GPIO_STATUS) + if ((cpu_is_pxa21x() || cpu_is_pxa25x()) && reg == AC97_GPIO_STATUS) reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; else reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; @@ -90,7 +90,7 @@ void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, mutex_lock(&car_mutex); /* set up primary or secondary codec space */ - if (cpu_is_pxa25x() && reg == AC97_GPIO_STATUS) + if ((cpu_is_pxa21x() || cpu_is_pxa25x()) && reg == AC97_GPIO_STATUS) reg_addr = ac97->num ? &SMC_REG_BASE : &PMC_REG_BASE; else reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE; @@ -200,7 +200,7 @@ static inline void pxa_ac97_cold_pxa3xx(void) bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97) { #ifdef CONFIG_PXA25x - if (cpu_is_pxa25x()) + if (cpu_is_pxa21x() || cpu_is_pxa25x()) pxa_ac97_warm_pxa25x(); else #endif @@ -230,7 +230,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset); bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97) { #ifdef CONFIG_PXA25x - if (cpu_is_pxa25x()) + if (cpu_is_pxa21x() || cpu_is_pxa25x()) pxa_ac97_cold_pxa25x(); else #endif @@ -301,7 +301,7 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_suspend); int pxa2xx_ac97_hw_resume(void) { - if (cpu_is_pxa25x() || cpu_is_pxa27x()) { + if (cpu_is_pxa21x() || cpu_is_pxa25x() || cpu_is_pxa27x()) { pxa_gpio_mode(GPIO31_SYNC_AC97_MD); pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); @@ -325,7 +325,7 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev) if (ret < 0) goto err; - if (cpu_is_pxa25x() || cpu_is_pxa27x()) { + if (cpu_is_pxa21x() || cpu_is_pxa25x() || cpu_is_pxa27x()) { pxa_gpio_mode(GPIO31_SYNC_AC97_MD); pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); pxa_gpio_mode(GPIO28_BITCLK_AC97_MD); diff --git a/trunk/sound/arm/pxa2xx-pcm-lib.c b/trunk/sound/arm/pxa2xx-pcm-lib.c index 75a0d746fb60..1c93eb77cb99 100644 --- a/trunk/sound/arm/pxa2xx-pcm-lib.c +++ b/trunk/sound/arm/pxa2xx-pcm-lib.c @@ -194,7 +194,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) goto out; ret = -ENOMEM; - rtd = kzalloc(sizeof(*rtd), GFP_KERNEL); + rtd = kmalloc(sizeof(*rtd), GFP_KERNEL); if (!rtd) goto out; rtd->dma_desc_array = diff --git a/trunk/sound/core/control.c b/trunk/sound/core/control.c index b0bf42691047..6d71f9a7ccbb 100644 --- a/trunk/sound/core/control.c +++ b/trunk/sound/core/control.c @@ -225,13 +225,8 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, kctl.id.iface = ncontrol->iface; kctl.id.device = ncontrol->device; kctl.id.subdevice = ncontrol->subdevice; - if (ncontrol->name) { + if (ncontrol->name) strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); - if (strcmp(ncontrol->name, kctl.id.name) != 0) - snd_printk(KERN_WARNING - "Control name '%s' truncated to '%s'\n", - ncontrol->name, kctl.id.name); - } kctl.id.index = ncontrol->index; kctl.count = ncontrol->count ? ncontrol->count : 1; access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : diff --git a/trunk/sound/core/jack.c b/trunk/sound/core/jack.c index bd2d9e6b55e9..8133a2b173a5 100644 --- a/trunk/sound/core/jack.c +++ b/trunk/sound/core/jack.c @@ -147,9 +147,6 @@ EXPORT_SYMBOL(snd_jack_set_parent); */ void snd_jack_report(struct snd_jack *jack, int status) { - if (!jack) - return; - if (jack->type & SND_JACK_HEADPHONE) input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT, status & SND_JACK_HEADPHONE); diff --git a/trunk/sound/core/pcm_lib.c b/trunk/sound/core/pcm_lib.c index 921691080f35..6ea5cfb83998 100644 --- a/trunk/sound/core/pcm_lib.c +++ b/trunk/sound/core/pcm_lib.c @@ -908,12 +908,12 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, EXPORT_SYMBOL(snd_pcm_hw_rule_add); /** - * snd_pcm_hw_constraint_mask - apply the given bitmap mask constraint + * snd_pcm_hw_constraint_mask * @runtime: PCM runtime instance * @var: hw_params variable to apply the mask * @mask: the bitmap mask * - * Apply the constraint of the given bitmap mask to a 32-bit mask parameter. + * Apply the constraint of the given bitmap mask to a mask parameter. */ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, u_int32_t mask) @@ -928,12 +928,12 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param } /** - * snd_pcm_hw_constraint_mask64 - apply the given bitmap mask constraint + * snd_pcm_hw_constraint_mask64 * @runtime: PCM runtime instance * @var: hw_params variable to apply the mask * @mask: the 64bit bitmap mask * - * Apply the constraint of the given bitmap mask to a 64-bit mask parameter. + * Apply the constraint of the given bitmap mask to a mask parameter. */ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, u_int64_t mask) @@ -949,7 +949,7 @@ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_par } /** - * snd_pcm_hw_constraint_integer - apply an integer constraint to an interval + * snd_pcm_hw_constraint_integer * @runtime: PCM runtime instance * @var: hw_params variable to apply the integer constraint * @@ -964,7 +964,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa EXPORT_SYMBOL(snd_pcm_hw_constraint_integer); /** - * snd_pcm_hw_constraint_minmax - apply a min/max range constraint to an interval + * snd_pcm_hw_constraint_minmax * @runtime: PCM runtime instance * @var: hw_params variable to apply the range * @min: the minimal value @@ -995,7 +995,7 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params, /** - * snd_pcm_hw_constraint_list - apply a list of constraints to a parameter + * snd_pcm_hw_constraint_list * @runtime: PCM runtime instance * @cond: condition bits * @var: hw_params variable to apply the list constraint @@ -1031,7 +1031,7 @@ static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params, } /** - * snd_pcm_hw_constraint_ratnums - apply ratnums constraint to a parameter + * snd_pcm_hw_constraint_ratnums * @runtime: PCM runtime instance * @cond: condition bits * @var: hw_params variable to apply the ratnums constraint @@ -1064,7 +1064,7 @@ static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params, } /** - * snd_pcm_hw_constraint_ratdens - apply ratdens constraint to a parameter + * snd_pcm_hw_constraint_ratdens * @runtime: PCM runtime instance * @cond: condition bits * @var: hw_params variable to apply the ratdens constraint @@ -1095,7 +1095,7 @@ static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params, } /** - * snd_pcm_hw_constraint_msbits - add a hw constraint msbits rule + * snd_pcm_hw_constraint_msbits * @runtime: PCM runtime instance * @cond: condition bits * @width: sample bits width @@ -1123,7 +1123,7 @@ static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params, } /** - * snd_pcm_hw_constraint_step - add a hw constraint step rule + * snd_pcm_hw_constraint_step * @runtime: PCM runtime instance * @cond: condition bits * @var: hw_params variable to apply the step constraint @@ -1154,7 +1154,7 @@ static int snd_pcm_hw_rule_pow2(struct snd_pcm_hw_params *params, struct snd_pcm } /** - * snd_pcm_hw_constraint_pow2 - add a hw constraint power-of-2 rule + * snd_pcm_hw_constraint_pow2 * @runtime: PCM runtime instance * @cond: condition bits * @var: hw_params variable to apply the power-of-2 constraint @@ -1202,13 +1202,13 @@ void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params) EXPORT_SYMBOL(_snd_pcm_hw_params_any); /** - * snd_pcm_hw_param_value - return @params field @var value + * snd_pcm_hw_param_value * @params: the hw_params instance * @var: parameter to retrieve - * @dir: pointer to the direction (-1,0,1) or %NULL + * @dir: pointer to the direction (-1,0,1) or NULL * - * Return the value for field @var if it's fixed in configuration space - * defined by @params. Return -%EINVAL otherwise. + * Return the value for field PAR if it's fixed in configuration space + * defined by PARAMS. Return -EINVAL otherwise */ int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, int *dir) @@ -1271,13 +1271,13 @@ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params, /** - * snd_pcm_hw_param_first - refine config space and return minimum value + * snd_pcm_hw_param_first * @pcm: PCM instance * @params: the hw_params instance * @var: parameter to retrieve - * @dir: pointer to the direction (-1,0,1) or %NULL + * @dir: pointer to the direction (-1,0,1) or NULL * - * Inside configuration space defined by @params remove from @var all + * Inside configuration space defined by PARAMS remove from PAR all * values > minimum. Reduce configuration space accordingly. * Return the minimum. */ @@ -1317,13 +1317,13 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params, /** - * snd_pcm_hw_param_last - refine config space and return maximum value + * snd_pcm_hw_param_last * @pcm: PCM instance * @params: the hw_params instance * @var: parameter to retrieve - * @dir: pointer to the direction (-1,0,1) or %NULL + * @dir: pointer to the direction (-1,0,1) or NULL * - * Inside configuration space defined by @params remove from @var all + * Inside configuration space defined by PARAMS remove from PAR all * values < maximum. Reduce configuration space accordingly. * Return the maximum. */ @@ -1345,11 +1345,11 @@ int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, EXPORT_SYMBOL(snd_pcm_hw_param_last); /** - * snd_pcm_hw_param_choose - choose a configuration defined by @params + * snd_pcm_hw_param_choose * @pcm: PCM instance * @params: the hw_params instance * - * Choose one configuration from configuration space defined by @params. + * Choose one configuration from configuration space defined by PARAMS * The configuration chosen is that obtained fixing in this order: * first access, first format, first subformat, min channels, * min rate, min period time, max buffer size, min tick time diff --git a/trunk/sound/core/pcm_misc.c b/trunk/sound/core/pcm_misc.c index ea2bf82c9373..89b7f549bebd 100644 --- a/trunk/sound/core/pcm_misc.c +++ b/trunk/sound/core/pcm_misc.c @@ -319,7 +319,6 @@ EXPORT_SYMBOL(snd_pcm_format_physical_width); /** * snd_pcm_format_size - return the byte size of samples on the given format * @format: the format to check - * @samples: sampling rate * * Returns the byte size of the given samples for the format, or a * negative error code if unknown format. diff --git a/trunk/sound/core/pcm_native.c b/trunk/sound/core/pcm_native.c index aef18682c035..e61e12506ded 100644 --- a/trunk/sound/core/pcm_native.c +++ b/trunk/sound/core/pcm_native.c @@ -875,8 +875,10 @@ static struct action_ops snd_pcm_action_start = { }; /** - * snd_pcm_start - start all linked streams + * snd_pcm_start * @substream: the PCM substream instance + * + * Start all linked streams. */ int snd_pcm_start(struct snd_pcm_substream *substream) { @@ -924,11 +926,12 @@ static struct action_ops snd_pcm_action_stop = { }; /** - * snd_pcm_stop - try to stop all running streams in the substream group + * snd_pcm_stop * @substream: the PCM substream instance * @state: PCM state after stopping the stream * - * The state of each stream is then changed to the given state unconditionally. + * Try to stop all running streams in the substream group. + * The state of each stream is changed to the given value after that unconditionally. */ int snd_pcm_stop(struct snd_pcm_substream *substream, int state) { @@ -938,10 +941,11 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, int state) EXPORT_SYMBOL(snd_pcm_stop); /** - * snd_pcm_drain_done - stop the DMA only when the given stream is playback + * snd_pcm_drain_done * @substream: the PCM substream * - * After stopping, the state is changed to SETUP. + * Stop the DMA only when the given stream is playback. + * The state is changed to SETUP. * Unlike snd_pcm_stop(), this affects only the given stream. */ int snd_pcm_drain_done(struct snd_pcm_substream *substream) @@ -1061,9 +1065,10 @@ static struct action_ops snd_pcm_action_suspend = { }; /** - * snd_pcm_suspend - trigger SUSPEND to all linked streams + * snd_pcm_suspend * @substream: the PCM substream * + * Trigger SUSPEND to all linked streams. * After this call, all streams are changed to SUSPENDED state. */ int snd_pcm_suspend(struct snd_pcm_substream *substream) @@ -1083,9 +1088,10 @@ int snd_pcm_suspend(struct snd_pcm_substream *substream) EXPORT_SYMBOL(snd_pcm_suspend); /** - * snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm + * snd_pcm_suspend_all * @pcm: the PCM instance * + * Trigger SUSPEND to all substreams in the given pcm. * After this call, all streams are changed to SUSPENDED state. */ int snd_pcm_suspend_all(struct snd_pcm *pcm) @@ -1307,9 +1313,11 @@ static struct action_ops snd_pcm_action_prepare = { }; /** - * snd_pcm_prepare - prepare the PCM substream to be triggerable + * snd_pcm_prepare * @substream: the PCM substream instance * @file: file to refer f_flags + * + * Prepare the PCM substream to be triggerable. */ static int snd_pcm_prepare(struct snd_pcm_substream *substream, struct file *file) diff --git a/trunk/sound/drivers/dummy.c b/trunk/sound/drivers/dummy.c index 73be7e14a603..e5e749f3e0ef 100644 --- a/trunk/sound/drivers/dummy.c +++ b/trunk/sound/drivers/dummy.c @@ -51,7 +51,7 @@ static int emu10k1_playback_constraints(struct snd_pcm_runtime *runtime) if (err < 0) return err; err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX); - if (err < 0) + if (err) < 0) return err; return 0; } diff --git a/trunk/sound/oss/kahlua.c b/trunk/sound/oss/kahlua.c index c180598f1710..eb9bc365530d 100644 --- a/trunk/sound/oss/kahlua.c +++ b/trunk/sound/oss/kahlua.c @@ -1,7 +1,7 @@ /* * Initialisation code for Cyrix/NatSemi VSA1 softaudio * - * (C) Copyright 2003 Red Hat Inc + * (C) Copyright 2003 Red Hat Inc * * XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems. * The older version (VSA1) provides fairly good soundblaster emulation diff --git a/trunk/sound/pci/ac97/ac97_codec.c b/trunk/sound/pci/ac97/ac97_codec.c index bd510eceff1f..6704acbca8c0 100644 --- a/trunk/sound/pci/ac97/ac97_codec.c +++ b/trunk/sound/pci/ac97/ac97_codec.c @@ -1927,9 +1927,9 @@ static int snd_ac97_dev_register(struct snd_device *device) ac97->dev.bus = &ac97_bus_type; ac97->dev.parent = ac97->bus->card->dev; ac97->dev.release = ac97_device_release; - dev_set_name(&ac97->dev, "%d-%d:%s", - ac97->bus->card->number, ac97->num, - snd_ac97_get_short_name(ac97)); + snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "%d-%d:%s", + ac97->bus->card->number, ac97->num, + snd_ac97_get_short_name(ac97)); if ((err = device_register(&ac97->dev)) < 0) { snd_printk(KERN_ERR "Can't register ac97 bus\n"); ac97->dev.bus = NULL; diff --git a/trunk/sound/pci/ca0106/ca0106_main.c b/trunk/sound/pci/ca0106/ca0106_main.c index 88fbf285d2b7..a7d89662acf6 100644 --- a/trunk/sound/pci/ca0106/ca0106_main.c +++ b/trunk/sound/pci/ca0106/ca0106_main.c @@ -759,6 +759,7 @@ static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream) SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | 0x00001200 | 0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT ); + } #endif return 0; diff --git a/trunk/sound/pci/cs5530.c b/trunk/sound/pci/cs5530.c index 4ba2db2f4250..7ff8b68e997e 100644 --- a/trunk/sound/pci/cs5530.c +++ b/trunk/sound/pci/cs5530.c @@ -2,7 +2,7 @@ * cs5530.c - Initialisation code for Cyrix/NatSemi VSA1 softaudio * * (C) Copyright 2007 Ash Willis - * (C) Copyright 2003 Red Hat Inc + * (C) Copyright 2003 Red Hat Inc * * This driver was ported (shamelessly ripped ;) from oss/kahlua.c but I did * mess with it a bit. The chip seems to have to have trouble with full duplex diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index c59065513118..c461baa83c2a 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -322,8 +322,8 @@ static hda_nid_t stac92hd71bxx_mux_nids[2] = { 0x1a, 0x1b }; -static hda_nid_t stac92hd71bxx_dmux_nids[2] = { - 0x1c, 0x1d, +static hda_nid_t stac92hd71bxx_dmux_nids[1] = { + 0x1c, }; static hda_nid_t stac92hd71bxx_smux_nids[2] = { @@ -861,18 +861,20 @@ static struct hda_verb stac92hd71bxx_core_init[] = { { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, /* connect headphone jack to dac1 */ { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, + { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */ /* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */ { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, }; -#define HD_DISABLE_PORTF 2 +#define HD_DISABLE_PORTF 3 static struct hda_verb stac92hd71bxx_analog_core_init[] = { /* start of config #1 */ /* connect port 0f to audio mixer */ { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2}, + { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, /* Speaker */ /* unmute right and left channels for node 0x0f */ { 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, /* start of config #2 */ @@ -881,6 +883,10 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = { { 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff}, /* connect headphone jack to dac1 */ { 0x0a, AC_VERB_SET_CONNECT_SEL, 0x01}, + /* connect port 0d to audio mixer */ + { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x2}, + /* unmute dac0 input in audio mixer */ + { 0x17, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f}, /* unmute right and left channels for nodes 0x0a, 0xd */ { 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, @@ -1101,7 +1107,6 @@ static struct snd_kcontrol_new stac92hd83xxx_mixer[] = { static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { STAC_INPUT_SOURCE(2), - STAC_ANALOG_LOOPBACK(0xFA0, 0x7A0, 2), HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1c, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1c, 0x0, HDA_OUTPUT), @@ -1114,17 +1119,8 @@ static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = { HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT), */ - HDA_CODEC_MUTE("Import0 Mux Capture Switch", 0x17, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Import0 Mux Capture Volume", 0x17, 0x0, HDA_INPUT), - - HDA_CODEC_MUTE("Import1 Mux Capture Switch", 0x17, 0x1, HDA_INPUT), - HDA_CODEC_VOLUME("Import1 Mux Capture Volume", 0x17, 0x1, HDA_INPUT), - - HDA_CODEC_MUTE("DAC0 Capture Switch", 0x17, 0x3, HDA_INPUT), - HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x17, 0x3, HDA_INPUT), - - HDA_CODEC_MUTE("DAC1 Capture Switch", 0x17, 0x4, HDA_INPUT), - HDA_CODEC_VOLUME("DAC1 Capture Volume", 0x17, 0x4, HDA_INPUT), + HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT), + HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT), { } /* end */ }; @@ -1653,7 +1649,7 @@ static struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { static unsigned int ref92hd71bxx_pin_configs[11] = { 0x02214030, 0x02a19040, 0x01a19020, 0x01014010, - 0x0181302e, 0x01014010, 0x01019020, 0x90a000f0, + 0x0181302e, 0x01114010, 0x01019020, 0x90a000f0, 0x90a000f0, 0x01452050, 0x01452050, }; @@ -3004,7 +3000,7 @@ static int stac92xx_auto_create_mono_output_ctls(struct hda_codec *codec) /* labels for amp mux outputs */ static const char *stac92xx_amp_labels[3] = { - "Front Microphone", "Microphone", "Line In", + "Front Microphone", "Microphone", "Line In" }; /* create amp out controls mux on capable codecs */ @@ -4331,16 +4327,6 @@ static struct hda_codec_ops stac92hd71bxx_patch_ops = { #endif }; -static struct hda_input_mux stac92hd71bxx_dmux = { - .num_items = 4, - .items = { - { "Analog Inputs", 0x00 }, - { "Mixer", 0x01 }, - { "Digital Mic 1", 0x02 }, - { "Digital Mic 2", 0x03 }, - } -}; - static int patch_stac92hd71bxx(struct hda_codec *codec) { struct sigmatel_spec *spec; @@ -4355,8 +4341,6 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) spec->num_pins = ARRAY_SIZE(stac92hd71bxx_pin_nids); spec->num_pwrs = ARRAY_SIZE(stac92hd71bxx_pwr_nids); spec->pin_nids = stac92hd71bxx_pin_nids; - memcpy(&spec->private_dimux, &stac92hd71bxx_dmux, - sizeof(stac92hd71bxx_dmux)); spec->board_config = snd_hda_check_board_config(codec, STAC_92HD71BXX_MODELS, stac92hd71bxx_models, @@ -4408,7 +4392,6 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) /* no output amps */ spec->num_pwrs = 0; spec->mixer = stac92hd71bxx_analog_mixer; - spec->dinput_mux = &spec->private_dimux; /* disable VSW */ spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF]; @@ -4426,13 +4409,12 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) spec->num_pwrs = 0; /* fallthru */ default: - spec->dinput_mux = &spec->private_dimux; spec->mixer = stac92hd71bxx_analog_mixer; spec->init = stac92hd71bxx_analog_core_init; codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; } - spec->aloopback_mask = 0x50; + spec->aloopback_mask = 0x20; spec->aloopback_shift = 0; if (spec->board_config > STAC_92HD71BXX_REF) { @@ -4474,10 +4456,6 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) spec->multiout.num_dacs = 1; spec->multiout.hp_nid = 0x11; spec->multiout.dac_nids = stac92hd71bxx_dac_nids; - if (spec->dinput_mux) - spec->private_dimux.num_items += - spec->num_dmics - - (ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1); err = stac92xx_parse_auto_config(codec, 0x21, 0x23); if (!err) { diff --git a/trunk/sound/pci/ice1712/ice1712.c b/trunk/sound/pci/ice1712/ice1712.c index 58d7cda03de5..5b442383fcda 100644 --- a/trunk/sound/pci/ice1712/ice1712.c +++ b/trunk/sound/pci/ice1712/ice1712.c @@ -2688,13 +2688,12 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, return err; } - if (ice_has_con_ac97(ice)) { + if (ice_has_con_ac97(ice)) err = snd_ice1712_pcm(ice, pcm_dev++, NULL); if (err < 0) { snd_card_free(card); return err; } - } err = snd_ice1712_ac97_mixer(ice); if (err < 0) { @@ -2716,13 +2715,12 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, } } - if (ice_has_con_ac97(ice)) { + if (ice_has_con_ac97(ice)) err = snd_ice1712_pcm_ds(ice, pcm_dev++, NULL); if (err < 0) { snd_card_free(card); return err; } - } if (!c->no_mpu401) { err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712, diff --git a/trunk/sound/pci/intel8x0.c b/trunk/sound/pci/intel8x0.c index 19d3391e229f..c88d1eace1c4 100644 --- a/trunk/sound/pci/intel8x0.c +++ b/trunk/sound/pci/intel8x0.c @@ -2702,7 +2702,6 @@ static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = { SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), - SND_PCI_QUIRK(0x1028, 0x01ad, "AD1981B", 48000), SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), { } /* terminator */ }; diff --git a/trunk/sound/soc/at32/playpaq_wm8510.c b/trunk/sound/soc/at32/playpaq_wm8510.c index 98a2d5826a85..b1966e4dfcd3 100644 --- a/trunk/sound/soc/at32/playpaq_wm8510.c +++ b/trunk/sound/soc/at32/playpaq_wm8510.c @@ -304,7 +304,7 @@ static const struct snd_soc_dapm_widget playpaq_dapm_widgets[] = { -static const char *intercon[][3] = { +static const struct snd_soc_dapm_route intercon[] = { /* speaker connected to SPKOUT */ {"Ext Spk", NULL, "SPKOUTP"}, {"Ext Spk", NULL, "SPKOUTN"}, @@ -312,9 +312,6 @@ static const char *intercon[][3] = { {"Mic Bias", NULL, "Int Mic"}, {"MICN", NULL, "Mic Bias"}, {"MICP", NULL, "Mic Bias"}, - - /* Terminator */ - {NULL, NULL, NULL}, }; @@ -334,11 +331,8 @@ static int playpaq_wm8510_init(struct snd_soc_codec *codec) /* * Setup audio path interconnects */ - for (i = 0; intercon[i][0] != NULL; i++) { - snd_soc_dapm_connect_input(codec, - intercon[i][0], - intercon[i][1], intercon[i][2]); - } + snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); + /* always connected pins */ diff --git a/trunk/sound/soc/blackfin/bf5xx-i2s.c b/trunk/sound/soc/blackfin/bf5xx-i2s.c index 827587f08180..e020c160ee44 100644 --- a/trunk/sound/soc/blackfin/bf5xx-i2s.c +++ b/trunk/sound/soc/blackfin/bf5xx-i2s.c @@ -70,12 +70,24 @@ static struct sport_param sport_params[2] = { } }; -static u16 sport_req[][7] = { - { P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, - P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}, - { P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, - P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}, -}; +/* + * Setting the TFS pin selector for SPORT 0 based on whether the selected + * port id F or G. If the port is F then no conflict should exist for the + * TFS. When Port G is selected and EMAC then there is a conflict between + * the PHY interrupt line and TFS. Current settings prevent the conflict + * by ignoring the TFS pin when Port G is selected. This allows both + * ssm2602 using Port G and EMAC concurrently. + */ +#ifdef CONFIG_BF527_SPORT0_PORTF +#define LOCAL_SPORT0_TFS (P_SPORT0_TFS) +#else +#define LOCAL_SPORT0_TFS (0) +#endif + +static u16 sport_req[][7] = { {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, + P_SPORT0_DRPRI, P_SPORT0_RSCLK, LOCAL_SPORT0_TFS, 0}, + {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, P_SPORT1_DRPRI, + P_SPORT1_RSCLK, P_SPORT1_TFS, 0} }; static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) @@ -98,23 +110,21 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, ret = -EINVAL; break; default: + printk(KERN_ERR "%s: Unknown DAI format type\n", __func__); ret = -EINVAL; break; } switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { - case SND_SOC_DAIFMT_CBS_CFS: - ret = -EINVAL; - break; - case SND_SOC_DAIFMT_CBM_CFS: - ret = -EINVAL; - break; case SND_SOC_DAIFMT_CBM_CFM: break; + case SND_SOC_DAIFMT_CBS_CFS: + case SND_SOC_DAIFMT_CBM_CFS: case SND_SOC_DAIFMT_CBS_CFM: ret = -EINVAL; break; default: + printk(KERN_ERR "%s: Unknown DAI master type\n", __func__); ret = -EINVAL; break; } diff --git a/trunk/sound/soc/codecs/Kconfig b/trunk/sound/soc/codecs/Kconfig index 4975d8573e4f..38a0e3b620a7 100644 --- a/trunk/sound/soc/codecs/Kconfig +++ b/trunk/sound/soc/codecs/Kconfig @@ -68,7 +68,7 @@ config SND_SOC_TLV320AIC23 depends on I2C config SND_SOC_TLV320AIC26 - tristate "TI TLV320AIC26 Codec support" + tristate "TI TLV320AIC26 Codec support" if SND_SOC_OF_SIMPLE depends on SPI config SND_SOC_TLV320AIC3X diff --git a/trunk/sound/soc/codecs/tlv320aic23.c b/trunk/sound/soc/codecs/tlv320aic23.c index bac7815e00fb..44308dac9e18 100644 --- a/trunk/sound/soc/codecs/tlv320aic23.c +++ b/trunk/sound/soc/codecs/tlv320aic23.c @@ -84,7 +84,7 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value) { - u8 data; + u8 data[2]; /* TLV320AIC23 has 7 bit address and 9 bits of data * so we need to switch one data bit into reg and rest @@ -96,12 +96,12 @@ static int tlv320aic23_write(struct snd_soc_codec *codec, unsigned int reg, return -1; } - data = (reg << 1) | (value >> 8 & 0x01); + data[0] = (reg << 1) | (value >> 8 & 0x01); + data[1] = value & 0xff; tlv320aic23_write_reg_cache(codec, reg, value); - if (codec->hw_write(codec->control_data, data, - (value & 0xff)) == 0) + if (codec->hw_write(codec->control_data, data, 2) == 2) return 0; printk(KERN_ERR "%s cannot write %03x to register R%d\n", __func__, @@ -674,7 +674,7 @@ static int tlv320aic23_probe(struct platform_device *pdev) tlv320aic23_socdev = socdev; #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) - codec->hw_write = (hw_write_t) i2c_smbus_write_byte_data; + codec->hw_write = (hw_write_t) i2c_master_send; codec->hw_read = NULL; ret = i2c_add_driver(&tlv320aic23_i2c_driver); if (ret != 0) diff --git a/trunk/sound/soc/codecs/tlv320aic3x.c b/trunk/sound/soc/codecs/tlv320aic3x.c index 05336ed7e493..cff276ee261e 100644 --- a/trunk/sound/soc/codecs/tlv320aic3x.c +++ b/trunk/sound/soc/codecs/tlv320aic3x.c @@ -863,17 +863,21 @@ static int aic3x_set_dai_fmt(struct snd_soc_dai *codec_dai, return -EINVAL; } - /* interface format */ - switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { - case SND_SOC_DAIFMT_I2S: + /* + * match both interface format and signal polarities since they + * are fixed + */ + switch (fmt & (SND_SOC_DAIFMT_FORMAT_MASK | + SND_SOC_DAIFMT_INV_MASK)) { + case (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF): break; - case SND_SOC_DAIFMT_DSP_A: + case (SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_IB_NF): iface_breg |= (0x01 << 6); break; - case SND_SOC_DAIFMT_RIGHT_J: + case (SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_NB_NF): iface_breg |= (0x02 << 6); break; - case SND_SOC_DAIFMT_LEFT_J: + case (SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_NB_NF): iface_breg |= (0x03 << 6); break; default: diff --git a/trunk/sound/soc/omap/omap-mcbsp.c b/trunk/sound/soc/omap/omap-mcbsp.c index 0a063a98a661..8485a8a9d0ff 100644 --- a/trunk/sound/soc/omap/omap-mcbsp.c +++ b/trunk/sound/soc/omap/omap-mcbsp.c @@ -43,6 +43,7 @@ struct omap_mcbsp_data { unsigned int bus_id; struct omap_mcbsp_reg_cfg regs; + unsigned int fmt; /* * Flags indicating is the bus already activated and configured by * another substream @@ -200,6 +201,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; int dma, bus_id = mcbsp_data->bus_id, id = cpu_dai->id; + int wlen; unsigned long port; if (cpu_class_is_omap1()) { @@ -244,19 +246,29 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: /* Set word lengths */ + wlen = 16; regs->rcr2 |= RWDLEN2(OMAP_MCBSP_WORD_16); regs->rcr1 |= RWDLEN1(OMAP_MCBSP_WORD_16); regs->xcr2 |= XWDLEN2(OMAP_MCBSP_WORD_16); regs->xcr1 |= XWDLEN1(OMAP_MCBSP_WORD_16); - /* Set FS period and length in terms of bit clock periods */ - regs->srgr2 |= FPER(16 * 2 - 1); - regs->srgr1 |= FWID(16 - 1); break; default: /* Unsupported PCM format */ return -EINVAL; } + /* Set FS period and length in terms of bit clock periods */ + switch (mcbsp_data->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: + regs->srgr2 |= FPER(wlen * 2 - 1); + regs->srgr1 |= FWID(wlen - 1); + break; + case SND_SOC_DAIFMT_DSP_A: + regs->srgr2 |= FPER(wlen * 2 - 1); + regs->srgr1 |= FWID(wlen * 2 - 2); + break; + } + omap_mcbsp_config(bus_id, &mcbsp_data->regs); mcbsp_data->configured = 1; @@ -276,6 +288,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, if (mcbsp_data->configured) return 0; + mcbsp_data->fmt = fmt; memset(regs, 0, sizeof(*regs)); /* Generic McBSP register settings */ regs->spcr2 |= XINTM(3) | FREE; diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 462e635dfc74..a3adbf06b1e5 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; int max = mc->max; - unsigned int shift = mc->min; + unsigned int shift = mc->shift; unsigned int rshift = mc->rshift; if (max == 1) diff --git a/trunk/sound/soc/soc-dapm.c b/trunk/sound/soc/soc-dapm.c index efbd0b37810a..7351db9606e4 100644 --- a/trunk/sound/soc/soc-dapm.c +++ b/trunk/sound/soc/soc-dapm.c @@ -831,7 +831,7 @@ int snd_soc_dapm_sys_add(struct device *dev) return ret; asoc_debugfs = debugfs_create_dir("asoc", NULL); - if (!IS_ERR(asoc_debugfs)) + if (!IS_ERR(asoc_debugfs) && asoc_debugfs) debugfs_create_u32("dapm_pop_time", 0744, asoc_debugfs, &pop_time); else diff --git a/trunk/sound/sound_core.c b/trunk/sound/sound_core.c index ee66d43f848c..4ae07e236b36 100644 --- a/trunk/sound/sound_core.c +++ b/trunk/sound/sound_core.c @@ -57,7 +57,7 @@ module_exit(cleanup_soundcore); /* * OSS sound core handling. Breaks out sound functions to submodules * - * Author: Alan Cox + * Author: Alan Cox * * Fixes: * diff --git a/trunk/sound/usb/usbquirks.h b/trunk/sound/usb/usbquirks.h index 92115755d98e..69689e79bf79 100644 --- a/trunk/sound/usb/usbquirks.h +++ b/trunk/sound/usb/usbquirks.h @@ -1480,36 +1480,6 @@ YAMAHA_DEVICE(0x7010, "UB99"), } } }, -{ - /* Advanced modes of the Edirol UA-25EX. - * For the standard mode, UA-25EX has ID 0582:00e7, which - * offers only 16-bit PCM at 44.1 kHz and no MIDI. - */ - USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6), - .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) { - .vendor_name = "EDIROL", - .product_name = "UA-25EX", - .ifnum = QUIRK_ANY_INTERFACE, - .type = QUIRK_COMPOSITE, - .data = (const struct snd_usb_audio_quirk[]) { - { - .ifnum = 0, - .type = QUIRK_AUDIO_EDIROL_UAXX - }, - { - .ifnum = 1, - .type = QUIRK_AUDIO_EDIROL_UAXX - }, - { - .ifnum = 2, - .type = QUIRK_AUDIO_EDIROL_UAXX - }, - { - .ifnum = -1 - } - } - } -}, /* Guillemot devices */ { diff --git a/trunk/sound/usb/usx2y/us122l.c b/trunk/sound/usb/usx2y/us122l.c index c2515b680f9f..b441fe2cd190 100644 --- a/trunk/sound/usb/usx2y/us122l.c +++ b/trunk/sound/usb/usx2y/us122l.c @@ -118,11 +118,12 @@ static int usb_stream_hwdep_vm_fault(struct vm_area_struct *area, void *vaddr; struct us122l *us122l = area->vm_private_data; struct usb_stream *s; + int vm_f = VM_FAULT_SIGBUS; mutex_lock(&us122l->mutex); s = us122l->sk.s; if (!s) - goto unlock; + goto out; offset = vmf->pgoff << PAGE_SHIFT; if (offset < PAGE_ALIGN(s->read_size)) @@ -130,7 +131,7 @@ static int usb_stream_hwdep_vm_fault(struct vm_area_struct *area, else { offset -= PAGE_ALIGN(s->read_size); if (offset >= PAGE_ALIGN(s->write_size)) - goto unlock; + goto out; vaddr = us122l->sk.write_page + offset; } @@ -140,11 +141,9 @@ static int usb_stream_hwdep_vm_fault(struct vm_area_struct *area, mutex_unlock(&us122l->mutex); vmf->page = page; - - return 0; -unlock: - mutex_unlock(&us122l->mutex); - return VM_FAULT_SIGBUS; + vm_f = 0; +out: + return vm_f; } static void usb_stream_hwdep_vm_close(struct vm_area_struct *area)