Fix a compiler warning

pcm.c: In function ‘hiface_pcm_init_urb’:
pcm.c:560:6: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Move the rate validity check into hiface_pcm_set_rate()

This makes the flow in hiface_pcm_prepare() easier to follow.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Fold hiface_chip_abort() into hiface_chip_disconnect() and remove it

hiface_chip_abort() was only called from hiface_chip_disconnect() and we
know that chip and card are defined when the latter is called, so the
pointer validity checks can be removed too.

No need to set chip->card to NULL as we are not going to use it again.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Add myself to the list of authors

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Remove hiface_pcm_destroy() prototype from pcm.h

hiface_pcm_destroy() is not called anymore from chip.c

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Simplify the structure of header files

Remove not strictly needed includes, remove common.h and be more
explicit in chip.h about what includes are needed.

For such a simple driver having a common.h header file is an unnecessary
indirection which makes reviewing the code a little bit more opaque.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Adjust copyright and authors in the header comment of all files

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Harmonize names, the driver is now called snd-usb-hiface

The driver name is now snd-usb-hiface

The name "HiFace" —with the capital H— is used to refer to the class of
compatible devices, while the "hiFace" name still refers to the actual
hardware device with USB VID:PID=04b4:930b

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Simplify setting the pcm stream name

Other drivers like snd-usb-audio or snd-hda-intel do not set the pcm
stream name according to the actual hardware device name, but just
according to some properties of the stream itself (e.g. USB Audio or
VT1708B 8-Ch Digital).

We wan call the stream "USB-SPDIF Audio" in this case following what's
in the USB descriptor.

Now that the pcm stream name is not variable anymore, the signature of
hiface_pcm_init() can be simplified as well.

Signed-off-by: Antonio Ospite <ao2@amarulasolutions.com>
Remove a development comment, maybe I'll add it back later

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