Replace snd_printk() with the standard dev_err() and friends

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Replace strcpy() with strlcpy()

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Drop some useless pr_debug() calls

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
hiface_pcm_trigger(): use spin_lock_irq()

Reviewers told that spin_lock_irq() can be used here instead of
spin_lock_irqsave(): nothing else should have disabled interrupts when
the trigger callback is invoked.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
hiface_pcm_get_substream(): replace pr_debug with dev_err()

The message really is an error message, and the dev_ variant will be
more informative about the device producing the message.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
hiface_pcm_close(): close a race window

Stop the USB stream before deactivating it.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
hiface_pcm_abort(): don't stop the alsa stream here

hiface_pcm_abort() is called in the disconnect callback, at this time the
alsa PCM stream has already been stopped.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Simplify the probing scheme to be per-device instead of per-interface

The hiFace devices only have one USB interface per device, so there is
no need to check if the device was already registered with another
interface.

This allows to simplify the probing scheme. As a consequence the
"intf_count" and "shutdown" fields of hiface_chip can be dropped.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Drop the index field of hiface_chip as it's not used anywhere

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

For USB devices it's not necessary to allocate physically contiguous
buffers as there won't be DMA from the device.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Cosmetics: adjust indentation of continuation lines

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Don't declare multiple variables in the same statement

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Replace pr_debug() with dev_dbg() and pr_err() with dev_err()

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Stop USB stream unconditionally in hiface_pcm_close()

This fixes a bug which caused the driver to keep sending URBs even after
the .close() callback was invoked.

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