aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-29 12:41:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-29 12:41:47 -0500
commit1c1f395b2873f59830979cf82324fbf00edfb80c (patch)
treee84c9b53a4d4bdb91ec9f4f5c059dc38dad21c76 /include/linux
parent49f9c3552ccc30f4f98c45d94d7f9b335596913f (diff)
parent1c9609e3a8cf5997bd35205cfda1ff2218ee793b (diff)
Merge tag 'sound-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "The major changes in the core API side in this cycle are the still on-going ASoC componentization works. Other than that, only few small changes such as 20bit PCM format support are found. Meanwhile the rest majority of changes are for ASoC drivers: - Large cleanups of some of the TI CODEC drivers - Continued work on Intel ASoC stuff for new quirks, ACPI GPIO handling, Kconfigs and lots of cleanups - Refactoring of the Freescale SSI driver, as preliminary work for the upcoming changes - Work on ST DFSDM driver, including the required IIO patches - New drivers for Allwinner A83T, Maxim MAX89373, SocioNext UiniPhier EVEA Tempo Semiconductor TSCS42xx and TI PCM816x, TAS5722 and TAS6424 devices - Removal of dead codes for SN95031 and board drivers Last but not least, a few HD-audio and USB-audio quirks are included as usual, too" * tag 'sound-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (303 commits) ALSA: hda - Reduce the suspend time consumption for ALC256 ASoC: use seq_file to dump the contents of dai_list,platform_list and codec_list ASoC: soc-core: add missing EXPORT_SYMBOL_GPL() for snd_soc_rtdcom_lookup IIO: ADC: stm32-dfsdm: remove unused variable again ASoC: bcm2835: fix hw_params error when device is in prepared state ASoC: mxs-sgtl5000: Do not print error on probe deferral ASoC: sgtl5000: Do not print error on probe deferral ASoC: Intel: remove select on non-existing SND_SOC_INTEL_COMMON ALSA: usb-audio: Support changing input on Sound Blaster E1 ASoC: Intel: remove second duplicated assignment to pointer 'res' ALSA: hda/realtek - update ALC215 depop optimize ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289 ALSA: pcm: Fix trailing semicolon ASoC: add Component level .read/.write ASoC: cx20442: fix regression by adding back .read/.write ASoC: uda1380: fix regression by adding back .read/.write ASoC: tlv320dac33: fix regression by adding back .read/.write ALSA: hda - Use IS_REACHABLE() for dependency on input IIO: ADC: stm32-dfsdm: fix static check warning IIO: ADC: stm32-dfsdm: code optimization ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h6
-rw-r--r--include/linux/iio/adc/stm32-dfsdm-adc.h18
-rw-r--r--include/linux/iio/consumer.h37
-rw-r--r--include/linux/iio/hw-consumer.h21
-rw-r--r--include/linux/iio/iio.h28
-rw-r--r--include/linux/iio/types.h28
-rw-r--r--include/linux/sound.h2
7 files changed, 110 insertions, 30 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index dc1ebfeeb5ec..d918f1ea84e6 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -640,6 +640,12 @@ static inline bool acpi_dev_present(const char *hid, const char *uid, s64 hrv)
640 return false; 640 return false;
641} 641}
642 642
643static inline const char *
644acpi_dev_get_first_match_name(const char *hid, const char *uid, s64 hrv)
645{
646 return NULL;
647}
648
643static inline bool is_acpi_node(struct fwnode_handle *fwnode) 649static inline bool is_acpi_node(struct fwnode_handle *fwnode)
644{ 650{
645 return false; 651 return false;
diff --git a/include/linux/iio/adc/stm32-dfsdm-adc.h b/include/linux/iio/adc/stm32-dfsdm-adc.h
new file mode 100644
index 000000000000..e7dc7a542a4e
--- /dev/null
+++ b/include/linux/iio/adc/stm32-dfsdm-adc.h
@@ -0,0 +1,18 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * This file discribe the STM32 DFSDM IIO driver API for audio part
4 *
5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
6 * Author(s): Arnaud Pouliquen <arnaud.pouliquen@st.com>.
7 */
8
9#ifndef STM32_DFSDM_ADC_H
10#define STM32_DFSDM_ADC_H
11
12int stm32_dfsdm_get_buff_cb(struct iio_dev *iio_dev,
13 int (*cb)(const void *data, size_t size,
14 void *private),
15 void *private);
16int stm32_dfsdm_release_buff_cb(struct iio_dev *iio_dev);
17
18#endif
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
index 5e347a9805fd..9887f4f8e2a8 100644
--- a/include/linux/iio/consumer.h
+++ b/include/linux/iio/consumer.h
@@ -134,6 +134,17 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev,
134 void *private), 134 void *private),
135 void *private); 135 void *private);
136/** 136/**
137 * iio_channel_cb_set_buffer_watermark() - set the buffer watermark.
138 * @cb_buffer: The callback buffer from whom we want the channel
139 * information.
140 * @watermark: buffer watermark in bytes.
141 *
142 * This function allows to configure the buffer watermark.
143 */
144int iio_channel_cb_set_buffer_watermark(struct iio_cb_buffer *cb_buffer,
145 size_t watermark);
146
147/**
137 * iio_channel_release_all_cb() - release and unregister the callback. 148 * iio_channel_release_all_cb() - release and unregister the callback.
138 * @cb_buffer: The callback buffer that was allocated. 149 * @cb_buffer: The callback buffer that was allocated.
139 */ 150 */
@@ -216,6 +227,32 @@ int iio_read_channel_average_raw(struct iio_channel *chan, int *val);
216int iio_read_channel_processed(struct iio_channel *chan, int *val); 227int iio_read_channel_processed(struct iio_channel *chan, int *val);
217 228
218/** 229/**
230 * iio_write_channel_attribute() - Write values to the device attribute.
231 * @chan: The channel being queried.
232 * @val: Value being written.
233 * @val2: Value being written.val2 use depends on attribute type.
234 * @attribute: info attribute to be read.
235 *
236 * Returns an error code or 0.
237 */
238int iio_write_channel_attribute(struct iio_channel *chan, int val,
239 int val2, enum iio_chan_info_enum attribute);
240
241/**
242 * iio_read_channel_attribute() - Read values from the device attribute.
243 * @chan: The channel being queried.
244 * @val: Value being written.
245 * @val2: Value being written.Val2 use depends on attribute type.
246 * @attribute: info attribute to be written.
247 *
248 * Returns an error code if failed. Else returns a description of what is in val
249 * and val2, such as IIO_VAL_INT_PLUS_MICRO telling us we have a value of val
250 * + val2/1e6
251 */
252int iio_read_channel_attribute(struct iio_channel *chan, int *val,
253 int *val2, enum iio_chan_info_enum attribute);
254
255/**
219 * iio_write_channel_raw() - write to a given channel 256 * iio_write_channel_raw() - write to a given channel
220 * @chan: The channel being queried. 257 * @chan: The channel being queried.
221 * @val: Value being written. 258 * @val: Value being written.
diff --git a/include/linux/iio/hw-consumer.h b/include/linux/iio/hw-consumer.h
new file mode 100644
index 000000000000..44d48bb1d39f
--- /dev/null
+++ b/include/linux/iio/hw-consumer.h
@@ -0,0 +1,21 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Industrial I/O in kernel hardware consumer interface
4 *
5 * Copyright 2017 Analog Devices Inc.
6 * Author: Lars-Peter Clausen <lars@metafoo.de>
7 */
8
9#ifndef LINUX_IIO_HW_CONSUMER_H
10#define LINUX_IIO_HW_CONSUMER_H
11
12struct iio_hw_consumer;
13
14struct iio_hw_consumer *iio_hw_consumer_alloc(struct device *dev);
15void iio_hw_consumer_free(struct iio_hw_consumer *hwc);
16struct iio_hw_consumer *devm_iio_hw_consumer_alloc(struct device *dev);
17void devm_iio_hw_consumer_free(struct device *dev, struct iio_hw_consumer *hwc);
18int iio_hw_consumer_enable(struct iio_hw_consumer *hwc);
19void iio_hw_consumer_disable(struct iio_hw_consumer *hwc);
20
21#endif
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 20b61347ea58..f12a61be1ede 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -20,34 +20,6 @@
20 * Currently assumes nano seconds. 20 * Currently assumes nano seconds.
21 */ 21 */
22 22
23enum iio_chan_info_enum {
24 IIO_CHAN_INFO_RAW = 0,
25 IIO_CHAN_INFO_PROCESSED,
26 IIO_CHAN_INFO_SCALE,
27 IIO_CHAN_INFO_OFFSET,
28 IIO_CHAN_INFO_CALIBSCALE,
29 IIO_CHAN_INFO_CALIBBIAS,
30 IIO_CHAN_INFO_PEAK,
31 IIO_CHAN_INFO_PEAK_SCALE,
32 IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW,
33 IIO_CHAN_INFO_AVERAGE_RAW,
34 IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY,
35 IIO_CHAN_INFO_HIGH_PASS_FILTER_3DB_FREQUENCY,
36 IIO_CHAN_INFO_SAMP_FREQ,
37 IIO_CHAN_INFO_FREQUENCY,
38 IIO_CHAN_INFO_PHASE,
39 IIO_CHAN_INFO_HARDWAREGAIN,
40 IIO_CHAN_INFO_HYSTERESIS,
41 IIO_CHAN_INFO_INT_TIME,
42 IIO_CHAN_INFO_ENABLE,
43 IIO_CHAN_INFO_CALIBHEIGHT,
44 IIO_CHAN_INFO_CALIBWEIGHT,
45 IIO_CHAN_INFO_DEBOUNCE_COUNT,
46 IIO_CHAN_INFO_DEBOUNCE_TIME,
47 IIO_CHAN_INFO_CALIBEMISSIVITY,
48 IIO_CHAN_INFO_OVERSAMPLING_RATIO,
49};
50
51enum iio_shared_by { 23enum iio_shared_by {
52 IIO_SEPARATE, 24 IIO_SEPARATE,
53 IIO_SHARED_BY_TYPE, 25 IIO_SHARED_BY_TYPE,
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
index 2aa7b6384d64..6eb3d683ef62 100644
--- a/include/linux/iio/types.h
+++ b/include/linux/iio/types.h
@@ -34,4 +34,32 @@ enum iio_available_type {
34 IIO_AVAIL_RANGE, 34 IIO_AVAIL_RANGE,
35}; 35};
36 36
37enum iio_chan_info_enum {
38 IIO_CHAN_INFO_RAW = 0,
39 IIO_CHAN_INFO_PROCESSED,
40 IIO_CHAN_INFO_SCALE,
41 IIO_CHAN_INFO_OFFSET,
42 IIO_CHAN_INFO_CALIBSCALE,
43 IIO_CHAN_INFO_CALIBBIAS,
44 IIO_CHAN_INFO_PEAK,
45 IIO_CHAN_INFO_PEAK_SCALE,
46 IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW,
47 IIO_CHAN_INFO_AVERAGE_RAW,
48 IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY,
49 IIO_CHAN_INFO_HIGH_PASS_FILTER_3DB_FREQUENCY,
50 IIO_CHAN_INFO_SAMP_FREQ,
51 IIO_CHAN_INFO_FREQUENCY,
52 IIO_CHAN_INFO_PHASE,
53 IIO_CHAN_INFO_HARDWAREGAIN,
54 IIO_CHAN_INFO_HYSTERESIS,
55 IIO_CHAN_INFO_INT_TIME,
56 IIO_CHAN_INFO_ENABLE,
57 IIO_CHAN_INFO_CALIBHEIGHT,
58 IIO_CHAN_INFO_CALIBWEIGHT,
59 IIO_CHAN_INFO_DEBOUNCE_COUNT,
60 IIO_CHAN_INFO_DEBOUNCE_TIME,
61 IIO_CHAN_INFO_CALIBEMISSIVITY,
62 IIO_CHAN_INFO_OVERSAMPLING_RATIO,
63};
64
37#endif /* _IIO_TYPES_H_ */ 65#endif /* _IIO_TYPES_H_ */
diff --git a/include/linux/sound.h b/include/linux/sound.h
index 3c6d393c7f29..ec85b7a1f8d1 100644
--- a/include/linux/sound.h
+++ b/include/linux/sound.h
@@ -12,11 +12,9 @@ struct device;
12extern int register_sound_special(const struct file_operations *fops, int unit); 12extern int register_sound_special(const struct file_operations *fops, int unit);
13extern int register_sound_special_device(const struct file_operations *fops, int unit, struct device *dev); 13extern int register_sound_special_device(const struct file_operations *fops, int unit, struct device *dev);
14extern int register_sound_mixer(const struct file_operations *fops, int dev); 14extern int register_sound_mixer(const struct file_operations *fops, int dev);
15extern int register_sound_midi(const struct file_operations *fops, int dev);
16extern int register_sound_dsp(const struct file_operations *fops, int dev); 15extern int register_sound_dsp(const struct file_operations *fops, int dev);
17 16
18extern void unregister_sound_special(int unit); 17extern void unregister_sound_special(int unit);
19extern void unregister_sound_mixer(int unit); 18extern void unregister_sound_mixer(int unit);
20extern void unregister_sound_midi(int unit);
21extern void unregister_sound_dsp(int unit); 19extern void unregister_sound_dsp(int unit);
22#endif /* _LINUX_SOUND_H */ 20#endif /* _LINUX_SOUND_H */