aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-07-21 17:41:49 +0200
committerTakashi Iwai <tiwai@suse.de>2023-07-21 17:41:49 +0200
commit4ca084762272dc7415691ea57d4da8858db79ff9 (patch)
tree335cec7d6df0f62ca73cad0bff6c176a0865c394
parent15998e24f60eb3753aa5a3a1869adf635ab385a8 (diff)
downloadhda-emu-4ca084762272dc7415691ea57d4da8858db79ff9.tar.gz
Fix build on 6.5HEADmaster
Also add the missing codec registration.
-rw-r--r--hda-emu.c2
-rw-r--r--include/linux/component.h2
-rw-r--r--include/linux/iopoll.h5
-rw-r--r--include/linux/pm_runtime.h2
-rw-r--r--include/linux/regmap.h1
-rw-r--r--include/sound/asound.h4
-rw-r--r--include/sound/control.h1
-rw-r--r--include/sound/pcm.h2
-rw-r--r--include/wrapper.h6
-rw-r--r--snd-control.c6
10 files changed, 30 insertions, 1 deletions
diff --git a/hda-emu.c b/hda-emu.c
index 6d0f36e..4e5f0ef 100644
--- a/hda-emu.c
+++ b/hda-emu.c
@@ -1654,6 +1654,8 @@ int main(int argc, char **argv)
}
#endif /* !NEW_HDA_INFRA */
+ snd_hda_codec_register(codec);
+
/* power-down after init phase */
snd_hda_power_down(codec);
diff --git a/include/linux/component.h b/include/linux/component.h
index 3bdeff3..28250c4 100644
--- a/include/linux/component.h
+++ b/include/linux/component.h
@@ -45,5 +45,5 @@ static inline void component_match_add(struct device *master,
compare_data);
}
-static int component_compare_dev_name(struct device *dev, void *p) { return 0; }
+static inline int component_compare_dev_name(struct device *dev, void *p) { return 0; }
#endif
diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index 12a7aa5..3010d40 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -5,5 +5,10 @@
#define readw_poll_timeout(addr, val, cond, delay_us, timeout_us) ({0;})
#define readl_poll_timeout(addr, val, cond, delay_us, timeout_us) ({0;})
+#define read_poll_timeout(op, val, cond, sleep_us, timeout_us, \
+ sleep_before_read, args...) ({0;})
+#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \
+ delay_before_read, args...) ({0;})
+
#endif
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index a7e994b..684a3f7 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -21,6 +21,8 @@ static inline int pm_request_resume(struct device *dev) { return 0; } // XXX
int pm_runtime_get_sync(struct device *dev);
int pm_runtime_get_if_in_use(struct device *dev);
+// XXX
+#define pm_runtime_get_if_active(dev, x) pm_runtime_get_if_in_use(dev)
int pm_runtime_put_autosuspend(struct device *dev);
int pm_runtime_suspend(struct device *dev);
int pm_runtime_resume(struct device *dev);
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 27d3294..f8b116b 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -8,6 +8,7 @@
enum regcache_type {
REGCACHE_NONE,
REGCACHE_RBTREE,
+ REGCACHE_MAPLE,
REGCACHE_COMPRESSED,
REGCACHE_FLAT,
};
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 605559a..40d0c42 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -1,3 +1,6 @@
+#ifndef __SOUND_ASOUND_H
+#define __SOUND_ASOUND_H
+
struct snd_ctl_card_info {
int card; /* card number */
int pad; /* reserved for future (was type) */
@@ -223,3 +226,4 @@ enum {
#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16)
#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16)
+#endif /* __SOUND_ASOUND_H */
diff --git a/include/sound/control.h b/include/sound/control.h
index c501c3b..b52fbdd 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -60,6 +60,7 @@ int snd_ctl_add(struct snd_card * card, struct snd_kcontrol * kcontrol);
int snd_ctl_remove(struct snd_card * card, struct snd_kcontrol * kcontrol);
int snd_ctl_remove_id(struct snd_card * card, struct snd_ctl_elem_id *id);
int snd_ctl_rename_id(struct snd_card * card, struct snd_ctl_elem_id *src_id, struct snd_ctl_elem_id *dst_id);
+void snd_ctl_rename(struct snd_card *card, struct snd_kcontrol *kctl, const char *name);
int snd_ctl_activate_id(struct snd_card *card, struct snd_ctl_elem_id *id,
int active);
struct snd_kcontrol *snd_ctl_find_numid(struct snd_card * card, unsigned int numid);
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 2752911..dad7be9 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -30,6 +30,8 @@ struct snd_pcm_hardware {
};
struct snd_pcm_runtime {
+ snd_pcm_state_t state;
+ snd_pcm_state_t suspended_state;
struct timespec trigger_tstamp; /* trigger timestamp */
bool trigger_tstamp_latched; /* trigger timestamp latched in low-level driver/hardware */
snd_pcm_access_t access; /* access mode */
diff --git a/include/wrapper.h b/include/wrapper.h
index de30c03..a4ee9d3 100644
--- a/include/wrapper.h
+++ b/include/wrapper.h
@@ -230,6 +230,12 @@ static inline int _WARN_ON(int cond, const char *func, int line)
#define WARN_ON_ONCE(cond) WARN_ON(cond)
+static inline void WARN(int cond, const char *str)
+{
+ if (cond)
+ printk(KERN_ERR "WARNING! %s\n", str);
+}
+
#define simple_strtoul strtoul
#define simple_strtol strtol
diff --git a/snd-control.c b/snd-control.c
index 5a327d7..68d03ee 100644
--- a/snd-control.c
+++ b/snd-control.c
@@ -104,6 +104,12 @@ int snd_ctl_rename_id(struct snd_card *card, struct snd_ctl_elem_id *src_id,
return 0;
}
+void snd_ctl_rename(struct snd_card *card, struct snd_kcontrol *kctl,
+ const char *name)
+{
+ strscpy(kctl->id.name, name, sizeof(kctl->id.name));
+}
+
struct snd_kcontrol *snd_ctl_find_numid(struct snd_card *card, unsigned int numid)
{
struct snd_kcontrol *kctl;