diff options
author | Mark Brown <broonie@kernel.org> | 2019-05-20 13:53:50 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-20 13:53:50 +0300 |
commit | 1c7c3237c0cc4ad3c7b0df458290c8e2a652f178 (patch) | |
tree | d5d027d4dbdae390c736a82e16c57966214e2c0a /include/sound | |
parent | bfa8130f50a63563eae10ef933fe01b50b3e87a0 (diff) | |
parent | a188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff) | |
download | linux-1c7c3237c0cc4ad3c7b0df458290c8e2a652f178.tar.xz |
Merge tag 'v5.2-rc1' into asoc-5.3
Linux 5.2-rc1
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/core.h | 16 | ||||
-rw-r--r-- | include/sound/hdaudio.h | 10 | ||||
-rw-r--r-- | include/sound/memalloc.h | 4 | ||||
-rw-r--r-- | include/sound/seq_kernel.h | 3 |
4 files changed, 21 insertions, 12 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index e923c23e05dd..c90ebbc8d9c4 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -226,7 +226,6 @@ int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size /* init.c */ -extern struct snd_card *snd_cards[SNDRV_CARDS]; int snd_card_locked(int card); #if IS_ENABLED(CONFIG_SND_MIXER_OSS) #define SND_MIXER_OSS_NOTIFY_REGISTER 0 @@ -251,7 +250,20 @@ int snd_card_add_dev_attr(struct snd_card *card, int snd_component_add(struct snd_card *card, const char *component); int snd_card_file_add(struct snd_card *card, struct file *file); int snd_card_file_remove(struct snd_card *card, struct file *file); -#define snd_card_unref(card) put_device(&(card)->card_dev) + +struct snd_card *snd_card_ref(int card); + +/** + * snd_card_unref - Unreference the card object + * @card: the card object to unreference + * + * Call this function for the card object that was obtained via snd_card_ref() + * or snd_lookup_minor_data(). + */ +static inline void snd_card_unref(struct snd_card *card) +{ + put_device(&card->card_dev); +} #define snd_card_set_dev(card, devptr) ((card)->dev = (devptr)) diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index 45f944d57982..e8346784cf3f 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -81,6 +81,7 @@ struct hdac_device { atomic_t in_pm; /* suspend/resume being performed */ /* sysfs */ + struct mutex widget_lock; struct hdac_widget_tree *widgets; /* regmap */ @@ -297,7 +298,7 @@ struct hdac_rb { * @num_streams: streams supported * @idx: HDA link index * @hlink_list: link list of HDA links - * @lock: lock for link mgmt + * @lock: lock for link and display power mgmt * @cmd_dma_state: state of cmd DMAs: CORB and RIRB */ struct hdac_bus { @@ -363,21 +364,20 @@ struct hdac_bus { /* locks */ spinlock_t reg_lock; struct mutex cmd_mutex; + struct mutex lock; /* DRM component interface */ struct drm_audio_component *audio_component; long display_power_status; - bool display_power_active; + unsigned long display_power_active; /* parameters required for enhanced capabilities */ int num_streams; int idx; + /* link management */ struct list_head hlink_list; - - struct mutex lock; bool cmd_dma_state; - }; int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h index 1ac0dd82a916..4c6f3b5a7cff 100644 --- a/include/sound/memalloc.h +++ b/include/sound/memalloc.h @@ -151,9 +151,5 @@ int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size, struct snd_dma_buffer *dmab); void snd_dma_free_pages(struct snd_dma_buffer *dmab); -/* basic memory allocation functions */ -void *snd_malloc_pages(size_t size, gfp_t gfp_flags); -void snd_free_pages(void *ptr, size_t size); - #endif /* __SOUND_MEMALLOC_H */ diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h index 4b9ee3009aa0..c7a5433e109a 100644 --- a/include/sound/seq_kernel.h +++ b/include/sound/seq_kernel.h @@ -73,7 +73,8 @@ __printf(3, 4) int snd_seq_create_kernel_client(struct snd_card *card, int client_index, const char *name_fmt, ...); int snd_seq_delete_kernel_client(int client); -int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop); +int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, + struct file *file, bool blocking); int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop); int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg); |