Skip to content

Commit 8eb88c8

Browse files
committed
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
2 parents c53dbf5 + 219b22b commit 8eb88c8

File tree

6 files changed

+40
-50
lines changed

6 files changed

+40
-50
lines changed

sound/core/jack.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ EXPORT_SYMBOL(snd_jack_set_parent);
147147
*/
148148
void snd_jack_report(struct snd_jack *jack, int status)
149149
{
150+
if (!jack)
151+
return;
152+
150153
if (jack->type & SND_JACK_HEADPHONE)
151154
input_report_switch(jack->input_dev, SW_HEADPHONE_INSERT,
152155
status & SND_JACK_HEADPHONE);

sound/core/pcm_lib.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -908,12 +908,12 @@ int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime, unsigned int cond,
908908
EXPORT_SYMBOL(snd_pcm_hw_rule_add);
909909

910910
/**
911-
* snd_pcm_hw_constraint_mask
911+
* snd_pcm_hw_constraint_mask - apply the given bitmap mask constraint
912912
* @runtime: PCM runtime instance
913913
* @var: hw_params variable to apply the mask
914914
* @mask: the bitmap mask
915915
*
916-
* Apply the constraint of the given bitmap mask to a mask parameter.
916+
* Apply the constraint of the given bitmap mask to a 32-bit mask parameter.
917917
*/
918918
int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
919919
u_int32_t mask)
@@ -928,12 +928,12 @@ int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime, snd_pcm_hw_param
928928
}
929929

930930
/**
931-
* snd_pcm_hw_constraint_mask64
931+
* snd_pcm_hw_constraint_mask64 - apply the given bitmap mask constraint
932932
* @runtime: PCM runtime instance
933933
* @var: hw_params variable to apply the mask
934934
* @mask: the 64bit bitmap mask
935935
*
936-
* Apply the constraint of the given bitmap mask to a mask parameter.
936+
* Apply the constraint of the given bitmap mask to a 64-bit mask parameter.
937937
*/
938938
int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_param_t var,
939939
u_int64_t mask)
@@ -949,7 +949,7 @@ int snd_pcm_hw_constraint_mask64(struct snd_pcm_runtime *runtime, snd_pcm_hw_par
949949
}
950950

