Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120548
b: refs/heads/master
c: c21ca4a
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Dec 19, 2008
1 parent d5389ad commit 0152400
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 282 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: d4d9cd0338892e7f0d65f8a110473d175535cd5d
refs/heads/master: c21ca4a872697aeda4fe91bf9b6cc8380c62827c
2 changes: 0 additions & 2 deletions trunk/Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
model - force the model name
position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF)
probe_mask - Bitmask to probe codecs (default = -1, meaning all slots)
probe_only - Only probing and no codec initialization (default=off);
Useful to check the initial codec status for debugging
bdl_pos_adj - Specifies the DMA IRQ timing delay in samples.
Passing -1 will make the driver to choose the appropriate
value based on the controller chip.
Expand Down
12 changes: 5 additions & 7 deletions trunk/sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ static void snd_hda_codec_free(struct hda_codec *codec)
* Returns 0 if successful, or a negative error code.
*/
int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
int do_init, struct hda_codec **codecp)
struct hda_codec **codecp)
{
struct hda_codec *codec;
char component[31];
Expand Down Expand Up @@ -793,12 +793,10 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr
if (bus->modelname)
codec->modelname = kstrdup(bus->modelname, GFP_KERNEL);

if (do_init) {
err = snd_hda_codec_configure(codec);
if (err < 0) {
snd_hda_codec_free(codec);
return err;
}
err = snd_hda_codec_configure(codec);
if (err < 0) {
snd_hda_codec_free(codec);
return err;
}
snd_hda_codec_proc_new(codec);

Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ enum {
int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp,
struct hda_bus **busp);
int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
int do_init, struct hda_codec **codecp);
struct hda_codec **codecp);

/*
* low level functions
Expand Down
11 changes: 3 additions & 8 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ static char *model[SNDRV_CARDS];
static int position_fix[SNDRV_CARDS];
static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
static int probe_only[SNDRV_CARDS];
static int single_cmd;
static int enable_msi;

Expand All @@ -77,8 +76,6 @@ module_param_array(bdl_pos_adj, int, NULL, 0644);
MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset.");
module_param_array(probe_mask, int, NULL, 0444);
MODULE_PARM_DESC(probe_mask, "Bitmask to probe codecs (default = -1).");
module_param_array(probe_only, bool, NULL, 0444);
MODULE_PARM_DESC(probe_only, "Only probing and no codec initialization.");
module_param(single_cmd, bool, 0444);
MODULE_PARM_DESC(single_cmd, "Use single command to communicate with codecs "
"(for debugging only).");
Expand Down Expand Up @@ -1227,8 +1224,7 @@ static unsigned int azx_max_codecs[AZX_NUM_DRIVERS] __devinitdata = {
};

static int __devinit azx_codec_create(struct azx *chip, const char *model,
unsigned int codec_probe_mask,
int no_init)
unsigned int codec_probe_mask)
{
struct hda_bus_template bus_temp;
int c, codecs, err;
Expand Down Expand Up @@ -1286,7 +1282,7 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model,
for (c = 0; c < max_slots; c++) {
if ((chip->codec_mask & (1 << c)) & codec_probe_mask) {
struct hda_codec *codec;
err = snd_hda_codec_new(chip->bus, c, !no_init, &codec);
err = snd_hda_codec_new(chip->bus, c, &codec);
if (err < 0)
continue;
codecs++;
Expand Down Expand Up @@ -2344,8 +2340,7 @@ static int __devinit azx_probe(struct pci_dev *pci,
card->private_data = chip;

/* create codec instances */
err = azx_codec_create(chip, model[dev], probe_mask[dev],
probe_only[dev]);
err = azx_codec_create(chip, model[dev], probe_mask[dev]);
if (err < 0)
goto out_free;

Expand Down
Loading

0 comments on commit 0152400

Please sign in to comment.