Merge branch 'topic/ca0106' into for-linus

* topic/ca0106:
  ALSA: ca0106 - Fix master volume scale
  ALSA: ca0106 - Add missing card->mixername field setup
  ALSA: ca0106 - Add missing registrations of vmaster controls
This commit is contained in:
Takashi Iwai 2009-06-10 07:26:22 +02:00
commit a963203c18
1 changed files with 9 additions and 1 deletions

View File

@ -739,7 +739,7 @@ static int __devinit rename_ctl(struct snd_card *card, const char *src, const ch
} while (0) } while (0)
static __devinitdata static __devinitdata
DECLARE_TLV_DB_SCALE(snd_ca0106_master_db_scale, -6375, 50, 1); DECLARE_TLV_DB_SCALE(snd_ca0106_master_db_scale, -6375, 25, 1);
static char *slave_vols[] __devinitdata = { static char *slave_vols[] __devinitdata = {
"Analog Front Playback Volume", "Analog Front Playback Volume",
@ -841,6 +841,9 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu)
snd_ca0106_master_db_scale); snd_ca0106_master_db_scale);
if (!vmaster) if (!vmaster)
return -ENOMEM; return -ENOMEM;
err = snd_ctl_add(card, vmaster);
if (err < 0)
return err;
add_slaves(card, vmaster, slave_vols); add_slaves(card, vmaster, slave_vols);
if (emu->details->spi_dac == 1) { if (emu->details->spi_dac == 1) {
@ -848,8 +851,13 @@ int __devinit snd_ca0106_mixer(struct snd_ca0106 *emu)
NULL); NULL);
if (!vmaster) if (!vmaster)
return -ENOMEM; return -ENOMEM;
err = snd_ctl_add(card, vmaster);
if (err < 0)
return err;
add_slaves(card, vmaster, slave_sws); add_slaves(card, vmaster, slave_sws);
} }
strcpy(card->mixername, "CA0106");
return 0; return 0;
} }