Skip to content

Commit

Permalink
ALSA: hda - Enable loopback accounts for CONFIG_PM=n, too
Browse files Browse the repository at this point in the history
The loopback list is referred by the VIA codec driver no matter
whether CONFIG_PM is set or not, thus we need to enable it always.
Otherwise it gets compile errors.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Feb 7, 2013
1 parent b57a895 commit 46a1448
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,6 @@ static int create_in_jack_mode(struct hda_codec *codec, hda_nid_t pin)
* Parse input paths
*/

#ifdef CONFIG_PM
/* add the powersave loopback-list entry */
static void add_loopback_list(struct hda_gen_spec *spec, hda_nid_t mix, int idx)
{
Expand All @@ -2498,9 +2497,6 @@ static void add_loopback_list(struct hda_gen_spec *spec, hda_nid_t mix, int idx)
spec->num_loopbacks++;
spec->loopback.amplist = spec->loopback_list;
}
#else
#define add_loopback_list(spec, mix, idx) /* NOP */
#endif

/* create input playback/capture controls for the given pin */
static int new_analog_input(struct hda_codec *codec, int input_idx,
Expand Down
3 changes: 1 addition & 2 deletions sound/pci/hda/hda_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,10 @@ struct hda_gen_spec {
hda_nid_t vmaster_nid;
unsigned int vmaster_tlv[4];
struct hda_vmaster_mute_hook vmaster_mute;
#ifdef CONFIG_PM

struct hda_loopback_check loopback;
int num_loopbacks;
struct hda_amp_list loopback_list[8];
#endif

/* multi-io */
int multi_ios;
Expand Down

0 comments on commit 46a1448

Please sign in to comment.