提交 8eb88c80 编写于 作者: L Linus Torvalds

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: Fix debugfs_create_dir's error checking method for sound/soc/
  ALSA: ASoC: Convert playpaq_wm8510 to bulk route registration API
  ALSA: kernel docs: fix sound/core/ kernel-doc
  ALSA: Handle NULL jacks in snd_jack_report()
  ALSA: hda - Fix PCM type of Nvidia HDMI devices
...@@ -147,6 +147,9 @@ EXPORT_SYMBOL(snd_jack_set_parent); ...@@ -147,6 +147,9 @@ EXPORT_SYMBOL(snd_jack_set_parent);
*/ */
void snd_jack_report(struct snd_jack *jack, int status) void snd_jack_report(struct snd_jack *jack, int status)
{ {
if (!jack)
return;
if (jack->type & SND_JACK_HEADPHONE) if (jack->type & SND_JACK_HEADPHONE)
input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT, input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT,
status & SND_JACK_HEADPHONE); status & SND_JACK_HEADPHONE);
......
...@@ -908,12 +908,12 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond, ...@@ -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); EXPORT_SYMBOL(snd_pcm_hw_rule_add);
/** /**
* snd_pcm_hw_constraint_mask * snd_pcm_hw_constraint_mask - apply the given bitmap mask constraint
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @var: hw_params variable to apply the mask * @var: hw_params variable to apply the mask
* @mask: the bitmap mask * @mask: the bitmap mask
* *
* Apply the constraint of the given bitmap mask to a mask parameter. * Apply the constraint of the given bitmap mask to a 32-bit mask parameter.
*/ */
int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
u_int32_t mask) u_int32_t mask)
...@@ -928,12 +928,12 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param ...@@ -928,12 +928,12 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param
} }
/** /**
* snd_pcm_hw_constraint_mask64 * snd_pcm_hw_constraint_mask64 - apply the given bitmap mask constraint
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @var: hw_params variable to apply the mask * @var: hw_params variable to apply the mask
* @mask: the 64bit bitmap mask * @mask: the 64bit bitmap mask
* *
* Apply the constraint of the given bitmap mask to a mask parameter. * Apply the constraint of the given bitmap mask to a 64-bit mask parameter.
*/ */
int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var, int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
u_int64_t mask) u_int64_t mask)
...@@ -949,7 +949,7 @@ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_par ...@@ -949,7 +949,7 @@ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_par
} }
/** /**
* snd_pcm_hw_constraint_integer * snd_pcm_hw_constraint_integer - apply an integer constraint to an interval
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @var: hw_params variable to apply the integer constraint * @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 ...@@ -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); EXPORT_SYMBOL(snd_pcm_hw_constraint_integer);
/** /**
* snd_pcm_hw_constraint_minmax * snd_pcm_hw_constraint_minmax - apply a min/max range constraint to an interval
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @var: hw_params variable to apply the range * @var: hw_params variable to apply the range
* @min: the minimal value * @min: the minimal value
...@@ -995,7 +995,7 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params, ...@@ -995,7 +995,7 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
/** /**
* snd_pcm_hw_constraint_list * snd_pcm_hw_constraint_list - apply a list of constraints to a parameter
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @cond: condition bits * @cond: condition bits
* @var: hw_params variable to apply the list constraint * @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, ...@@ -1031,7 +1031,7 @@ static int snd_pcm_hw_rule_ratnums(struct snd_pcm_hw_params *params,
} }
/** /**
* snd_pcm_hw_constraint_ratnums * snd_pcm_hw_constraint_ratnums - apply ratnums constraint to a parameter
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @cond: condition bits * @cond: condition bits
* @var: hw_params variable to apply the ratnums constraint * @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, ...@@ -1064,7 +1064,7 @@ static int snd_pcm_hw_rule_ratdens(struct snd_pcm_hw_params *params,
} }
/** /**
* snd_pcm_hw_constraint_ratdens * snd_pcm_hw_constraint_ratdens - apply ratdens constraint to a parameter
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @cond: condition bits * @cond: condition bits
* @var: hw_params variable to apply the ratdens constraint * @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, ...@@ -1095,7 +1095,7 @@ static int snd_pcm_hw_rule_msbits(struct snd_pcm_hw_params *params,
} }
/** /**
* snd_pcm_hw_constraint_msbits * snd_pcm_hw_constraint_msbits - add a hw constraint msbits rule
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @cond: condition bits * @cond: condition bits
* @width: sample bits width * @width: sample bits width
...@@ -1123,7 +1123,7 @@ static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params, ...@@ -1123,7 +1123,7 @@ static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params,
} }
/** /**
* snd_pcm_hw_constraint_step * snd_pcm_hw_constraint_step - add a hw constraint step rule
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @cond: condition bits * @cond: condition bits
* @var: hw_params variable to apply the step constraint * @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 ...@@ -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 * snd_pcm_hw_constraint_pow2 - add a hw constraint power-of-2 rule
* @runtime: PCM runtime instance * @runtime: PCM runtime instance
* @cond: condition bits * @cond: condition bits
* @var: hw_params variable to apply the power-of-2 constraint * @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) ...@@ -1202,13 +1202,13 @@ void _snd_pcm_hw_params_any(struct snd_pcm_hw_params *params)
EXPORT_SYMBOL(_snd_pcm_hw_params_any); EXPORT_SYMBOL(_snd_pcm_hw_params_any);
/** /**
* snd_pcm_hw_param_value * snd_pcm_hw_param_value - return @params field @var value
* @params: the hw_params instance * @params: the hw_params instance
* @var: parameter to retrieve * @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 PAR if it's fixed in configuration space * Return the value for field @var if it's fixed in configuration space
* defined by PARAMS. Return -EINVAL otherwise * defined by @params. Return -%EINVAL otherwise.
*/ */
int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params, int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var, int *dir) 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, ...@@ -1271,13 +1271,13 @@ static int _snd_pcm_hw_param_first(struct snd_pcm_hw_params *params,
/** /**
* snd_pcm_hw_param_first * snd_pcm_hw_param_first - refine config space and return minimum value
* @pcm: PCM instance * @pcm: PCM instance
* @params: the hw_params instance * @params: the hw_params instance
* @var: parameter to retrieve * @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 PAR all * Inside configuration space defined by @params remove from @var all
* values > minimum. Reduce configuration space accordingly. * values > minimum. Reduce configuration space accordingly.
* Return the minimum. * Return the minimum.
*/ */
...@@ -1317,13 +1317,13 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params, ...@@ -1317,13 +1317,13 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params,
/** /**
* snd_pcm_hw_param_last * snd_pcm_hw_param_last - refine config space and return maximum value
* @pcm: PCM instance * @pcm: PCM instance
* @params: the hw_params instance * @params: the hw_params instance
* @var: parameter to retrieve * @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 PAR all * Inside configuration space defined by @params remove from @var all
* values < maximum. Reduce configuration space accordingly. * values < maximum. Reduce configuration space accordingly.
* Return the maximum. * Return the maximum.
*/ */
...@@ -1345,11 +1345,11 @@ int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, ...@@ -1345,11 +1345,11 @@ int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm,
EXPORT_SYMBOL(snd_pcm_hw_param_last); EXPORT_SYMBOL(snd_pcm_hw_param_last);
/** /**
* snd_pcm_hw_param_choose * snd_pcm_hw_param_choose - choose a configuration defined by @params
* @pcm: PCM instance * @pcm: PCM instance
* @params: the hw_params 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: * The configuration chosen is that obtained fixing in this order:
* first access, first format, first subformat, min channels, * first access, first format, first subformat, min channels,
* min rate, min period time, max buffer size, min tick time * min rate, min period time, max buffer size, min tick time
......
...@@ -875,10 +875,8 @@ static struct action_ops snd_pcm_action_start = { ...@@ -875,10 +875,8 @@ static struct action_ops snd_pcm_action_start = {
}; };
/** /**
* snd_pcm_start * snd_pcm_start - start all linked streams
* @substream: the PCM substream instance * @substream: the PCM substream instance
*
* Start all linked streams.
*/ */
int snd_pcm_start(struct snd_pcm_substream *substream) int snd_pcm_start(struct snd_pcm_substream *substream)
{ {
...@@ -926,12 +924,11 @@ static struct action_ops snd_pcm_action_stop = { ...@@ -926,12 +924,11 @@ static struct action_ops snd_pcm_action_stop = {
}; };
/** /**
* snd_pcm_stop * snd_pcm_stop - try to stop all running streams in the substream group
* @substream: the PCM substream instance * @substream: the PCM substream instance
* @state: PCM state after stopping the stream * @state: PCM state after stopping the stream
* *
* Try to stop all running streams in the substream group. * The state of each stream is then changed to the given state unconditionally.
* 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) int snd_pcm_stop(struct snd_pcm_substream *substream, int state)
{ {
...@@ -941,11 +938,10 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, int state) ...@@ -941,11 +938,10 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, int state)
EXPORT_SYMBOL(snd_pcm_stop); EXPORT_SYMBOL(snd_pcm_stop);
/** /**
* snd_pcm_drain_done * snd_pcm_drain_done - stop the DMA only when the given stream is playback
* @substream: the PCM substream * @substream: the PCM substream
* *
* Stop the DMA only when the given stream is playback. * After stopping, the state is changed to SETUP.
* The state is changed to SETUP.
* Unlike snd_pcm_stop(), this affects only the given stream. * Unlike snd_pcm_stop(), this affects only the given stream.
*/ */
int snd_pcm_drain_done(struct snd_pcm_substream *substream) int snd_pcm_drain_done(struct snd_pcm_substream *substream)
...@@ -1065,10 +1061,9 @@ static struct action_ops snd_pcm_action_suspend = { ...@@ -1065,10 +1061,9 @@ static struct action_ops snd_pcm_action_suspend = {
}; };
/** /**
* snd_pcm_suspend * snd_pcm_suspend - trigger SUSPEND to all linked streams
* @substream: the PCM substream * @substream: the PCM substream
* *
* Trigger SUSPEND to all linked streams.
* After this call, all streams are changed to SUSPENDED state. * After this call, all streams are changed to SUSPENDED state.
*/ */
int snd_pcm_suspend(struct snd_pcm_substream *substream) int snd_pcm_suspend(struct snd_pcm_substream *substream)
...@@ -1088,10 +1083,9 @@ int snd_pcm_suspend(struct snd_pcm_substream *substream) ...@@ -1088,10 +1083,9 @@ int snd_pcm_suspend(struct snd_pcm_substream *substream)
EXPORT_SYMBOL(snd_pcm_suspend); EXPORT_SYMBOL(snd_pcm_suspend);
/** /**
* snd_pcm_suspend_all * snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm
* @pcm: the PCM instance * @pcm: the PCM instance
* *
* Trigger SUSPEND to all substreams in the given pcm.
* After this call, all streams are changed to SUSPENDED state. * After this call, all streams are changed to SUSPENDED state.
*/ */
int snd_pcm_suspend_all(struct snd_pcm *pcm) int snd_pcm_suspend_all(struct snd_pcm *pcm)
...@@ -1313,11 +1307,9 @@ static struct action_ops snd_pcm_action_prepare = { ...@@ -1313,11 +1307,9 @@ static struct action_ops snd_pcm_action_prepare = {
}; };
/** /**
* snd_pcm_prepare * snd_pcm_prepare - prepare the PCM substream to be triggerable
* @substream: the PCM substream instance * @substream: the PCM substream instance
* @file: file to refer f_flags * @file: file to refer f_flags
*
* Prepare the PCM substream to be triggerable.
*/ */
static int snd_pcm_prepare(struct snd_pcm_substream *substream, static int snd_pcm_prepare(struct snd_pcm_substream *substream,
struct file *file) struct file *file)
......
...@@ -116,6 +116,7 @@ static int nvhdmi_build_pcms(struct hda_codec *codec) ...@@ -116,6 +116,7 @@ static int nvhdmi_build_pcms(struct hda_codec *codec)
codec->pcm_info = info; codec->pcm_info = info;
info->name = "NVIDIA HDMI"; info->name = "NVIDIA HDMI";
info->pcm_type = HDA_PCM_TYPE_HDMI;
info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback; info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback;
return 0; return 0;
......
...@@ -304,7 +304,7 @@ static const struct snd_soc_dapm_widget playpaq_dapm_widgets[] = { ...@@ -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 */ /* speaker connected to SPKOUT */
{"Ext Spk", NULL, "SPKOUTP"}, {"Ext Spk", NULL, "SPKOUTP"},
{"Ext Spk", NULL, "SPKOUTN"}, {"Ext Spk", NULL, "SPKOUTN"},
...@@ -312,9 +312,6 @@ static const char *intercon[][3] = { ...@@ -312,9 +312,6 @@ static const char *intercon[][3] = {
{"Mic Bias", NULL, "Int Mic"}, {"Mic Bias", NULL, "Int Mic"},
{"MICN", NULL, "Mic Bias"}, {"MICN", NULL, "Mic Bias"},
{"MICP", 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) ...@@ -334,11 +331,8 @@ static int playpaq_wm8510_init(struct snd_soc_codec *codec)
/* /*
* Setup audio path interconnects * Setup audio path interconnects
*/ */
for (i = 0; intercon[i][0] != NULL; i++) { snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_connect_input(codec,
intercon[i][0],
intercon[i][1], intercon[i][2]);
}
/* always connected pins */ /* always connected pins */
......
...@@ -831,7 +831,7 @@ int snd_soc_dapm_sys_add(struct device *dev) ...@@ -831,7 +831,7 @@ int snd_soc_dapm_sys_add(struct device *dev)
return ret; return ret;
asoc_debugfs = debugfs_create_dir("asoc", NULL); 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, debugfs_create_u32("dapm_pop_time", 0744, asoc_debugfs,
&pop_time); &pop_time);
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册