951951
/**
952-
* snd_pcm_hw_constraint_integer
952+
* snd_pcm_hw_constraint_integer - apply an integer constraint to an interval
953953
* @runtime: PCM runtime instance
954954
* @var: hw_params variable to apply the integer constraint
955955
*
@@ -964,7 +964,7 @@ int snd_pcm_hw_constraint_integer(struct snd_pcm_runtime *runtime, snd_pcm_hw_pa
964964
EXPORT_SYMBOL(snd_pcm_hw_constraint_integer);
965965

966966
/**
967-
* snd_pcm_hw_constraint_minmax
967+
* snd_pcm_hw_constraint_minmax - apply a min/max range constraint to an interval
968968
* @runtime: PCM runtime instance
969969
* @var: hw_params variable to apply the range
970970
* @min: the minimal value
@@ -995,7 +995,7 @@ static int snd_pcm_hw_rule_list(struct snd_pcm_hw_params *params,
995995

996996

997997
/**
998-
* snd_pcm_hw_constraint_list
998+
* snd_pcm_hw_constraint_list - apply a list of constraints to a parameter
999999
* @runtime: PCM runtime instance
10001000
* @cond: condition bits
10011001
* @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,
10311031
}
10321032

10331033
/**
1034-
* snd_pcm_hw_constraint_ratnums
1034+
* snd_pcm_hw_constraint_ratnums - apply ratnums constraint to a parameter
10351035
* @runtime: PCM runtime instance
10361036
* @cond: condition bits
10371037
* @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,
10641064
}
10651065

10661066
/**
1067-
* snd_pcm_hw_constraint_ratdens
1067+
* snd_pcm_hw_constraint_ratdens - apply ratdens constraint to a parameter
10681068
* @runtime: PCM runtime instance
10691069
* @cond: condition bits
10701070
* @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,
10951095
}
10961096

10971097
/**
1098-
* snd_pcm_hw_constraint_msbits
1098+
* snd_pcm_hw_constraint_msbits - add a hw constraint msbits rule
10991099
* @runtime: PCM runtime instance
11001100
* @cond: condition bits
11011101
* @width: sample bits width
@@ -1123,7 +1123,7 @@ static int snd_pcm_hw_rule_step(struct snd_pcm_hw_params *params,
11231123
}
11241124

11251125
/**
1126-
* snd_pcm_hw_constraint_step
1126+
* snd_pcm_hw_constraint_step - add a hw constraint step rule
11271127
* @runtime: PCM runtime instance
11281128
* @cond: condition bits
11291129
* @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
11541154
}
11551155

11561156
/**
1157-
* snd_pcm_hw_constraint_pow2
1157+
* snd_pcm_hw_constraint_pow2 - add a hw constraint power-of-2 rule
11581158
* @runtime: PCM runtime instance
11591159
* @cond: condition bits
11601160
* @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)
12021202
EXPORT_SYMBOL(_snd_pcm_hw_params_any);
12031203

12041204
/**
1205-
* snd_pcm_hw_param_value
1205+
* snd_pcm_hw_param_value - return @params field @var value
12061206
* @params: the hw_params instance
12071207
* @var: parameter to retrieve
1208-
* @dir: pointer to the direction (-1,0,1) or NULL
1208+
* @dir: pointer to the direction (-1,0,1) or %NULL
12091209
*
1210-
* Return the value for field PAR if it's fixed in configuration space
1211-
* defined by PARAMS. Return -EINVAL otherwise
1210+
* Return the value for field @var if it's fixed in configuration space
1211+
* defined by @params. Return -%EINVAL otherwise.
12121212
*/
12131213
int snd_pcm_hw_param_value(const struct snd_pcm_hw_params *params,
12141214
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,
12711271

12721272

12731273
/**
1274-
* snd_pcm_hw_param_first
1274+
* snd_pcm_hw_param_first - refine config space and return minimum value
12751275
* @pcm: PCM instance
12761276
* @params: the hw_params instance
12771277
* @var: parameter to retrieve
1278-
* @dir: pointer to the direction (-1,0,1) or NULL
1278+
* @dir: pointer to the direction (-1,0,1) or %NULL
12791279
*
1280-
* Inside configuration space defined by PARAMS remove from PAR all
1280+
* Inside configuration space defined by @params remove from @var all
12811281
* values > minimum. Reduce configuration space accordingly.
12821282
* Return the minimum.
12831283
*/
@@ -1317,13 +1317,13 @@ static int _snd_pcm_hw_param_last(struct snd_pcm_hw_params *params,
13171317

13181318

13191319
/**
1320-
* snd_pcm_hw_param_last
1320+
* snd_pcm_hw_param_last - refine config space and return maximum value
13211321
* @pcm: PCM instance
13221322
* @params: the hw_params instance
13231323
* @var: parameter to retrieve
1324-
* @dir: pointer to the direction (-1,0,1) or NULL
1324+
* @dir: pointer to the direction (-1,0,1) or %NULL
13251325
*
1326-
* Inside configuration space defined by PARAMS remove from PAR all
1326+
* Inside configuration space defined by @params remove from @var all
13271327
* values < maximum. Reduce configuration space accordingly.
13281328
* Return the maximum.
13291329
*/
@@ -1345,11 +1345,11 @@ int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm,
13451345
EXPORT_SYMBOL(snd_pcm_hw_param_last);
13461346

13471347
/**
1348-
* snd_pcm_hw_param_choose
1348+
* snd_pcm_hw_param_choose - choose a configuration defined by @params
13491349
* @pcm: PCM instance
13501350
* @params: the hw_params instance
13511351
*
1352-
* Choose one configuration from configuration space defined by PARAMS
1352+
* Choose one configuration from configuration space defined by @params.
13531353
* The configuration chosen is that obtained fixing in this order:
13541354
* first access, first format, first subformat, min channels,
13551355
* min rate, min period time, max buffer size, min tick time

sound/core/pcm_native.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -875,10 +875,8 @@ static struct action_ops snd_pcm_action_start = {
875875
};
876876

877877
/**
878-
* snd_pcm_start
878+
* snd_pcm_start - start all linked streams
879879
* @substream: the PCM substream instance
880-
*
881-
* Start all linked streams.
882880
*/
883881
int snd_pcm_start(struct snd_pcm_substream *substream)
884882
{
@@ -926,12 +924,11 @@ static struct action_ops snd_pcm_action_stop = {
926924
};
927925

928926
/**
929-
* snd_pcm_stop
927+
* snd_pcm_stop - try to stop all running streams in the substream group
930928
* @substream: the PCM substream instance
931929
* @state: PCM state after stopping the stream
932930
*
933-
* Try to stop all running streams in the substream group.
934-
* The state of each stream is changed to the given value after that unconditionally.
931+
* The state of each stream is then changed to the given state unconditionally.
935932
*/
936933
int snd_pcm_stop(struct snd_pcm_substream *substream, int state)
937934
{
@@ -941,11 +938,10 @@ int snd_pcm_stop(struct snd_pcm_substream *substream, int state)
941938
EXPORT_SYMBOL(snd_pcm_stop);
942939

943940
/**
944-
* snd_pcm_drain_done
941+
* snd_pcm_drain_done - stop the DMA only when the given stream is playback
945942
* @substream: the PCM substream
946943
*
947-
* Stop the DMA only when the given stream is playback.
948-
* The state is changed to SETUP.
944+
* After stopping, the state is changed to SETUP.
949945
* Unlike snd_pcm_stop(), this affects only the given stream.
950946
*/
951947
int snd_pcm_drain_done(struct snd_pcm_substream *substream)
@@ -1065,10 +1061,9 @@ static struct action_ops snd_pcm_action_suspend = {
10651061
};
10661062

10671063
/**
1068-
* snd_pcm_suspend
1064+
* snd_pcm_suspend - trigger SUSPEND to all linked streams
10691065
* @substream: the PCM substream
10701066
*
1071-
* Trigger SUSPEND to all linked streams.
10721067
* After this call, all streams are changed to SUSPENDED state.
10731068
*/
10741069
int snd_pcm_suspend(struct snd_pcm_substream *substream)
@@ -1088,10 +1083,9 @@ int snd_pcm_suspend(struct snd_pcm_substream *substream)
10881083
EXPORT_SYMBOL(snd_pcm_suspend);
10891084

10901085
/**
1091-
* snd_pcm_suspend_all
1086+
* snd_pcm_suspend_all - trigger SUSPEND to all substreams in the given pcm
10921087
* @pcm: the PCM instance
10931088
*
1094-
* Trigger SUSPEND to all substreams in the given pcm.
10951089
* After this call, all streams are changed to SUSPENDED state.
10961090
*/
10971091
int snd_pcm_suspend_all(struct snd_pcm *pcm)
@@ -1313,11 +1307,9 @@ static struct action_ops snd_pcm_action_prepare = {
13131307
};
13141308

13151309
/**
1316-
* snd_pcm_prepare
1310+
* snd_pcm_prepare - prepare the PCM substream to be triggerable
13171311
* @substream: the PCM substream instance
13181312
* @file: file to refer f_flags
1319-
*
1320-
* Prepare the PCM substream to be triggerable.
13211313
*/
13221314
static int snd_pcm_prepare(struct snd_pcm_substream *substream,
13231315
struct file *file)

sound/pci/hda/patch_nvhdmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ static int nvhdmi_build_pcms(struct hda_codec *codec)
116116
codec->pcm_info = info;
117117

118118
info->name = "NVIDIA HDMI";
119+
info->pcm_type = HDA_PCM_TYPE_HDMI;
119120
info->stream[SNDRV_PCM_STREAM_PLAYBACK] = nvhdmi_pcm_digital_playback;
120121

121122
return 0;

sound/soc/at32/playpaq_wm8510.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,14 @@ static const struct snd_soc_dapm_widget playpaq_dapm_widgets[] = {
304304

305305

306306

307-
static const char *intercon[][3] = {
307+
static const struct snd_soc_dapm_route intercon[] = {
308308
/* speaker connected to SPKOUT */
309309
{"Ext Spk", NULL, "SPKOUTP"},
310310
{"Ext Spk", NULL, "SPKOUTN"},
311311

312312
{"Mic Bias", NULL, "Int Mic"},
313313
{"MICN", NULL, "Mic Bias"},
314314
{"MICP", NULL, "Mic Bias"},
315-
316-
/* Terminator */
317-
{NULL, NULL, NULL},
318315
};
319316

320317

@@ -334,11 +331,8 @@ static int playpaq_wm8510_init(struct snd_soc_codec *codec)
334331
/*
335332
* Setup audio path interconnects
336333
*/
337-
for (i = 0; intercon[i][0] != NULL; i++) {
338-
snd_soc_dapm_connect_input(codec,
339-
intercon[i][0],
340-
intercon[i][1], intercon[i][2]);
341-
}
334+
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
335+
342336

343337

344338
/* always connected pins */

sound/soc/soc-dapm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ int snd_soc_dapm_sys_add(struct device *dev)
831831
return ret;
832832

833833
asoc_debugfs = debugfs_create_dir("asoc", NULL);
834-
if (!IS_ERR(asoc_debugfs))
834+
if (!IS_ERR(asoc_debugfs) && asoc_debugfs)
835835
debugfs_create_u32("dapm_pop_time", 0744, asoc_debugfs,
836836
&pop_time);
837837
else

0 commit comments

Comments
 (0)