ALSA: usb-audio: Decrease level of 'cannot get freq at ep' message
PATCH 1/1 ALSA: usb-audio: Decrease level of 'cannot get freq at ep' message
From: Mario Limonciello <[email protected]>
Not all USB audio devices support reading the sample rate from a control message. For the audio controller in Lenovo Thinkpad Thunderbolt 3 dock this message is emitted multiple times.
As this is expected behavior for some devices, decrease the message to debug.
--- sound/usb/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/usb/clock.c +1 -1
@@ -498,7 +498,7 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip,UAC_EP_CS_ATTR_SAMPLE_RATE <<8 , fmt->endpoint, data, sizeof(data));if (err <0 ) { -dev_err (&dev->dev,"%d:%d: cannot get freq at ep %#x\n" , +dev_dbg (&dev->dev,"%d:%d: cannot get freq at ep %#x\n" , fmt->iface, fmt->altsetting, fmt->endpoint); chip->sample_rate_read_error++;return 0 ;/* some devices don't support reading */
Signature · 1 line
2.43.0
Quoted 11 lines · Mario Limonciello
From: Mario Limonciello <[email protected]>
Not all USB audio devices support reading the sample rate from a control message. For the audio controller in Lenovo Thinkpad Thunderbolt 3 dock this message is emitted multiple times.
As this is expected behavior for some devices, decrease the message to debug.
Signed-off-by Mario Limonciello <[email protected]>
Could you try to set the quirk flag QUIRK_FLAG_GET_SAMPLE_RATE for the device instead (as found in quirk_flags_table[] in quirks.c)?
The error is real, and if it's known to be broken, we shouldn't try to read the result rate on such a device at all.
thanks,
Takashi
Quoted 21 lines
--- sound/usb/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/usb/clock.c +1
-1@@ -498,7 +498,7 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip,UAC_EP_CS_ATTR_SAMPLE_RATE <<8 , fmt->endpoint, data, sizeof(data));if (err <0 ) { -dev_err (&dev->dev,"%d:%d: cannot get freq at ep %#x\n" , +dev_dbg (&dev->dev,"%d:%d: cannot get freq at ep %#x\n" , fmt->iface, fmt->altsetting, fmt->endpoint); chip->sample_rate_read_error++;return 0 ;/* some devices don't support reading */ Signature · 1 line
2.43.0