• Ruslan Bilovol's avatar
    usb: gadget: function: f_uac1: implement get_alt() · 1fc4926d
    Ruslan Bilovol authored
    After commit 7e4da3fc ("usb: gadget: composite:
    Test get_alt() presence instead of set_alt()") f_uac1
    function became broken because it doesn't have
    get_alt() callback implementation and composite
    framework never set altsetting 1 for audiostreaming
    interface. On host site it looks like:
    
     [424339.017711] 21:1:1: usb_set_interface failed (-32)
    
    Since host can't set altsetting 1, it can't start
    playing audio.
    
    In order to fix it implemented get_alt along with
    minor improvements (error conditions checking)
    similar to what existing f_uac2 has.
    
    Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
    Signed-off-by: default avatarRuslan Bilovol <ruslan.bilovol@gmail.com>
    Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
    1fc4926d
f_uac1.c 26.1 KB