Skip to content

Commit 4f6c60f

Browse files
committed
Merge remote-tracking branch 'takashi/for-next' into sound/upstream-20260722
2 parents 6f8fe53 + df27e4d commit 4f6c60f

36 files changed

Lines changed: 1574 additions & 302 deletions

include/sound/ac97/codec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct ac97_id {
3333
};
3434

3535
/**
36-
* ac97_codec_device - a ac97 codec
36+
* struct ac97_codec_device - a ac97 codec
3737
* @dev: the core device
3838
* @vendor_id: the vendor_id of the codec, as sensed on the AC-link
3939
* @num: the codec number, 0 is primary, 1 is first slave, etc ...
@@ -53,7 +53,7 @@ struct ac97_codec_device {
5353
};
5454

5555
/**
56-
* ac97_codec_driver - a ac97 codec driver
56+
* struct ac97_codec_driver - a ac97 codec driver
5757
* @driver: the device driver structure
5858
* @probe: the function called when a ac97_codec_device is matched
5959
* @remove: the function called when the device is unbound/removed

include/sound/hda_codec.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ struct hda_codec {
256256
unsigned int link_down_at_suspend:1; /* link down at runtime suspend */
257257
unsigned int relaxed_resume:1; /* don't resume forcibly for jack */
258258
unsigned int forced_resume:1; /* forced resume for jack */
259+
unsigned int acomp_requested_resume:1; /* resume requested by acomp */
259260
unsigned int no_stream_clean_at_suspend:1; /* do not clean streams at suspend */
260261
unsigned int ctl_dev_id:1; /* old control element id build behaviour */
261262
unsigned int eld_jack_detect:1; /* Machine jack-detection by ELD */

include/sound/hda_regmap.h

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ void snd_hdac_regmap_sync(struct hdac_device *codec);
6969

