@@ -185,28 +185,34 @@ int AwacsScreamer::device_postinit() {
185
185
}
186
186
187
187
uint32_t AwacsScreamer::snd_ctrl_read (uint32_t offset, int size) {
188
- uint32_t return_val = 0 ;
188
+ uint32_t value ;
189
189
190
190
switch (offset) {
191
191
case AWAC_SOUND_CTRL_REG:
192
- return this ->snd_ctrl_reg ;
192
+ value = this ->snd_ctrl_reg ;
193
+ break ;
193
194
case AWAC_CODEC_CTRL_REG:
194
- return this ->is_busy ;
195
+ value = this ->is_busy ;
196
+ break ;
195
197
case AWAC_CODEC_STATUS_REG:
196
- return (AWAC_AVAILABLE << 8 ) | (AWAC_MAKER_CRYSTAL << 16 ) | (AWAC_REV_SCREAMER << 20 );
198
+ value = (AWAC_AVAILABLE << 8 ) | (AWAC_MAKER_CRYSTAL << 16 ) | (AWAC_REV_SCREAMER << 20 );
199
+ break ;
197
200
case AWAC_CLIP_COUNT:
198
- return_val = this ->clip_count ;
199
- this ->clip_count = 0 ;
200
- return return_val ;
201
+ value = this ->clip_count ;
202
+ this ->clip_count = 0 ;
203
+ break ;
201
204
case AWAC_BYTE_SWAP:
202
- return this ->byte_swap ? 0 : 1 ;
205
+ value = this ->byte_swap ? 0 : 1 ;
206
+ break ;
203
207
case AWAC_FRAME_COUNT:
204
- return this ->frame_count ;
208
+ value = this ->frame_count ;
209
+ break ;
205
210
default :
206
211
LOG_F (ERROR, " %s: unsupported register at offset 0x%X" , this ->name .c_str (), offset);
212
+ value = 0 ;
207
213
}
208
214
209
- return 0 ;
215
+ return value ;
210
216
}
211
217
212
218
void AwacsScreamer::snd_ctrl_write (uint32_t offset, uint32_t value, int size) {
@@ -229,10 +235,13 @@ void AwacsScreamer::snd_ctrl_write(uint32_t offset, uint32_t value, int size) {
229
235
break ;
230
236
case AWAC_CLIP_COUNT:
231
237
this ->clip_count = BYTESWAP_32 (value);
238
+ break ;
232
239
case AWAC_BYTE_SWAP:
233
240
this ->byte_swap = BYTESWAP_32 (value);
241
+ break ;
234
242
case AWAC_FRAME_COUNT:
235
243
this ->frame_count = BYTESWAP_32 (value);
244
+ break ;
236
245
default :
237
246
LOG_F (ERROR, " %s: unsupported register at offset 0x%X" , this ->name .c_str (),
238
247
offset);
0 commit comments