@@ -226,7 +226,6 @@ static void uni_player_set_channel_status(struct uniperif *player,
226
226
* sampling frequency. If no sample rate is already specified, then
227
227
* set one.
228
228
*/
229
- mutex_lock (& player -> ctrl_lock );
230
229
if (runtime ) {
231
230
switch (runtime -> rate ) {
232
231
case 22050 :
@@ -303,7 +302,6 @@ static void uni_player_set_channel_status(struct uniperif *player,
303
302
player -> stream_settings .iec958 .status [3 + (n * 4 )] << 24 ;
304
303
SET_UNIPERIF_CHANNEL_STA_REGN (player , n , status );
305
304
}
306
- mutex_unlock (& player -> ctrl_lock );
307
305
308
306
/* Update the channel status */
309
307
if (player -> ver < SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0 )
@@ -365,8 +363,10 @@ static int uni_player_prepare_iec958(struct uniperif *player,
365
363
366
364
SET_UNIPERIF_CTRL_ZERO_STUFF_HW (player );
367
365
366
+ mutex_lock (& player -> ctrl_lock );
368
367
/* Update the channel status */
369
368
uni_player_set_channel_status (player , runtime );
369
+ mutex_unlock (& player -> ctrl_lock );
370
370
371
371
/* Clear the user validity user bits */
372
372
SET_UNIPERIF_USER_VALIDITY_VALIDITY_LR (player , 0 );
@@ -598,7 +598,6 @@ static int uni_player_ctl_iec958_put(struct snd_kcontrol *kcontrol,
598
598
iec958 -> status [1 ] = ucontrol -> value .iec958 .status [1 ];
599
599
iec958 -> status [2 ] = ucontrol -> value .iec958 .status [2 ];
600
600
iec958 -> status [3 ] = ucontrol -> value .iec958 .status [3 ];
601
- mutex_unlock (& player -> ctrl_lock );
602
601
603
602
spin_lock_irqsave (& player -> irq_lock , flags );
604
603
if (player -> substream && player -> substream -> runtime )
@@ -608,6 +607,8 @@ static int uni_player_ctl_iec958_put(struct snd_kcontrol *kcontrol,
608
607
uni_player_set_channel_status (player , NULL );
609
608
610
609
spin_unlock_irqrestore (& player -> irq_lock , flags );
610
+ mutex_unlock (& player -> ctrl_lock );
611
+
611
612
return 0 ;
612
613
}
613
614
0 commit comments