Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118375
b: refs/heads/master
c: 4605b71
h: refs/heads/master
i:
  118373: 849c5f4
  118371: 539b505
  118367: 66f667a
v: v3
  • Loading branch information
Takashi Iwai committed Oct 31, 2008
1 parent 345373a commit e96a469
Show file tree
Hide file tree
Showing 93 changed files with 908 additions and 2,189 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55e03a68d2489d116a5c5e8111ecef3f69831ed6
refs/heads/master: 4605b718e8b8f0dd3d811ddf90f630fd0835b7bf
1 change: 0 additions & 1 deletion trunk/include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ int snd_soc_dapm_sys_add(struct device *dev);
/* dapm audio pin control and status */
int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, char *pin);
int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin);
int snd_soc_dapm_nc_pin(struct snd_soc_codec *codec, char *pin);
int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin);
int snd_soc_dapm_sync(struct snd_soc_codec *codec);

Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/aoa/soundbus/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int soundbus_add_one(struct soundbus_dev *dev)
return -EINVAL;
}

dev_set_name(&dev->ofdev.dev, "soundbus:%x", ++devcount);
snprintf(dev->ofdev.dev.bus_id, BUS_ID_SIZE, "soundbus:%x", ++devcount);
dev->ofdev.dev.bus = &soundbus_bus_type;
return of_device_register(&dev->ofdev);
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/sound/aoa/soundbus/i2sbus/i2sbus-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)" };
Expand Down Expand Up @@ -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
Expand All @@ -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;
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/sound/arm/pxa2xx-ac97-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/arm/pxa2xx-pcm-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
7 changes: 1 addition & 6 deletions trunk/sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down
3 changes: 0 additions & 3 deletions trunk/sound/core/jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
48 changes: 24 additions & 24 deletions trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
*
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/core/pcm_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 16 additions & 8 deletions trunk/sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit e96a469

Please sign in to comment.