7070
/**
7171
* snd_hdac_regmap_write - Write a verb with caching
72+
* @codec: HD-audio codec base device
7273
* @nid: codec NID
73-
* @reg: verb to write
74+
* @verb: verb to write
7475
* @val: value to write
7576
*
7677
* For writing an amp value, use snd_hdac_regmap_update_amp().
78+
*
79+
* Returns: %0 if successful or a negative error code.
7780
*/
7881
static inline int
7982
snd_hdac_regmap_write(struct hdac_device *codec, hda_nid_t nid,
@@ -85,13 +88,16 @@ snd_hdac_regmap_write(struct hdac_device *codec, hda_nid_t nid,
8588
}
8689

8790
/**
88-
* snd_hda_regmap_update - Update a verb value with caching
91+
* snd_hdac_regmap_update - Update a verb value with caching
92+
* @codec: HD-audio codec
8993
* @nid: codec NID
9094
* @verb: verb to update
9195
* @mask: bit mask to update
9296
* @val: value to update
9397
*
9498
* For updating an amp value, use snd_hdac_regmap_update_amp().
99+
*
100+
* Returns: %0 if successful or a negative error code.
95101
*/
96102
static inline int
97103
snd_hdac_regmap_update(struct hdac_device *codec, hda_nid_t nid,
@@ -104,12 +110,15 @@ snd_hdac_regmap_update(struct hdac_device *codec, hda_nid_t nid,
104110
}
105111

106112
/**
107-
* snd_hda_regmap_read - Read a verb with caching
113+
* snd_hdac_regmap_read - Read a verb with caching
114+
* @codec: HD-audio codec
108115
* @nid: codec NID
109116
* @verb: verb to read
110117
* @val: pointer to store the value
111118
*
112119
* For reading an amp value, use snd_hda_regmap_get_amp().
120+
*
121+
* Returns: %0 if successful or a negative error code.
113122
*/
114123
static inline int
115124
snd_hdac_regmap_read(struct hdac_device *codec, hda_nid_t nid,
@@ -125,12 +134,12 @@ snd_hdac_regmap_read(struct hdac_device *codec, hda_nid_t nid,
125134
* @codec: HD-audio codec
126135
* @nid: NID to read the AMP value
127136
* @ch: channel (left=0 or right=1)
128-
* @direction: #HDA_INPUT or #HDA_OUTPUT
129-
* @index: the index value (only for input direction)
130-
* @val: the pointer to store the value
137+
* @dir: #HDA_INPUT or #HDA_OUTPUT
138+
* @idx: the index value (only for input direction)
131139
*
132140
* Read AMP value. The volume is between 0 to 0x7f, 0x80 = mute bit.
133-
* Returns the value or a negative error.
141+
*
142+
* Returns: the value or a negative error.
134143
*/
135144
static inline int
136145
snd_hdac_regmap_get_amp(struct hdac_device *codec, hda_nid_t nid,
@@ -148,13 +157,14 @@ snd_hdac_regmap_get_amp(struct hdac_device *codec, hda_nid_t nid,
148157
* @codec: HD-audio codec
149158
* @nid: NID to read the AMP value
150159
* @ch: channel (left=0 or right=1)
151-
* @direction: #HDA_INPUT or #HDA_OUTPUT
160+
* @dir: #HDA_INPUT or #HDA_OUTPUT
152161
* @idx: the index value (only for input direction)
153162
* @mask: bit mask to set
154163
* @val: the bits value to set
155164
*
156165
* Update the AMP value with a bit mask.
157-
* Returns 0 if the value is unchanged, 1 if changed, or a negative error.
166+
*
167+
* Returns: 0 if the value is unchanged, 1 if changed, or a negative error.
158168
*/
159169
static inline int
160170
snd_hdac_regmap_update_amp(struct hdac_device *codec, hda_nid_t nid,
@@ -169,13 +179,12 @@ snd_hdac_regmap_update_amp(struct hdac_device *codec, hda_nid_t nid,
169179
* snd_hdac_regmap_get_amp_stereo - Read stereo AMP values
170180
* @codec: HD-audio codec
171181
* @nid: NID to read the AMP value
172-
* @ch: channel (left=0 or right=1)
173-
* @direction: #HDA_INPUT or #HDA_OUTPUT
174-
* @index: the index value (only for input direction)
175-
* @val: the pointer to store the value
182+
* @dir: #HDA_INPUT or #HDA_OUTPUT
183+
* @idx: the index value (only for input direction)
176184
*
177185
* Read stereo AMP values. The lower byte is left, the upper byte is right.
178-
* Returns the value or a negative error.
186+
*
187+
* Returns: the value or a negative error.
179188
*/
180189
static inline int
181190
snd_hdac_regmap_get_amp_stereo(struct hdac_device *codec, hda_nid_t nid,
@@ -192,14 +201,15 @@ snd_hdac_regmap_get_amp_stereo(struct hdac_device *codec, hda_nid_t nid,
192201
* snd_hdac_regmap_update_amp_stereo - update the stereo AMP value
193202
* @codec: HD-audio codec
194203
* @nid: NID to read the AMP value
195-
* @direction: #HDA_INPUT or #HDA_OUTPUT
204+
* @dir: #HDA_INPUT or #HDA_OUTPUT
196205
* @idx: the index value (only for input direction)
197206
* @mask: bit mask to set
198207
* @val: the bits value to set
199208
*
200209
* Update the stereo AMP value with a bit mask.
201210
* The lower byte is left, the upper byte is right.
202-
* Returns 0 if the value is unchanged, 1 if changed, or a negative error.
211+
*
212+
* Returns: 0 if the value is unchanged, 1 if changed, or a negative error.
203213
*/
204214
static inline int
205215
snd_hdac_regmap_update_amp_stereo(struct hdac_device *codec, hda_nid_t nid,

include/uapi/sound/firewire.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ struct snd_firewire_event_motu_register_dsp_change {
7979
*
8080
* @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE.
8181
* @message_count: The number of messages.
82+
* @messages: Array of @message_count messages
8283
* @messages.message: The messages expressing hardware knob operation.
8384
* @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous
84-
* transaction was sent to deliver the message. It has 16 bit unsigned integer
85+
* transaction was sent to deliver the message. It has 16-bit unsigned integer
8586
* value. The higher 3 bits of value expresses the lower three bits of second
86-
* field in the format of CYCLE_TIME, up to 7. The rest 13 bits expresses cycle
87+
* field in the format of CYCLE_TIME, up to 7. The remaining 13 bits express cycle
8788
* field up to 7999.
8889
*
8990
* The structure expresses message transmitted by Fireface 400 when operating hardware knob.
@@ -191,30 +192,35 @@ struct snd_firewire_motu_register_dsp_meter {
191192
#define SNDRV_FIREWIRE_MOTU_REGISTER_DSP_ALIGNED_INPUT_COUNT (SNDRV_FIREWIRE_MOTU_REGISTER_DSP_INPUT_COUNT + 2)
192193

193194
/**
194-
* snd_firewire_motu_register_dsp_parameter - the container for parameters of DSP controlled
195-
* by register access.
195+
* struct snd_firewire_motu_register_dsp_parameter - the container for parameters
196+
* of DSP controlled by register access.
197+
* @mixer: aggregate of @mixer.source and @mixer.output
196198
* @mixer.source.gain: The gain of source to mixer.
197199
* @mixer.source.pan: The L/R balance of source to mixer.
198200
* @mixer.source.flag: The flag of source to mixer, including mute, solo.
199201
* @mixer.source.paired_balance: The L/R balance of paired source to mixer, only for 4 pre and
200202
* Audio Express.
201203
* @mixer.source.paired_width: The width of paired source to mixer, only for 4 pre and
202204
* Audio Express.
205+
* @mixer.output: FIXME
203206
* @mixer.output.paired_volume: The volume of paired output from mixer.
204207
* @mixer.output.paired_flag: The flag of paired output from mixer.
208+
* @output: output parameters
205209
* @output.main_paired_volume: The volume of paired main output.
206210
* @output.hp_paired_volume: The volume of paired hp output.
207211
* @output.hp_paired_assignment: The source assigned to paired hp output.
208-
* @output.reserved: Padding for 32 bit alignment for future extension.
212+
* @output.reserved: Padding for 32-bit alignment for future extension.
213+
* @line_input: line input parameters
209214
* @line_input.boost_flag: The flags of boost for line inputs, only for 828mk2 and Traveler.
210215
* @line_input.nominal_level_flag: The flags of nominal level for line inputs, only for 828mk2 and
211216
* Traveler.
212-
* @line_input.reserved: Padding for 32 bit alignment for future extension.
217+
* @line_input.reserved: Padding for 32-bit alignment for future extension.
218+
* @input: input parameters
213219
* @input.gain_and_invert: The value including gain and invert for input, only for Ultralite, 4 pre
214220
* and Audio Express.
215221
* @input.flag: The flag of input; e.g. jack detection, phantom power, and pad, only for Ultralite,
216222
* 4 pre and Audio express.
217-
* @reserved: Padding so that the size of structure is kept to 512 byte, but for future extension.
223+
* @reserved: Padding so that the size of structure is kept to 512 bytes, but for future extension.
218224
*
219225
* The structure expresses the set of parameters for DSP controlled by register access.
220226
*/
@@ -272,8 +278,8 @@ struct snd_firewire_motu_register_dsp_parameter {
272278
* controlled by command
273279
* @data: Signal level meters. The mapping between position and signal channel is model-dependent.
274280
*
275-
* The structure expresses the part of DSP status for hardware meter. The 32 bit storage is
276-
* estimated to include IEEE 764 32 bit single precision floating point (binary32) value. It is
281+
* The structure expresses the part of DSP status for hardware meter. The 32-bit storage is
282+
* estimated to include IEEE 764 32-bit single precision floating point (binary32) value. It is
277283
* expected to be linear value (not logarithm) for audio signal level between 0.0 and +1.0.
278284
*/
279285
struct snd_firewire_motu_command_dsp_meter {

sound/core/compress_offload.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,17 +1393,17 @@ static long snd_compr_ioctl_compat(struct file *file, unsigned int cmd,
13931393
#endif
13941394

13951395
static const struct file_operations snd_compr_file_ops = {
1396-
.owner = THIS_MODULE,
1397-
.open = snd_compr_open,
1398-
.release = snd_compr_free,
1399-
.write = snd_compr_write,
1400-
.read = snd_compr_read,
1401-
.unlocked_ioctl = snd_compr_ioctl,
1396+
.owner = THIS_MODULE,
1397+
.open = snd_compr_open,
1398+
.release = snd_compr_free,
1399+
.write = snd_compr_write,
1400+
.read = snd_compr_read,
1401+
.unlocked_ioctl = snd_compr_ioctl,
14021402
#ifdef CONFIG_COMPAT
1403-
.compat_ioctl = snd_compr_ioctl_compat,
1403+
.compat_ioctl = snd_compr_ioctl_compat,
14041404
#endif
1405-
.mmap = snd_compr_mmap,
1406-
.poll = snd_compr_poll,
1405+
.mmap = snd_compr_mmap,
1406+
.poll = snd_compr_poll,
14071407
};
14081408

14091409
static int snd_compress_dev_register(struct snd_device *device)

sound/core/control.c

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,18 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
5555
struct snd_ctl_file *ctl;
5656
int i, err;
5757

58-
err = stream_open(inode, file);
59-
if (err < 0)
60-
return err;
58+
stream_open(inode, file);
6159

6260
card = snd_lookup_minor_data(iminor(inode), SNDRV_DEVICE_TYPE_CONTROL);
6361
if (!card) {
6462
err = -ENODEV;
6563
goto __error1;
6664
}
6765
err = snd_card_file_add(card, file);
68-
if (err < 0) {
69-
err = -ENODEV;
66+
if (err < 0)
7067
goto __error1;
71-
}
7268
if (!try_module_get(card->module)) {
73-
err = -EFAULT;
69+
err = -ENODEV;
7470
goto __error2;
7571
}
7672
ctl = kzalloc(sizeof(*ctl), GFP_KERNEL);
@@ -2339,16 +2335,15 @@ EXPORT_SYMBOL_GPL(snd_ctl_disconnect_layer);
23392335
* INIT PART
23402336
*/
23412337

2342-
static const struct file_operations snd_ctl_f_ops =
2343-
{
2344-
.owner = THIS_MODULE,
2345-
.read = snd_ctl_read,
2346-
.open = snd_ctl_open,
2347-
.release = snd_ctl_release,
2348-
.poll = snd_ctl_poll,
2349-
.unlocked_ioctl = snd_ctl_ioctl,
2350-
.compat_ioctl = snd_ctl_ioctl_compat,
2351-
.fasync = snd_ctl_fasync,
2338+
static const struct file_operations snd_ctl_f_ops = {
2339+
.owner = THIS_MODULE,
2340+
.read = snd_ctl_read,
2341+
.open = snd_ctl_open,
2342+
.release = snd_ctl_release,
2343+
.poll = snd_ctl_poll,
2344+
.unlocked_ioctl = snd_ctl_ioctl,
2345+
.compat_ioctl = snd_ctl_ioctl_compat,
2346+
.fasync = snd_ctl_fasync,
23522347
};
23532348

23542349
/* call lops under rwsems; called from snd_ctl_dev_*() below() */

sound/core/hwdep.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int snd_hwdep_open(struct inode *inode, struct file * file)
8787

8888
if (!try_module_get(hw->card->module)) {
8989
snd_card_unref(hw->card);
90-
return -EFAULT;
90+
return -ENODEV;
9191
}
9292

9393
init_waitqueue_entry(&wait, current);
@@ -323,18 +323,17 @@ static int snd_hwdep_control_ioctl(struct snd_card *card,
323323
324324
*/
325325

326-
static const struct file_operations snd_hwdep_f_ops =
327-
{
328-
.owner = THIS_MODULE,
329-
.llseek = snd_hwdep_llseek,
330-
.read = snd_hwdep_read,
331-
.write = snd_hwdep_write,
332-
.open = snd_hwdep_open,
333-
.release = snd_hwdep_release,
334-
.poll = snd_hwdep_poll,
335-
.unlocked_ioctl = snd_hwdep_ioctl,
336-
.compat_ioctl = snd_hwdep_ioctl_compat,
337-
.mmap = snd_hwdep_mmap,
326+
static const struct file_operations snd_hwdep_f_ops = {
327+
.owner = THIS_MODULE,
328+
.llseek = snd_hwdep_llseek,
329+
.read = snd_hwdep_read,
330+
.write = snd_hwdep_write,
331+
.open = snd_hwdep_open,
332+
.release = snd_hwdep_release,
333+
.poll = snd_hwdep_poll,
334+
.unlocked_ioctl = snd_hwdep_ioctl,
335+
.compat_ioctl = snd_hwdep_ioctl_compat,
336+
.mmap = snd_hwdep_mmap,
338337
};
339338

340339
static void snd_hwdep_free(struct snd_hwdep *hwdep)

sound/core/info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static int alloc_info_private(struct snd_info_entry *entry,
7878
if (!entry || !entry->p)
7979
return -ENODEV;
8080
if (!try_module_get(entry->module))
81-
return -EFAULT;
81+
return -ENODEV;
8282
data = kzalloc_obj(*data);
8383
if (!data) {
8484
module_put(entry->module);

sound/core/init.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -466,20 +466,19 @@ static int snd_disconnect_fasync(int fd, struct file *file, int on)
466466
return -ENODEV;
467467
}
468468

469-
static const struct file_operations snd_shutdown_f_ops =
470-
{
471-
.owner = THIS_MODULE,
472-
.llseek = snd_disconnect_llseek,
473-
.read = snd_disconnect_read,
474-
.write = snd_disconnect_write,
475-
.release = snd_disconnect_release,
476-
.poll = snd_disconnect_poll,
477-
.unlocked_ioctl = snd_disconnect_ioctl,
469+
static const struct file_operations snd_shutdown_f_ops = {
470+
.owner = THIS_MODULE,
471+
.llseek = snd_disconnect_llseek,
472+
.read = snd_disconnect_read,
473+
.write = snd_disconnect_write,
474+
.release = snd_disconnect_release,
475+
.poll = snd_disconnect_poll,
476+
.unlocked_ioctl = snd_disconnect_ioctl,
478477
#ifdef CONFIG_COMPAT
479-
.compat_ioctl = snd_disconnect_ioctl,
478+
.compat_ioctl = snd_disconnect_ioctl,
480479
#endif
481-
.mmap = snd_disconnect_mmap,
482-
.fasync = snd_disconnect_fasync
480+
.mmap = snd_disconnect_mmap,
481+
.fasync = snd_disconnect_fasync
483482
};
484483

485484
/**

0 commit comments

Comments
 (0)