@@ -57,13 +57,13 @@ struct uac_rtd_params {
57
57
58
58
/* Volume/Mute controls and their state */
59
59
int fu_id ; /* Feature Unit ID */
60
- struct snd_kcontrol * snd_kctl_volume ;
61
- struct snd_kcontrol * snd_kctl_mute ;
60
+ struct snd_ctl_elem_id snd_kctl_volume_id ;
61
+ struct snd_ctl_elem_id snd_kctl_mute_id ;
62
62
s16 volume_min , volume_max , volume_res ;
63
63
s16 volume ;
64
64
int mute ;
65
65
66
- struct snd_kcontrol * snd_kctl_rate ; /* read-only current rate */
66
+ struct snd_ctl_elem_id snd_kctl_rate_id ; /* read-only current rate */
67
67
int srate ; /* selected samplerate */
68
68
int active ; /* playback/capture running */
69
69
@@ -494,14 +494,13 @@ static inline void free_ep_fback(struct uac_rtd_params *prm, struct usb_ep *ep)
494
494
static void set_active (struct uac_rtd_params * prm , bool active )
495
495
{
496
496
// notifying through the Rate ctrl
497
- struct snd_kcontrol * kctl = prm -> snd_kctl_rate ;
498
497
unsigned long flags ;
499
498
500
499
spin_lock_irqsave (& prm -> lock , flags );
501
500
if (prm -> active != active ) {
502
501
prm -> active = active ;
503
502
snd_ctl_notify (prm -> uac -> card , SNDRV_CTL_EVENT_MASK_VALUE ,
504
- & kctl -> id );
503
+ & prm -> snd_kctl_rate_id );
505
504
}
506
505
spin_unlock_irqrestore (& prm -> lock , flags );
507
506
}
@@ -807,7 +806,7 @@ int u_audio_set_volume(struct g_audio *audio_dev, int playback, s16 val)
807
806
808
807
if (change )
809
808
snd_ctl_notify (uac -> card , SNDRV_CTL_EVENT_MASK_VALUE ,
810
- & prm -> snd_kctl_volume -> id );
809
+ & prm -> snd_kctl_volume_id );
811
810
812
811
return 0 ;
813
812
}
@@ -856,7 +855,7 @@ int u_audio_set_mute(struct g_audio *audio_dev, int playback, int val)
856
855
857
856
if (change )
858
857
snd_ctl_notify (uac -> card , SNDRV_CTL_EVENT_MASK_VALUE ,
859
- & prm -> snd_kctl_mute -> id );
858
+ & prm -> snd_kctl_mute_id );
860
859
861
860
return 0 ;
862
861
}
@@ -1331,7 +1330,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
1331
1330
err = snd_ctl_add (card , kctl );
1332
1331
if (err < 0 )
1333
1332
goto snd_fail ;
1334
- prm -> snd_kctl_mute = kctl ;
1333
+ prm -> snd_kctl_mute_id = kctl -> id ;
1335
1334
prm -> mute = 0 ;
1336
1335
}
1337
1336
@@ -1359,7 +1358,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
1359
1358
err = snd_ctl_add (card , kctl );
1360
1359
if (err < 0 )
1361
1360
goto snd_fail ;
1362
- prm -> snd_kctl_volume = kctl ;
1361
+ prm -> snd_kctl_volume_id = kctl -> id ;
1363
1362
prm -> volume = fu -> volume_max ;
1364
1363
prm -> volume_max = fu -> volume_max ;
1365
1364
prm -> volume_min = fu -> volume_min ;
@@ -1383,7 +1382,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
1383
1382
err = snd_ctl_add (card , kctl );
1384
1383
if (err < 0 )
1385
1384
goto snd_fail ;
1386
- prm -> snd_kctl_rate = kctl ;
1385
+ prm -> snd_kctl_rate_id = kctl -> id ;
1387
1386
}
1388
1387
1389
1388
strscpy (card -> driver , card_name );
0 commit comments