Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120483
b: refs/heads/master
c: f208dba
h: refs/heads/master
i:
  120481: 1d88385
  120479: 9407b00
v: v3
  • Loading branch information
Takashi Iwai committed Nov 21, 2008
1 parent 436e7a6 commit 0fd33e1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 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: b94d3539de59ec6481e38f83c455324fd3aeabc1
refs/heads/master: f208dba97f2f3ff2fbcbe771195061e2a0dac870
11 changes: 10 additions & 1 deletion trunk/sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,17 @@ int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld)
snd_info_set_text_ops(entry, eld, hdmi_print_eld_info);
entry->c.text.write = hdmi_write_eld_item;
entry->mode |= S_IWUSR;
eld->proc_entry = entry;

return 0;
}

#endif
void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld)
{
if (!codec->bus->shutdown && eld->proc_entry) {
snd_device_free(codec->bus->card, eld->proc_entry);
eld->proc_entry = NULL;
}
}

#endif /* CONFIG_PROC_FS */
8 changes: 8 additions & 0 deletions trunk/sound/pci/hda/hda_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,9 @@ struct hdmi_eld {
int spk_alloc;
int sad_count;
struct cea_sad sad[ELD_MAX_SAD];
#ifdef CONFIG_PROC_FS
struct snd_info_entry *proc_entry;
#endif
};

int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid);
Expand All @@ -489,12 +492,17 @@ void snd_hdmi_show_eld(struct hdmi_eld *eld);

#ifdef CONFIG_PROC_FS
int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld);
void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld);
#else
static inline int snd_hda_eld_proc_new(struct hda_codec *codec,
struct hdmi_eld *eld)
{
return 0;
}
static inline void snd_hda_eld_proc_free(struct hda_codec *codec,
struct hdmi_eld *eld)
{
}
#endif

#define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE 80
Expand Down
5 changes: 4 additions & 1 deletion trunk/sound/pci/hda/patch_intelhdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,10 @@ static int intel_hdmi_init(struct hda_codec *codec)

static void intel_hdmi_free(struct hda_codec *codec)
{
kfree(codec->spec);
struct intel_hdmi_spec *spec = codec->spec;

snd_hda_eld_proc_free(codec, &spec->sink_eld);
kfree(spec);
}

static struct hda_codec_ops intel_hdmi_patch_ops = {
Expand Down

0 comments on commit 0fd33e1

Please sign in to comment.