ALSA: hda - Remove shutup calls in free callbacks
[pandora-kernel.git] / sound / pci / hda / patch_sigmatel.c
index 770013f..1f6fd58 100644 (file)
@@ -1081,7 +1081,7 @@ static struct snd_kcontrol_new stac_smux_mixer = {
 
 static const char * const slave_pfxs[] = {
        "Front", "Surround", "Center", "LFE", "Side",
-       "Headphone", "Speaker", "IEC958", "PCM",
+       "Headphone", "Speaker", "Bass Speaker", "IEC958", "PCM",
        NULL
 };
 
@@ -1136,9 +1136,10 @@ static int stac92xx_build_controls(struct hda_codec *codec)
        }
 
        if (spec->multiout.dig_out_nid) {
-               err = snd_hda_create_spdif_out_ctls(codec,
-                                                   spec->multiout.dig_out_nid,
-                                                   spec->multiout.dig_out_nid);
+               err = snd_hda_create_dig_out_ctls(codec,
+                                                 spec->multiout.dig_out_nid,
+                                                 spec->multiout.dig_out_nid,
+                                                 spec->autocfg.dig_out_type[0]);
                if (err < 0)
                        return err;
                err = snd_hda_create_spdif_share_sw(codec,
@@ -1763,6 +1764,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
                          "HP", STAC_HP_ZEPHYR),
        SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3660,
                          "HP Mini", STAC_92HD83XXX_HP_LED),
+       SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x144E,
+                         "HP Pavilion dv5", STAC_92HD83XXX_HP_INV_LED),
        {} /* terminator */
 };
 
@@ -2513,6 +2516,11 @@ static int stac92xx_build_pcms(struct hda_codec *codec)
        info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback;
        info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
                spec->multiout.dac_nids[0];
+       if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT &&
+           spec->autocfg.line_outs == 2)
+               info->stream[SNDRV_PCM_STREAM_PLAYBACK].chmap =
+                       snd_pcm_2_1_chmaps;
+
        info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture;
        info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0];
        info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs;
@@ -3266,9 +3274,9 @@ static int create_multi_out_ctls(struct hda_codec *codec, int num_outs,
                                idx = i;
                                break;
                        case AUTO_PIN_SPEAKER_OUT:
-                               if (num_outs <= 1) {
-                                       name = "Speaker";
-                                       idx = i;
+                               if (num_outs <= 2) {
+                                       name = i ? "Bass Speaker" : "Speaker";
+                                       idx = 0;
                                        break;
                                }
                                /* Fall through in case of multi speaker outs */
@@ -4567,8 +4575,6 @@ static void stac92xx_free(struct hda_codec *codec)
        if (! spec)
                return;
 
-       stac92xx_shutup(codec);
-
        kfree(spec);
        snd_hda_detach_beep_device(codec);
 }