Use lower case X when writing hex numbers

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Rename shiface_chip to hiface_chip

The 's' prefix in shiface_chip looks like a leftover from the 6fire
driver, it made sense there as the 's' is from the 6 in the name and
variables names can't start with numbers, but it is just distracting
here: each time I read 'shiface' I start wondering what the 's' stands
for.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Rename 'driver_info' to 'quirk' in hiface_chip_probe()

From the driver point of view these really are the quirks not the USB
driver_info anymore.

Plus, we can always dereference usb_id, so get usb_id->driver_info as
soon as possible and simplify the code below a little bit.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Factor out a hiface_chip_create() from hiface_chip_probe()

This makes the code more readable, separates better the resposibilities,
and it is symmetric with hiface_chip_destroy().

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Use explicit comparison for the numerical variable chip->intf_count

For numerical variables checking explicitly for == 0 is neater
semantically, and thus it helps readability.

It does not hurt to stay larger and check for <= 0 tho, so do that!

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Rework how the probe callback performs its work

Use the algorithm from linux/sound/usb/card.c that has had more eyeballs
on it than the one from the 6fire driver.

Improvements in this version are:

  - Avoid using an array of usb_device structs, a usb_device pointer is
    already in our chip structure, reuse that to see if the device was
    already there.

  - Actually the 'enable' array, this one is also expected to be used
    via command line parameters on alsa drivers, the 6fire driver does
    not support it.

  - The scanning logic looks more readable to me, the previous checks on
    regidx were somewhat implicit.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Add support for command line parameters

This fixes the bug at
https://github.com/panicking/snd-usb-asyncaudio/issues/1

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Minor style fix

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>