diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-08 01:56:19 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-08 01:56:19 -0400 |
commit | 18d4ed4342c14ebeebe60d267b171053efcdfa87 (patch) | |
tree | f315e77f66cbb70869e2f80cde5c18380a80901e /include/sound | |
parent | 722d0daf2b607a32dad1357bf797e3803484af0a (diff) | |
parent | 22de4534ae12d61257fc0e53d2571686b03305bc (diff) |
Merge branch 'for-3.1' into for-3.2
Conflict due to the fix for the register map failure - taken the for-3.1
version.
Conflicts:
sound/soc/codecs/sgtl5000.c
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/pcm.h | 35 | ||||
-rw-r--r-- | include/sound/pcm_params.h | 16 | ||||
-rw-r--r-- | include/sound/rawmidi.h | 4 | ||||
-rw-r--r-- | include/sound/sb16_csp.h | 9 | ||||
-rw-r--r-- | include/sound/soundfont.h | 2 | ||||
-rw-r--r-- | include/sound/tea575x-tuner.h | 8 |
6 files changed, 56 insertions, 18 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index e1bad1130616..57e71fa33f7c 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -507,6 +507,18 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream); | |||
507 | void snd_pcm_vma_notify_data(void *client, void *data); | 507 | void snd_pcm_vma_notify_data(void *client, void *data); |
508 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); | 508 | int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area); |
509 | 509 | ||
510 | |||
511 | #ifdef CONFIG_SND_DEBUG | ||
512 | void snd_pcm_debug_name(struct snd_pcm_substream *substream, | ||
513 | char *name, size_t len); | ||
514 | #else | ||
515 | static inline void | ||
516 | snd_pcm_debug_name(struct snd_pcm_substream *substream, char *buf, size_t size) | ||
517 | { | ||
518 | *buf = 0; | ||
519 | } | ||
520 | #endif | ||
521 | |||
510 | /* | 522 | /* |
511 | * PCM library | 523 | * PCM library |
512 | */ | 524 | */ |
@@ -749,17 +761,18 @@ static inline const struct snd_interval *hw_param_interval_c(const struct snd_pc | |||
749 | return ¶ms->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; | 761 | return ¶ms->intervals[var - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL]; |
750 | } | 762 | } |
751 | 763 | ||
752 | #define params_access(p) ((__force snd_pcm_access_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_ACCESS))) | 764 | #define params_channels(p) \ |
753 | #define params_format(p) ((__force snd_pcm_format_t)snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_FORMAT))) | 765 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min) |
754 | #define params_subformat(p) snd_mask_min(hw_param_mask((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) | 766 | #define params_rate(p) \ |
755 | #define params_channels(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_CHANNELS)->min | 767 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_RATE)->min) |
756 | #define params_rate(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_RATE)->min | 768 | #define params_period_size(p) \ |
757 | #define params_period_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min | 769 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIOD_SIZE)->min) |
758 | #define params_period_bytes(p) ((params_period_size(p)*snd_pcm_format_physical_width(params_format(p))*params_channels(p))/8) | 770 | #define params_periods(p) \ |
759 | #define params_periods(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_PERIODS)->min | 771 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_PERIODS)->min) |
760 | #define params_buffer_size(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min | 772 | #define params_buffer_size(p) \ |
761 | #define params_buffer_bytes(p) hw_param_interval((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min | 773 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_SIZE)->min) |
762 | 774 | #define params_buffer_bytes(p) \ | |
775 | (hw_param_interval_c((p), SNDRV_PCM_HW_PARAM_BUFFER_BYTES)->min) | ||
763 | 776 | ||
764 | int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); | 777 | int snd_interval_refine(struct snd_interval *i, const struct snd_interval *v); |
765 | void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); | 778 | void snd_interval_mul(const struct snd_interval *a, const struct snd_interval *b, struct snd_interval *c); |
diff --git a/include/sound/pcm_params.h b/include/sound/pcm_params.h index 85cf1cf4f31a..f494f1e3c900 100644 --- a/include/sound/pcm_params.h +++ b/include/sound/pcm_params.h | |||
@@ -337,5 +337,19 @@ static inline unsigned int sub(unsigned int a, unsigned int b) | |||
337 | return 0; | 337 | return 0; |
338 | } | 338 | } |
339 | 339 | ||
340 | #endif /* __SOUND_PCM_PARAMS_H */ | 340 | #define params_access(p) ((__force snd_pcm_access_t)\ |
341 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_ACCESS))) | ||
342 | #define params_format(p) ((__force snd_pcm_format_t)\ | ||
343 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_FORMAT))) | ||
344 | #define params_subformat(p) \ | ||
345 | snd_mask_min(hw_param_mask_c((p), SNDRV_PCM_HW_PARAM_SUBFORMAT)) | ||
341 | 346 | ||
347 | static inline unsigned int | ||
348 | params_period_bytes(const struct snd_pcm_hw_params *p) | ||
349 | { | ||
350 | return (params_period_size(p) * | ||
351 | snd_pcm_format_physical_width(params_format(p)) * | ||
352 | params_channels(p)) / 8; | ||
353 | } | ||
354 | |||
355 | #endif /* __SOUND_PCM_PARAMS_H */ | ||
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h index 2480e7d10dcf..6b14359d9fed 100644 --- a/include/sound/rawmidi.h +++ b/include/sound/rawmidi.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/spinlock.h> | 27 | #include <linux/spinlock.h> |
28 | #include <linux/wait.h> | 28 | #include <linux/wait.h> |
29 | #include <linux/mutex.h> | 29 | #include <linux/mutex.h> |
30 | #include <linux/workqueue.h> | ||
30 | 31 | ||
31 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 32 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
32 | #include "seq_device.h" | 33 | #include "seq_device.h" |
@@ -63,6 +64,7 @@ struct snd_rawmidi_global_ops { | |||
63 | }; | 64 | }; |
64 | 65 | ||
65 | struct snd_rawmidi_runtime { | 66 | struct snd_rawmidi_runtime { |
67 | struct snd_rawmidi_substream *substream; | ||
66 | unsigned int drain: 1, /* drain stage */ | 68 | unsigned int drain: 1, /* drain stage */ |
67 | oss: 1; /* OSS compatible mode */ | 69 | oss: 1; /* OSS compatible mode */ |
68 | /* midi stream buffer */ | 70 | /* midi stream buffer */ |
@@ -79,7 +81,7 @@ struct snd_rawmidi_runtime { | |||
79 | /* event handler (new bytes, input only) */ | 81 | /* event handler (new bytes, input only) */ |
80 | void (*event)(struct snd_rawmidi_substream *substream); | 82 | void (*event)(struct snd_rawmidi_substream *substream); |
81 | /* defers calls to event [input] or ops->trigger [output] */ | 83 | /* defers calls to event [input] or ops->trigger [output] */ |
82 | struct tasklet_struct tasklet; | 84 | struct work_struct event_work; |
83 | /* private data */ | 85 | /* private data */ |
84 | void *private_data; | 86 | void *private_data; |
85 | void (*private_free)(struct snd_rawmidi_substream *substream); | 87 | void (*private_free)(struct snd_rawmidi_substream *substream); |
diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h index 736eac71d053..af1b49e982df 100644 --- a/include/sound/sb16_csp.h +++ b/include/sound/sb16_csp.h | |||
@@ -99,7 +99,14 @@ struct snd_sb_csp_info { | |||
99 | /* get CSP information */ | 99 | /* get CSP information */ |
100 | #define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) | 100 | #define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) |
101 | /* load microcode to CSP */ | 101 | /* load microcode to CSP */ |
102 | #define SNDRV_SB_CSP_IOCTL_LOAD_CODE _IOW('H', 0x11, struct snd_sb_csp_microcode) | 102 | /* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits) |
103 | * defined for some architectures like MIPS, and it leads to build errors. | ||
104 | * (x86 and co have 14-bit size, thus it's valid, though.) | ||
105 | * As a workaround for skipping the size-limit check, here we don't use the | ||
106 | * normal _IOW() macro but _IOC() with the manual argument. | ||
107 | */ | ||
108 | #define SNDRV_SB_CSP_IOCTL_LOAD_CODE \ | ||
109 | _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode)) | ||
103 | /* unload microcode from CSP */ | 110 | /* unload microcode from CSP */ |
104 | #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) | 111 | #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) |
105 | /* start CSP */ | 112 | /* start CSP */ |
diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h index f95d99ba7f74..679df0574066 100644 --- a/include/sound/soundfont.h +++ b/include/sound/soundfont.h | |||
@@ -121,7 +121,7 @@ int snd_soundfont_search_zone(struct snd_sf_list *sflist, int *notep, int vel, | |||
121 | int snd_sf_calc_parm_hold(int msec); | 121 | int snd_sf_calc_parm_hold(int msec); |
122 | int snd_sf_calc_parm_attack(int msec); | 122 | int snd_sf_calc_parm_attack(int msec); |
123 | int snd_sf_calc_parm_decay(int msec); | 123 | int snd_sf_calc_parm_decay(int msec); |
124 | #define snd_sf_calc_parm_delay(msec) (0x8000 - (msec) * 1000 / 725); | 124 | #define snd_sf_calc_parm_delay(msec) (0x8000 - (msec) * 1000 / 725) |
125 | extern int snd_sf_vol_table[128]; | 125 | extern int snd_sf_vol_table[128]; |
126 | int snd_sf_linear_to_log(unsigned int amount, int offset, int ratio); | 126 | int snd_sf_linear_to_log(unsigned int amount, int offset, int ratio); |
127 | 127 | ||
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index d2ea112fc20f..726e94742a5c 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h | |||
@@ -23,8 +23,8 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
26 | #include <media/v4l2-ctrls.h> | ||
26 | #include <media/v4l2-dev.h> | 27 | #include <media/v4l2-dev.h> |
27 | #include <media/v4l2-ioctl.h> | ||
28 | 28 | ||
29 | #define TEA575X_FMIF 10700 | 29 | #define TEA575X_FMIF 10700 |
30 | 30 | ||
@@ -42,18 +42,20 @@ struct snd_tea575x_ops { | |||
42 | }; | 42 | }; |
43 | 43 | ||
44 | struct snd_tea575x { | 44 | struct snd_tea575x { |
45 | struct video_device *vd; /* video device */ | 45 | struct video_device vd; /* video device */ |
46 | bool tea5759; /* 5759 chip is present */ | 46 | bool tea5759; /* 5759 chip is present */ |
47 | bool mute; /* Device is muted? */ | 47 | bool mute; /* Device is muted? */ |
48 | bool stereo; /* receiving stereo */ | 48 | bool stereo; /* receiving stereo */ |
49 | bool tuned; /* tuned to a station */ | 49 | bool tuned; /* tuned to a station */ |
50 | unsigned int val; /* hw value */ | 50 | unsigned int val; /* hw value */ |
51 | unsigned long freq; /* frequency */ | 51 | unsigned long freq; /* frequency */ |
52 | unsigned long in_use; /* set if the device is in use */ | 52 | struct mutex mutex; |
53 | struct snd_tea575x_ops *ops; | 53 | struct snd_tea575x_ops *ops; |
54 | void *private_data; | 54 | void *private_data; |
55 | u8 card[32]; | 55 | u8 card[32]; |
56 | u8 bus_info[32]; | 56 | u8 bus_info[32]; |
57 | struct v4l2_ctrl_handler ctrl_handler; | ||
58 | int (*ext_init)(struct snd_tea575x *tea); | ||
57 | }; | 59 | }; |
58 | 60 | ||
59 | int snd_tea575x_init(struct snd_tea575x *tea); | 61 | int snd_tea575x_init(struct snd_tea575x *tea); |