ALSA: au88x0: added reference of vortex_t
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 13 Oct 2014 06:07:18 +0000 (11:37 +0530)
committerTakashi Iwai <tiwai@suse.de>
Wed, 15 Oct 2014 10:03:05 +0000 (12:03 +0200)
added a pointer of the vortex in the following functions :

vortex_alsafmt_aspfmt
vortex_Vort3D_InitializeSource
a3dsrc_ZeroStateA3D

so that we can have a reference of the vortex in the function.
this reference of the vortex will actually be used in a later patch
to convert the pr_* macro to dev_*.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/au88x0/au88x0.h
sound/pci/au88x0/au88x0_a3d.c
sound/pci/au88x0/au88x0_core.c
sound/pci/au88x0/au88x0_pcm.c

index 466a5c8..3a8fefe 100644 (file)
@@ -243,7 +243,7 @@ static int vortex_core_init(vortex_t * card);
 static int vortex_core_shutdown(vortex_t * card);
 static void vortex_enable_int(vortex_t * card);
 static irqreturn_t vortex_interrupt(int irq, void *dev_id);
-static int vortex_alsafmt_aspfmt(int alsafmt);
+static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v);
 
 /* Connection  stuff. */
 static void vortex_connect_default(vortex_t * vortex, int en);
@@ -278,7 +278,7 @@ static void vortex_mix_setvolumebyte(vortex_t * vortex, unsigned char mix,
 static void vortex_Vort3D_enable(vortex_t * v);
 static void vortex_Vort3D_disable(vortex_t * v);
 static void vortex_Vort3D_connect(vortex_t * vortex, int en);
-static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en);
+static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v);
 #endif
 
 /* Driver stuff. */
index 30f760e..bc9cda3 100644 (file)
@@ -484,7 +484,7 @@ static void a3dsrc_ZeroState(a3dsrc_t * a)
 }
 
 /* Reset entire A3D engine */
-static void a3dsrc_ZeroStateA3D(a3dsrc_t * a)
+static void a3dsrc_ZeroStateA3D(a3dsrc_t *a, vortex_t *v)
 {
        int i, var, var2;
 
@@ -601,7 +601,7 @@ static void vortex_Vort3D_enable(vortex_t *v)
        Vort3DRend_Initialize(v, XT_HEADPHONE);
        for (i = 0; i < NR_A3D; i++) {
                vortex_A3dSourceHw_Initialize(v, i % 4, i >> 2);
-               a3dsrc_ZeroStateA3D(&(v->a3d[0]));
+               a3dsrc_ZeroStateA3D(&v->a3d[0], v);
        }
        /* Register ALSA controls */
        vortex_a3d_register_controls(v);
@@ -676,7 +676,7 @@ static void vortex_Vort3D_connect(vortex_t * v, int en)
 }
 
 /* Initialize one single A3D source. */
-static void vortex_Vort3D_InitializeSource(a3dsrc_t * a, int en)
+static void vortex_Vort3D_InitializeSource(a3dsrc_t *a, int en, vortex_t *v)
 {
        if (a->vortex == NULL) {
                pr_warn
index 72e8128..00e2096 100644 (file)
@@ -2177,7 +2177,8 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
                                return -EBUSY;
                        }
                        /* (De)Initialize A3D hardware source. */
-                       vortex_Vort3D_InitializeSource(&(vortex->a3d[a3d]), en);
+                       vortex_Vort3D_InitializeSource(&vortex->a3d[a3d], en,
+                                                      vortex);
                }
                /* Make SPDIF out exclusive to "spdif" device when in use. */
                if ((stream->type == VORTEX_PCM_SPDIF) && (en)) {
@@ -2765,7 +2766,7 @@ static int vortex_core_shutdown(vortex_t * vortex)
 
 /* Alsa support. */
 
-static int vortex_alsafmt_aspfmt(int alsafmt)
+static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v)
 {
        int fmt;
 
index 5adc6b9..bdde182 100644 (file)
@@ -332,7 +332,7 @@ static int snd_vortex_pcm_prepare(struct snd_pcm_substream *substream)
                dir = 1;
        else
                dir = 0;
-       fmt = vortex_alsafmt_aspfmt(runtime->format);
+       fmt = vortex_alsafmt_aspfmt(runtime->format, chip);
        spin_lock_irq(&chip->lock);
        if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
                vortex_adbdma_setmode(chip, dma, 1, dir, fmt,