aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-20 15:02:30 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-20 15:02:30 +0100
commit57b2c84e5a45d12e1da7b939445485b1bcca8386 (patch)
tree64eeeccc254f5e06292429e0e0093fec571db471
parent8bd86cc3a610d1f4518d094b10d71caf392aff3b (diff)
downloadhda-emu-57b2c84e5a45d12e1da7b939445485b1bcca8386.tar.gz
Fix the build with 5.0 / 5.1 kernel
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--hda_own_proc.c1
-rw-r--r--include/sound/core.h1
-rw-r--r--include/sound/info.h31
3 files changed, 32 insertions, 1 deletions
diff --git a/hda_own_proc.c b/hda_own_proc.c
index 429d496..7c1ec84 100644
--- a/hda_own_proc.c
+++ b/hda_own_proc.c
@@ -748,4 +748,3 @@ int snd_hda_codec_proc_new(struct hda_codec *codec)
snd_info_set_text_ops(entry, codec, print_codec_info);
return 0;
}
-
diff --git a/include/sound/core.h b/include/sound/core.h
index 1196319..d7cf61e 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -79,6 +79,7 @@ typedef int snd_device_type_t;
#define SNDRV_DEV_INFO (0x1006)
#define SNDRV_DEV_BUS (0x1007)
#define SNDRV_DEV_CODEC (0x1008)
+#define SNDRV_DEV_JACK (0x1009)
#define SNDRV_DEV_LOWLEVEL (0x2000)
struct snd_device_ops {
diff --git a/include/sound/info.h b/include/sound/info.h
index 33035cb..fcbaba5 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -58,4 +58,35 @@ static inline int snd_info_get_line(struct snd_info_buffer *buffer, char *line,
return 1; /* EOF */
}
+static inline
+int snd_card_rw_proc_new(struct snd_card *card, const char *name,
+ void *private_data,
+ void (*read)(struct snd_info_entry *,
+ struct snd_info_buffer *),
+ void (*write)(struct snd_info_entry *entry,
+ struct snd_info_buffer *buffer))
+{
+ struct snd_info_entry *entry;
+ int err;
+
+ err = snd_card_proc_new(card, name, &entry);
+ if (err < 0)
+ return err;
+ snd_info_set_text_ops(entry, private_data, read);
+ if (write) {
+ entry->mode |= 0200;
+ entry->c.text.write = write;
+ }
+ return 0;
+}
+
+static inline int
+snd_card_ro_proc_new(struct snd_card *card, const char *name,
+ void *private_data,
+ void (*read)(struct snd_info_entry *,
+ struct snd_info_buffer *))
+{
+ return snd_card_rw_proc_new(card, name, private_data, read, NULL);
+}
+
#endif /* __SOUND_INFO_H */